Using OS_BAREMETAL_API_VERSION=latest fails

Bug #1712935 reported by John L. Villalovos on 2017-08-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
High
John L. Villalovos

Bug Description

$ export OS_BAREMETAL_API_VERSION=latest
$ openstack baremetal node list
baremetal version latest is not in supported versions: 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21, 1.22, 1.23, 1.24, 1.25, 1.26, 1.27, 1.28, 1.29, 1.30, 1.31, 1.32, 1.33, 1.34
openstack: 'baremetal node list' is not an openstack command. See 'openstack --help'.
Did you mean one of these?
  credential create
  credential delete
  credential list
  credential set
  credential show

Changed in python-ironicclient:
importance: Undecided → High
John L. Villalovos (happycamp) wrote :

I think we need to implement a 'check_api_version' function in ironicclient/osc/plugin.py

https://github.com/openstack/python-openstackclient/blob/50099d3c725cb26c20dec91442d5b60460de544a/openstackclient/shell.py#L87-L93

Changed in python-ironicclient:
assignee: nobody → John L. Villalovos (happycamp)

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

Changed in python-ironicclient:
status: New → In Progress

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

commit 9d8afb38e8d6a6c61f446c93206d10b4bc35cce2
Author: John L. Villalovos <email address hidden>
Date: Thu Aug 24 17:37:33 2017 -0700

    Allow OS_BAREMETAL_API_VERSION=latest to work

    Allow OS_BAREMETAL_API_VERSION=latest to work. If
    OS_BAREMETAL_API_VERSION=latest then convert to the latest version and
    set that as the 'default' value for the os_baremetal_api_version
    value.

    Remove the LOG.debug() message about setting to latest as the message
    never appears in the logfile. As tested with:
      $ openstack --debug --log-file log.txt baremetal node list --os-baremetal-api-version latest

    Also it was set to always log the message.

    Change-Id: Idc3de8ae55e8267342633668a06d18b45c9e5f0a
    Closes-Bug: #1712935

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

Reviewed: https://review.openstack.org/499819
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=9e718ab9eef344943ccf40682bd657dd2c1aa7cb
Submitter: Jenkins
Branch: stable/pike

commit 9e718ab9eef344943ccf40682bd657dd2c1aa7cb
Author: John L. Villalovos <email address hidden>
Date: Thu Aug 24 17:37:33 2017 -0700

    Allow OS_BAREMETAL_API_VERSION=latest to work

    Allow OS_BAREMETAL_API_VERSION=latest to work. If
    OS_BAREMETAL_API_VERSION=latest then convert to the latest version and
    set that as the 'default' value for the os_baremetal_api_version
    value.

    Remove the LOG.debug() message about setting to latest as the message
    never appears in the logfile. As tested with:
      $ openstack --debug --log-file log.txt baremetal node list --os-baremetal-api-version latest

    Also it was set to always log the message.

    Change-Id: Idc3de8ae55e8267342633668a06d18b45c9e5f0a
    Closes-Bug: #1712935
    (cherry picked from commit 9d8afb38e8d6a6c61f446c93206d10b4bc35cce2)

tags: added: in-stable-pike

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

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

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

Other bug subscribers