Invalid message returned when attempting to use version 3

Bug #1463809 reported by Matt Thompson
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Low
Matt Thompson

Bug Description

My tool is using client version 3, which has recently been removed from python-novaclient. When running my tool, I get an incomplete error back from novaclient:

>>> from novaclient.client import Client as nova_client
>>> auth_token='redacted'
>>> bypass_url='redacted'
>>> nova_client('3', auth_token=auth_token, bypass_url=bypass_url)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 805, in Client
    client_class = get_client_class(version)
  File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 801, in get_client_class
    raise exceptions.UnsupportedVersion(msg)
novaclient.exceptions.UnsupportedVersion: Invalid client version '3'. must be one of:
>>>

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

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

Changed in python-novaclient:
assignee: nobody → Matt Thompson (mattt416)
status: New → In Progress
melanie witt (melwitt)
Changed in python-novaclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/190141
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=84aec86319c6fc456db472e340188a5782e13741
Submitter: Jenkins
Branch: master

commit 84aec86319c6fc456db472e340188a5782e13741
Author: Matt Thompson <email address hidden>
Date: Wed Jun 10 13:05:18 2015 +0100

    Pass full path to pkgutil.iter_modules()

    On my production system, when using client version 3, an exception is
    raised with an incomplete message as the installed novaclient is
    failing to find the bundled client versions. This commit creates a new
    _get_available_client_versions() method and moves the client version
    searching from get_client_class() into it.

    We also update __get_available_client_versions() to pass
    pkgutil.iter_modules the full path to novaclient rather than
    'novaclient', which is what actually resolves the issue here.

    Lastly, we add a single test to ensure that
    __get_available_client_versions() does not return an empty list.

    Change-Id: I07ce414863e833c72e50ad8cf1824054cfb41457
    Closes-Bug: #1463809

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-novaclient:
milestone: none → 2.27.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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