help for - - all-tenants is incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-cinderclient |
Triaged
|
Low
|
Unassigned |
Bug Description
Observed in Yoga development branch for the 'cinder backup-list' command, but it probably occurs in multiple places.
Compare these:
$ cinder help backup-list
usage: cinder backup-list [--all-tenants [<all_tenants>]] ...
Lists all backups.
Optional Arguments:
--all-tenants [<all_tenants>]
[ ... etc ...]
$ cinder help list
usage: cinder list [--group_id <group_id>] [--all-tenants [<0|1>]] ...
Lists all volumes.
Optional Arguments:
--all-tenants [<0|1>]
[ ... etc ...]
OK, so for backup-list the help shows that the argument to --all-tenants is a <all_tenants>, but what the heck is that? The type of the parameter is defined as an integer:
@utils.
const=1,
The problem is the 'metavar' parameter. The definition should look something like this:
@utils.
const=1,
(that is, it should be passing the name of the var to store the result in as 'dest' and it should include what we want displayed as the argument for the option as 'metavar').