Fix host-list and host-show rendering issues
Change-Id: I248194b0fc1aaf776e50bb132b34bbbe0c1735bc
This commit is contained in:
parent
bb6e3d02fd
commit
04c2e42647
@ -123,9 +123,9 @@ def remove_null_parms(**kwargs):
|
||||
return new
|
||||
|
||||
|
||||
def list_hosts(nodes):
|
||||
columns = ('uuid', 'name', 'type', 'status')
|
||||
utils.print_list(nodes, columns,
|
||||
def list_hosts(hosts):
|
||||
columns = ('id', 'hostname', 'type', 'status')
|
||||
utils.print_list(hosts, columns,
|
||||
{'versions': print_list_field('versions')},
|
||||
sortby_index=None)
|
||||
|
||||
|
@ -28,15 +28,13 @@ def _show_host(host):
|
||||
utils.print_dict(host._info)
|
||||
|
||||
|
||||
@utils.arg('host-id',
|
||||
@utils.arg('host_id',
|
||||
metavar='<host-id>',
|
||||
help='ID or name of the host to show.')
|
||||
def do_host_show(cs, args):
|
||||
"""Show details of a Host."""
|
||||
opts = {}
|
||||
opts['host_id'] = args.host_id
|
||||
opts = gyan_utils.remove_null_parms(**opts)
|
||||
host = cs.hosts.get(**opts)
|
||||
host = cs.hosts.get(args.host_id)
|
||||
_show_host(host)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user