[RFE] Change client default API version to latest available

Bug #1671145 reported by Mario Villaplana on 2017-03-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
Wishlist
Dmitry Tantsur
tripleo
Low
Dmitry Tantsur

Bug Description

At the Pike PTG, the issue of the default ironic API version used by python-openstackclient was discussed.

It was proposed that we start printing a warning when the API version is not passed to the client, and after a suitable deprecation period, start defaulting to the latest available API version.

The soon to be proposed specification will outline in detail how we can do this. The spec will also outline any corresponding changes to python-ironicclient.

[0] https://etherpad.openstack.org/p/ironic-pike-ptg-operations L30

Changed in ironic:
assignee: nobody → Mario Villaplana (mario-villaplana-j)
tags: added: rfe
Dmitry Tantsur (divius) on 2017-03-08
Changed in ironic:
status: New → Confirmed
tags: added: needs-spec
Changed in ironic:
importance: Undecided → Wishlist
affects: ironic → python-ironicclient
Changed in python-ironicclient:
status: Confirmed → In Progress
Ruby Loo (rloo) wrote :
Changed in python-ironicclient:
assignee: Mario Villaplana (mario-villaplana-j) → Dmitry Tantsur (divius)

Reviewed: https://review.openstack.org/442153
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=a99fbeeb1bb71d91b74180f5c46edadadcb8ebd0
Submitter: Jenkins
Branch: master

commit a99fbeeb1bb71d91b74180f5c46edadadcb8ebd0
Author: Mario Villaplana <email address hidden>
Date: Mon Mar 6 20:25:29 2017 +0000

    Log warning when API version is not specified for the OSC plugin

    At the Pike PTG, an issue was brought up regarding the use of an old API
    version in the ironic OpenStack CLI plugin. [0]

    It was suggested that we begin printing a warning whenever the default
    OSC API version is used and later default to using the latest API
    version when --os-baremetal-api-version is unspecified.

    This patch adds the warning discussed above.

    [0] https://etherpad.openstack.org/p/ironic-pike-ptg-operations L30

    Co-Authored-By: Dmitry Tantsur <email address hidden>
    Partial-Bug: #1671145
    Change-Id: I0cf4e737595405b7f9beff76a72ffd26e07e6277

Ruby Loo (rloo) wrote :

spec was approved, so rfe is approved.

tags: added: rfe-approved
removed: needs-spec rfe

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

Reviewed: https://review.openstack.org/484866
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=cdae0fb0450850c9996c2e1fee784832f4507fe7
Submitter: Jenkins
Branch: master

commit cdae0fb0450850c9996c2e1fee784832f4507fe7
Author: Dmitry Tantsur <email address hidden>
Date: Tue Jul 18 17:54:23 2017 +0200

    Log warning when API version is not specified for the ironic tool

    At the Pike PTG, an issue was brought up regarding the use of an old API
    version in the ironic tool [0]. It was suggested that we begin printing
    a warning whenever the default API version is used and later default
    to using the latest API version when --ironic-api-version is unspecified.

    This patch adds this warning.

    [0] https://etherpad.openstack.org/p/ironic-pike-ptg-operations L30

    Change-Id: I80d553e4d3b007d8312931019037f495425b5ea5
    Partial-Bug: #1671145

Changed in python-ironicclient:
assignee: Dmitry Tantsur (divius) → Julia Kreger (juliaashleykreger)

Reviewed: https://review.openstack.org/486677
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=324aaa79e3121334127c5e52344a7ef22a98dbac
Submitter: Jenkins
Branch: master

commit 324aaa79e3121334127c5e52344a7ef22a98dbac
Author: Dmitry Tantsur <email address hidden>
Date: Mon Jul 24 17:58:01 2017 +0200

    Follow up to the API version warning patches

    * Update the help string of --ironic-api-version and --os-baremetal-api-version
      to mention the future change.
    * Add missing dot to the warning issued by the "ironic" tool.

    Partial-Bug: #1671145
    Change-Id: Ia03775a318008d0c740ce873ea037309290e33f8

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

Changed in python-ironicclient:
assignee: Julia Kreger (juliaashleykreger) → Dmitry Tantsur (divius)

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

Reviewed: https://review.openstack.org/512986
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=bc4403ff0506c5a148a649f18c518ea0a52db740
Submitter: Zuul
Branch: master

commit bc4403ff0506c5a148a649f18c518ea0a52db740
Author: Dmitry Tantsur <email address hidden>
Date: Wed Oct 18 11:37:27 2017 +0200

    Allow re-negotiation of the latest version supplied by CLI

    Currently --os-baremetal-api-version=latest results in the latest known API
    version being send to the server. This does not work, if the server is older
    than the client. This patch enables the version to be downgraded to the latest
    server version in this case.

    Change-Id: I3c48b3dbfef9ff3ee6001d27c8e1eb04341e98ec
    Partial-Bug: #1671145

Reviewed: https://review.openstack.org/512989
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=c534b9465d4c7cea8944d282665c960285c3e162
Submitter: Zuul
Branch: master

commit c534b9465d4c7cea8944d282665c960285c3e162
Author: Dmitry Tantsur <email address hidden>
Date: Wed Oct 18 11:50:29 2017 +0200

    Set the default API version of OSC CLI to "latest"

    Now the default of OSC is the negotiated maximum version understood
    by both the server and the client. The value of "1" is now equivalent
    to "latest" as well.

    This change also cleans up unit tests for the OSC plugin.

    Change-Id: I489fee937a356b523eb35379dce3631195132fe5
    Closes-Bug: #1671145

Changed in python-ironicclient:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/515064
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=28560398fad39a4fb65289d8458340c7d517fd79
Submitter: Zuul
Branch: master

commit 28560398fad39a4fb65289d8458340c7d517fd79
Author: Dmitry Tantsur <email address hidden>
Date: Wed Oct 25 15:31:05 2017 +0200

    Switch the deprecated "ironic" CLI to "latest" API version by default

    The functional tests were updated to account for the initial state changed
    to "enroll" and for new fields appearing in "show" and "update" responses.

    Closes-Bug: #1671145
    Change-Id: Ida18541fbbc8064868cac0accb6919de08e9f795

Dmitry Tantsur (divius) wrote :

Added TripleO, since it has to stop setting OS_BAREMETAL_API_VERSION and IRONIC_API_VERSION in tripleo-common after the ironicclient release.

Changed in tripleo:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Dmitry Tantsur (divius)
milestone: none → queens-2

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

Dmitry Tantsur (divius) wrote :

python-ironicclient 2.0.0 has just been released. when it hits our repos, we can remove the versions bump.

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

Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
milestone: queens-2 → queens-3

Reviewed: https://review.openstack.org/522825
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=acf06a514ad7d182b7abb9ce849597cf19bd2e69
Submitter: Zuul
Branch: master

commit acf06a514ad7d182b7abb9ce849597cf19bd2e69
Author: Dmitry Tantsur <email address hidden>
Date: Fri Nov 24 14:55:15 2017 +0100

    Stop setting IRONIC_API_VERSION and OS_BAREMETAL_API_VERSION in overcloudrc

    Starting with python-ironicclient 2.0.0, this is no longer needed to access
    the latest features, as the default API version is now the latest version
    supported by both the client and the server.

    Change-Id: Icfc631484a500fd7730d807bcc0e87da62895187
    Closes-Bug: #1671145

Changed in tripleo:
status: In Progress → Fix Released

This issue was fixed in the openstack/tripleo-common 8.3.0 release.

Related fix proposed to branch: master
Review: https://review.openstack.org/532979

Reviewed: https://review.openstack.org/531029
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=5b01c8f2badb3c4affa4bbb08dd143dbd94f89d4
Submitter: Zuul
Branch: master

commit 5b01c8f2badb3c4affa4bbb08dd143dbd94f89d4
Author: Julia Kreger <email address hidden>
Date: Tue Jan 2 21:46:59 2018 -0800

    Facilitate latest Rest API use

    In order to provide insight into the remote
    API verison, we need the ability to negotiate
    upon the latest API version available, and then
    report what that version is.

    In order to understand if this has occured,
    we also need to provide insight into if version
    negotiation has occured.

    Adds logic to the session/http clients to faciltate
    version negotiation on the latest available version,
    and provide user insight into that verison.

    Change-Id: I813237eee4b122211f95558f677b25e0675569d5
    Related-Bug: #1739440
    Related-Bug: #1671145

Reviewed: https://review.openstack.org/531271
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=22ab93e8d6af21ef5946cb2515c381332ed59b04
Submitter: Zuul
Branch: master

commit 22ab93e8d6af21ef5946cb2515c381332ed59b04
Author: Julia Kreger <email address hidden>
Date: Thu Jan 4 02:14:08 2018 -0800

    Allow API user to define list of versions

    In cases where one may need to support multiple API
    micro-versions, it makes sense to allow a user to submit
    the list of versions their code can support, as long as
    they have the visibility into that version.

    Adds the ability to pass in a list to the
    os_ironic_api_version value during client
    initialization, and facilitate the negotiation
    of the highest available version.

    Change-Id: I0dfa3f7fe0a1e2aaf31d37c46b65cc6c064b5e86
    Related-Bug: #1739440
    Related-Bug: #1671145

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers