Merge "Add 'Forced down' column in serivce-list"

This commit is contained in:
Jenkins authored and Gerrit Code Review committed 2017-07-27 17:11:21 +00:00
commit 8dd49ea229
2 files changed
+11 -2

No files matched your search

@@ -30,8 +30,14 @@ class TestOsServicesNovaClientV211(test_os_services.TestOsServicesNovaClient):
# to find them. So filter out anything that's not nova-compute.
if serv.binary != 'nova-compute':
continue
host = self._get_column_value_from_single_row_table(
self.nova('service-list --binary %s' % serv.binary), 'Host')
service_list = self.nova('service-list --binary %s' % serv.binary)
# Check the 'service-list' table has the 'Forced down' column
status = self._get_column_value_from_single_row_table(
service_list, 'Forced down')
self.assertEqual('False', status)
host = self._get_column_value_from_single_row_table(service_list,
'Host')
service = self.nova('service-force-down %s %s'
% (host, serv.binary))
self.addCleanup(self.nova, 'service-force-down --unset',
+3
View File
@@ -3471,6 +3471,9 @@ def do_service_list(cs, args):
result = cs.services.list(host=args.host, binary=args.binary)
columns = ["Id", "Binary", "Host", "Zone", "Status",
"State", "Updated_at", "Disabled Reason"]
if cs.api_version >= api_versions.APIVersion('2.11'):
columns.append("Forced down")
utils.print_list(result, columns)