novaclient 2.27.0 breaks version handling

Bug #1492467 reported by Dean Troyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
High
Dean Troyer

Bug Description

The release of novaclient 2.27.0 included their API version auto-discovery, however, the version information is not properly initialized by OSC so any versioned API methods are not being called correctly.

The solution is to add a wee bit of initialization to set the api_Version argument to client.Client init.

Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Dean Troyer (dtroyer)
Revision history for this message
Dean Troyer (dtroyer) wrote :

This was discovered in testing for 'keypair create' when v2.2 added a new 'type' argument. novaclient 2.27 with discovery started defaulting to v2.latest and the v2.2 KeypairManager.create() was always being called.

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

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

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

Reviewed: https://review.openstack.org/220678
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=3abfea083a13c9aa69bedd10ea0286353d2f5887
Submitter: Jenkins
Branch: master

commit 3abfea083a13c9aa69bedd10ea0286353d2f5887
Author: Dean Troyer <email address hidden>
Date: Fri Sep 4 16:22:33 2015 -0500

    Fix compute API version snafu

    novaclient 2.27.0 introduced the API microversion discovery and client.Client
    now wants an api_version argument to properly work out the correct API
    version in use. OSC needs to provide this when required.

    Letting the compute client plugin do the version validity checking makes more
    sense than encoding it into shell.py, so I've added a new OSC plugin interface
    function check_api_version() that is called from shell.py if it exists. If it
    either does not exist or it returns False the previous version checking using
    API_VERSIONS is still performed.

    compute.client.check_api_version() conditionally imports the new
    novaclient.api_versions module and uses it if successful. Otherwise
    check_api_version() returns False and the previous code path is resumed.

    One side-effect of this is that it is now valid to use --os-compute-api-version
    with any valid microversion supported by the installed python-novaclient.

    Closes-Bug: #1492467
    Change-Id: I4535b38a5639a03a9597bf83f6394f9bb45c2b9e

Changed in python-openstackclient:
status: In Progress → Fix Committed
Changed in python-openstackclient:
milestone: none → 1.7.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.