Calling glance with an invald value for --os-image-api-version causes unhelpful error message

Bug #1395841 reported by Louis Taylor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Wishlist
Louis Taylor

Bug Description

Calling glance client with an invalid value for --os-image-api-version causes glance to output a message which does not clearly explain what went wrong:

    $ glance --os-image-api-version stupid-glance-version
    No module named vstupid-glance-version.shell

It would be nice if this error instead said that the version number was invalid, and maybe discovered the available versions.

Ian Cordasco (icordasc)
Changed in python-glanceclient:
importance: Undecided → Wishlist
status: New → Triaged
Louis Taylor (kragniz)
Changed in python-glanceclient:
assignee: nobody → Louis Taylor (kragniz)
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/137108

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

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

commit d5a0e657ed07a4a5ec503b80e71d1f136c79bb8e
Author: Louis Taylor <email address hidden>
Date: Tue Nov 25 15:33:57 2014 +0000

    Add useful error on invalid --os-image-api-version

    This adds a useful error message when a user enters an invalid value
    for --os-image-api-version. Previously, the shell directly attempted to
    import the module the user specified, and printed the error from the
    exception raised when that failed:

        $ glance --os-image-api-version stupid-glance-version
        No module named vstupid-glance-version.shell

    Glanceclient now catches this exception and prints something
    understandable for a user:

        $ glance --os-image-api-version stupid-glance-version
        "stupid-glance-version" is not a supported API version. Example values are "1" or "2".

    Closes-Bug: #1395841

    Change-Id: I48a95b7562c10bd68d777be408dcfa22cb05ec6a

Changed in python-glanceclient:
status: In Progress → Fix Committed
Louis Taylor (kragniz)
Changed in python-glanceclient:
milestone: none → v0.15.0
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

Remote bug watches

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