From ab281d7f3bc302a10cc70874f792c9c5615210d4 Mon Sep 17 00:00:00 2001 From: "Yuanbin.Chen" Date: Wed, 2 May 2018 15:57:55 +0800 Subject: [PATCH] Change host list display value This patch add disk_total in host list display, and delete os and labels in host list display. Whether the host is available can be determined by CPU, memory, and disk. OS and labels not high in the value available to the host. Use "host-show" get host detail message, The os and labels will display. Change-Id: I6bd47ebb84855485c60bf079cc6cd6efe483c814 Signed-off-by: Yuanbin.Chen --- zunclient/osc/v1/hosts.py | 2 +- zunclient/v1/hosts_shell.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zunclient/osc/v1/hosts.py b/zunclient/osc/v1/hosts.py index ecb9cdf9..768da284 100644 --- a/zunclient/osc/v1/hosts.py +++ b/zunclient/osc/v1/hosts.py @@ -65,7 +65,7 @@ class ListHost(command.Lister): opts['sort_dir'] = parsed_args.sort_dir opts = zun_utils.remove_null_parms(**opts) hosts = client.hosts.list(**opts) - columns = ('uuid', 'hostname', 'mem_total', 'cpus', 'os', 'labels') + columns = ('uuid', 'hostname', 'mem_total', 'cpus', 'disk_total') return (columns, (utils.get_item_properties(host, columns) for host in hosts)) diff --git a/zunclient/v1/hosts_shell.py b/zunclient/v1/hosts_shell.py index 841339f4..60c40696 100644 --- a/zunclient/v1/hosts_shell.py +++ b/zunclient/v1/hosts_shell.py @@ -42,7 +42,7 @@ def do_host_list(cs, args): opts['sort_dir'] = args.sort_dir opts = zun_utils.remove_null_parms(**opts) hosts = cs.hosts.list(**opts) - columns = ('uuid', 'hostname', 'mem_total', 'cpus', 'os', 'labels') + columns = ('uuid', 'hostname', 'mem_total', 'cpus', 'disk_total') utils.print_list(hosts, columns, {'versions': zun_utils.print_list_field('versions')}, sortby_index=None)