From 12c93c6d5ff420f6a4a8833d33bad6ee7222e2f7 Mon Sep 17 00:00:00 2001 From: melanie witt Date: Thu, 12 Aug 2021 22:06:36 +0000 Subject: 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 --- openstackclient/compute/v2/service.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'openstackclient/compute') 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", -- cgit v1.2.1