Disable suggestion of v1 help for v2-specific subcommands

Bug #1520602 reported by Kyrylo Romanenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Niall Bunting

Bug Description

Currently when looking help for some subcommand using "--os-image-api-version 2" (explicitly of by default) we can see a prompt below:
Run `glance --os-image-api-version 1 help <command>` for v1 help.

This is false advice for v2-specific commands.
For example there is no "explain" and "task-create" and others on --os-image-api-version v1.

Execution of such commands will raise error message like:
$ glance --os-image-api-version 1 help task-create
'task-create' is not a valid subcommand

It would be good to disable suggestion of v1 help for v2-specific subcommands.

Checked on python-glanceclient (1.2.0).

description: updated
summary: - explain subcommand is not valid for --os-image-api-version 1
+ Disable suggestion of v1 help for v2-specific subcommands
Changed in python-glanceclient:
assignee: nobody → Niall Bunting (niall-bunting)
Changed in python-glanceclient:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

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

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

Reviewed: https://review.openstack.org/254883
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=bf67b80dbff7c8fdb7e4dcaa11bd1809f0cf7566
Submitter: Jenkins
Branch: master

commit bf67b80dbff7c8fdb7e4dcaa11bd1809f0cf7566
Author: NiallBunting <email address hidden>
Date: Tue Dec 8 17:28:14 2015 +0000

    Disable suggestion of v1 help for v2 commands

    Currently the client suggests 'Run `glance --os-image-api-version 1
    help` for v1 help' at the end of every help message. This is could
    be confusing for a v2 only command.

    Therefore this patch disables it if the command does not exist in v1,
    while keeping the message on the 'glance help' results.

    Change-Id: I967e9ba35afb8dc40524bd1d13284e684b435f81
    Closes-Bug: 1520602

Changed in python-glanceclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-glanceclient 2.0.0

This issue was fixed in the openstack/python-glanceclient 2.0.0 release.

Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

Thanks for fix!

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.