Supported API versions list should be sorted

Bug #1630962 reported by Kyrylo Romanenko
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Low
Kyrylo Romanenko

Bug Description

When using some openstack command with unsupported API version,
then OSC lists available API versions. Lists is unsorted and hardly readable.

Example:
2016-10-05 16:06:45.250650 | 2016-10-05 16:06:45.249 | stderr:
2016-10-05 16:06:45.252002 | 2016-10-05 16:06:45.251 | baremetal version 1.21 is not in supported versions 1.8, 1.9, 1.6, 1.7, 1.4, 1.5, 1.2, 1.3, 1, 1.1, 1.20, 1.18, 1.19, 1.14, 1.15, 1.16, 1.17, 1.10, 1.11, 1.12, 1.13
2016-10-05 16:06:45.253311 | 2016-10-05 16:06:45.252 | Invalid baremetal client version '1.21'. must be one of: 1.8, 1.9, 1.6, 1.7, 1.4, 1.5, 1.2, 1.3, 1, 1.1, 1.20, 1.18, 1.19, 1.14, 1.15, 1.16, 1.17, 1.10, 1.11, 1.12, 1.13

Sorted output of versions would be better for usage.

Expected example of sorting: '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'

Tags: cli
Changed in python-openstackclient:
assignee: nobody → Kyrylo Romanenko (kromanenko)
description: updated
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/382923

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

Patch help to sort versions in first part of output:

baremetal version 1.25 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

Invalid baremetal client version '1.25'. must be one of: 1.4, 1.5, 1.6, 1.7, 1.1, 1.2, 1.3, 1.8, 1.9, 1.16, 1.17, 1.14, 1.15, 1.12, 1.13, 1.10, 1.11, 1.18, 1.19, 1, 1.23, 1.22, 1.21, 1.20, 1.24

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

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

Revision history for this message
Kyrylo Romanenko (kromanenko) wrote :

With both patches output looks as expected:
$ openstack baremetal node create --driver fake --resource-class test_resource_class --os-baremetal-api-version 1.25
baremetal version 1.25 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
Invalid baremetal client version '1.25'. must be one of: 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

Changed in python-openstackclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to osc-lib (master)

Reviewed: https://review.openstack.org/383000
Committed: https://git.openstack.org/cgit/openstack/osc-lib/commit/?id=a9e8aaec12f6407a86332181119068506842e6e9
Submitter: Jenkins
Branch: master

commit a9e8aaec12f6407a86332181119068506842e6e9
Author: Kyrylo Romanenko <email address hidden>
Date: Thu Oct 6 17:34:21 2016 +0300

    Improve output of supported client versions

    Sort supported client versions.

    Change-Id: I85637883e0fa5eb08e029d55cb499f7b2e64df70
    Partial-Bug: #1630962

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

Reviewed: https://review.openstack.org/382923
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=42f9317360ac4a20daa2c5ef329d9fc99e8df680
Submitter: Jenkins
Branch: master

commit 42f9317360ac4a20daa2c5ef329d9fc99e8df680
Author: Kyrylo Romanenko <email address hidden>
Date: Thu Oct 6 16:02:09 2016 +0300

    Improve output of supported API versions

    Sort supported versions properly for better look.

    Change-Id: I6c2f5ecc04cf14ea5bf1b214cb303fcc9783af3f
    Closes-Bug: #1630962

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 3.3.0

This issue was fixed in the openstack/python-openstackclient 3.3.0 release.

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.