No list availability zones option

Bug #1400795 reported by Tim Bell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Steve Martinelli

Bug Description

There does not appear to be an equivalent for the nova availability-zone-list command in the OSC.

It is a very useful end user feature since this is often shown as an option or in command output.

Revision history for this message
Steve Martinelli (stevemar) wrote :

The only weird part is how the output is structured, I'm wondering if we can make it a bit more like the other OSC commands:

steve:keystone$ nova availability-zone-list
+-----------------------+----------------------------------------+
| Name | Status |
+-----------------------+----------------------------------------+
| internal | available |
| |- ubuntuvm | |
| | |- nova-conductor | enabled :-) 2014-12-09T08:48:11.000000 |
| | |- nova-consoleauth | enabled :-) 2014-12-09T08:48:15.000000 |
| | |- nova-scheduler | enabled :-) 2014-12-09T08:48:16.000000 |
| | |- nova-cert | enabled :-) 2014-12-09T08:48:13.000000 |
| | |- nova-network | enabled :-) 2014-12-09T08:48:18.000000 |
| nova | available |
| |- ubuntuvm | |
| | |- nova-compute | enabled :-) 2014-12-09T08:48:19.000000 |
+-----------------------+----------------------------------------+

Changed in python-openstackclient:
status: New → Confirmed
Revision history for this message
Tim Bell (tim-bell) wrote :

That's weird.. in our cloud, we have

$ nova availability-zone-list
+---------------+-----------+
| Name | Status |
+---------------+-----------+
| cern-geneva-a | available |
| cern-geneva-b | available |
| cern-geneva-c | available |
| cern-wigner-a | available |
+---------------+-----------+

Revision history for this message
Steve Martinelli (stevemar) wrote :

Ah, theres actually two formats based on whether or not you have permission:

https://github.com/openstack/python-novaclient/blob/821643e126e3c2a6297ec2b3a30ee2e51d5268cd/novaclient/v1_1/shell.py#L4251-L4259

One is the detailed output (if you have permission), the other is not.

Revision history for this message
Steve Martinelli (stevemar) wrote :

I think I got this mostly working:

steve:keystone$ . ../devstack/openrc demo demo
steve:keystone$ openstack availability zone list
+-----------+-------------+
| Zone Name | Zone Status |
+-----------+-------------+
| nova | available |
+-----------+-------------+

steve:keystone$ . ../devstack/openrc admin admin
steve:keystone$ openstack availability zone list
+-----------------------+----------------------------------------+
| Zone Name | Zone Status |
+-----------------------+----------------------------------------+
| internal | available |
| |- ubuntuvm | |
| | |- nova-conductor | enabled :-) 2014-12-11T08:19:09.000000 |
| | |- nova-consoleauth | enabled :-) 2014-12-11T08:19:12.000000 |
| | |- nova-scheduler | enabled :-) 2014-12-11T08:19:11.000000 |
| | |- nova-cert | enabled :-) 2014-12-11T08:19:12.000000 |
| | |- nova-network | enabled :-) 2014-12-11T08:19:07.000000 |
| nova | available |
| |- ubuntuvm | |
| | |- nova-compute | enabled XXX 2014-12-11T07:18:13.000000 |
+-----------------------+----------------------------------------+

Revision history for this message
Steve Martinelli (stevemar) wrote :

Patch is up here: https://review.openstack.org/#/c/140456/ it follows the design/output very closely to that of the nova CLI

Revision history for this message
Steve Martinelli (stevemar) wrote :

Wondering what you all think of the following output instead? https://etherpad.openstack.org/p/osc-azs instead of having the hacky output that is the same as the nova command

Revision history for this message
Tim Bell (tim-bell) wrote :

The output looks very good to me. I wonder what the v3 API is due to return for the availability zones. It would be good to be able to have the same headings and fields with that too.

Dean Troyer (dtroyer)
Changed in python-openstackclient:
status: Confirmed → In Progress
assignee: nobody → Steve Martinelli (stevemar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/140456
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=381b47ff05559113ae99f61f3c230b806dcaa9ca
Submitter: Jenkins
Branch: master

commit 381b47ff05559113ae99f61f3c230b806dcaa9ca
Author: Steve Martinelli <email address hidden>
Date: Tue Dec 9 14:47:51 2014 -0500

    list availability zones for compute

    Adds the command `os availability zone list`

    Change-Id: I77bf52a9b84a62c3771a4838c9ea0c3af03eedb2
    Closes-Bug: #1400795

Changed in python-openstackclient:
status: In Progress → Fix Committed
Dean Troyer (dtroyer)
Changed in python-openstackclient:
milestone: none → m7
Dean Troyer (dtroyer)
Changed in python-openstackclient:
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.