[OSC] Parameters for "dataprocessing image tags add" expected in different order than the description

Bug #1560557 reported by Luigi Toscano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python client library for Sahara
Confirmed
Low
Unassigned

Bug Description

Tested on a recent release of RDO Mitaka:
python-saharaclient-0.13.1-0.20160316072305.f1dd01f

$ openstack help dataprocessing image tags add
usage: openstack dataprocessing image tags add [-h]
                                               [-f {html,json,json,shell,table,value,yaml,yaml}]
                                               [-c COLUMN]
                                               [--max-width <integer>]
                                               [--noindent] [--prefix PREFIX]
                                               --tags <tag> [<tag> ...]
                                               <image>
.....

But then:
$ openstack dataprocessing image tags add --tags vanilla 2.7.1 c7-vanilla
usage: openstack dataprocessing image tags add [-h]
                                               [-f {html,json,json,shell,table,value,yaml,yaml}]
                                               [-c COLUMN]
                                               [--max-width <integer>]
                                               [--noindent] [--prefix PREFIX]
                                               --tags <tag> [<tag> ...]
                                               <image>
openstack dataprocessing image tags add: error: too few arguments

This works instead:
$ openstack dataprocessing image tags add c7-vanilla_2_7_1-l-20160315 --tags vanilla 2.7.1

So either the help message should be fixed, or the parameters should be accepted according the current help message.

Revision history for this message
Andrey Pavlov (apavlov-n) wrote :

The order of arguments in help message (and format of help message in general) cannot be fixed on saharaclient side. It's all about openstackclient/cliff/argparse (depending on where it actually was overridden).
"--tags" parameter expects one or more arguments to be present, so c7-vanilla from your example was considered as a tag.

I would say it shouldn't be fixed, but if it's really confused, "image" argument can be made optional or tags can be added one by one via "--tag" parameter.

Changed in python-saharaclient:
importance: Undecided → Low
importance: Low → Undecided
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.