diff options
| author | melanie witt <melwittt@gmail.com> | 2021-08-12 22:06:36 +0000 |
|---|---|---|
| committer | melanie witt <melwittt@gmail.com> | 2021-08-17 01:34:05 +0000 |
| commit | 12c93c6d5ff420f6a4a8833d33bad6ee7222e2f7 (patch) | |
| tree | 8d4dd42937ce8cf957470f02d0f2ec8030141c0c /openstackclient/compute | |
| parent | ed87f7949ef1ef580ed71b9820e16823c0466472 (diff) | |
| download | python-openstackclient-12c93c6d5ff420f6a4a8833d33bad6ee7222e2f7.tar.gz | |
Show "Forced Down" compute service status with --long
Currently, the unified client does not have the ability to show the
"Forced Down" field of a GET /os-services response in microversion 2.11
even though the legacy client can.
This adds a "Forced Down" column to the 'openstack compute service list
--long' command output when microversion 2.11 is used.
Story: 2009115
Task: 43011
Change-Id: I10bc2fedbf0e867a990227962b2b6e60f5681f69
Diffstat (limited to 'openstackclient/compute')
| -rw-r--r-- | openstackclient/compute/v2/service.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openstackclient/compute/v2/service.py b/openstackclient/compute/v2/service.py index 625c0fad..6427e548 100644 --- a/openstackclient/compute/v2/service.py +++ b/openstackclient/compute/v2/service.py @@ -103,6 +103,10 @@ class ListService(command.Lister): "Updated At", "Disabled Reason" ) + has_forced_down = ( + compute_client.api_version >= api_versions.APIVersion('2.11')) + if has_forced_down: + columns += ("Forced Down",) else: columns = ( "ID", |
