help option (-H, --Help) is inconsistent to other client lib commands

Bug #1023260 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Medium
yong sheng gong

Bug Description

quantumv2 command uses '-H' and '--Help' to show help messages.
Other openstack client lib commands choose '-h' and '--help' (option names start with a lower case letter).
It is confusing and I suggest that quantumv2 command should follow this convention.

Revision history for this message
dan wendlandt (danwent) wrote :

I second this one... have been meaning to file the same issue.

Changed in python-quantumclient:
status: New → Confirmed
dan wendlandt (danwent)
Changed in python-quantumclient:
importance: Undecided → Medium
Akihiro Motoki (amotoki)
Changed in python-quantumclient:
assignee: nobody → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-quantumclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/9626

Changed in python-quantumclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-quantumclient (master)

Reviewed: https://review.openstack.org/9626
Committed: http://github.com/openstack/python-quantumclient/commit/463121305619a24001ba80be4ed899de148ccb75
Submitter: Jenkins
Branch: master

commit 463121305619a24001ba80be4ed899de148ccb75
Author: Akihiro MOTOKI <email address hidden>
Date: Wed Jul 11 14:44:31 2012 +0900

    Use -h, --help to show help messages.

    Fixes bug 1023260
    "quantumv2" command used '-H' and '--Help' to show help messages,
    but it is inconsistent to the convention of option names used in
    other OpenStack client lib commands. This commit fixes it.

    Change-Id: I85c1e79c2cd08bcc0112ed2f10ca8210e9384687

Changed in python-quantumclient:
status: In Progress → Fix Committed
Revision history for this message
yong sheng gong (gongysh) wrote :

hi,
In fact I use -H for quantum and preserve -h for subcommand.
As far, I found no easy way to use double -h.
Before this change, I use
quantum -H to print quantum usage
quantum port-list -h to print port-list usage.

So if we need to fix this inconsistency, we have to find a way to use double -h, which is meaning
quantum -h to print quantum usage
quantum port-list -h to print port-list usage.

or -h for quantum
-H for subcommand

So I label this bug to confirmed again.

Changed in python-quantumclient:
status: Fix Committed → Confirmed
assignee: Akihiro Motoki (amotoki) → nobody
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Hi,
Sorry for my late reply.

In the current implementation,
* "quantum --help/-h" prints quantum usage, and
* "quantum help <subcommand>" prints subcommand usage.

Though we cannot use --help for subcommand (quantum <subcommand> --help),
the current behavior is good for me.

If it is ok, one issue is remaining.
according to help message printed by "quantum help <subcommand>" subcommand can be used "-h/--help",
but actually we cannot use "--help" for subcommand. It is confusing for users.

Thanks Akihiro,

Changed in python-quantumclient:
assignee: nobody → yong sheng gong (gongysh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-quantumclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/11227

Changed in python-quantumclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-quantumclient (master)

Reviewed: https://review.openstack.org/11227
Committed: http://github.com/openstack/python-quantumclient/commit/80e89c929bb5aeddc8a31288ad5f7b749e24e4f5
Submitter: Jenkins
Branch: master

commit 80e89c929bb5aeddc8a31288ad5f7b749e24e4f5
Author: Yong Sheng Gong <email address hidden>
Date: Sun Aug 12 11:16:47 2012 +0800

    enable -h | --help after command to show the command usage.

    Bug #1023260

    we caculate the position of -h|--help and command, if -h|--help
    is after command, we replace the command with 'help' command.
    Change-Id: Ieb5fc9d37daafd704edb71e35b74dbf83cb69a4c

Changed in python-quantumclient:
status: In Progress → Fix Committed
Revision history for this message
Anne Gentle (annegentle) wrote :

Also all the other clients (nova, swift, glance, keystone) use just "help" as a command.

nova help

glance help

keystone help

swift help

Could that also be added?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-quantumclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/19299

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-quantumclient (master)

Reviewed: https://review.openstack.org/19299
Committed: http://github.com/openstack/python-quantumclient/commit/a9d5479ecfca3bac939a62b1037adc1497b622be
Submitter: Jenkins
Branch: master

commit a9d5479ecfca3bac939a62b1037adc1497b622be
Author: Akihiro MOTOKI <email address hidden>
Date: Mon Dec 31 02:47:53 2012 +0900

    Make "quantum help" to show a list of subcommands.

    Fix bug 1023260

    All other OpenStack clients (nova, keystone, glance, ....) accepts
    just "help" which displays a list of subcommands. This commit makes
    quantum command consist with other OpenStack projects.

    After this change help behavior of quantum command becomes as follows:
    Show general help message:
      quantum --help
      quantum help
    Show help message of subcommand
      quantum help <subcommand>
      quantum <subcommand> --help

    Change-Id: I34ca0df809da04f9b9b9275c697e6aafca312cfe

Changed in python-quantumclient:
milestone: none → 2.1
Akihiro Motoki (amotoki)
Changed in python-quantumclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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