Move the output to a better place;
This commit is contained in:
parent
eb087a26e7
commit
d6b554e88e
|
@ -552,11 +552,6 @@ def get_list(zk_conn, node, limit, raw):
|
||||||
if vm_node[vm] == node:
|
if vm_node[vm] == node:
|
||||||
vm_list.append(vm)
|
vm_list.append(vm)
|
||||||
|
|
||||||
if raw:
|
|
||||||
for vm in vm_list:
|
|
||||||
click.echo(vm_name[vm])
|
|
||||||
return True, ''
|
|
||||||
|
|
||||||
# Gather information for printing
|
# Gather information for printing
|
||||||
for vm in vm_list:
|
for vm in vm_list:
|
||||||
vm_state[vm] = zkhandler.readdata(zk_conn, '/domains/{}/state'.format(vm))
|
vm_state[vm] = zkhandler.readdata(zk_conn, '/domains/{}/state'.format(vm))
|
||||||
|
@ -582,6 +577,11 @@ def get_list(zk_conn, node, limit, raw):
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
click.echo('Error: Domain {} does not exist.'.format(domain))
|
click.echo('Error: Domain {} does not exist.'.format(domain))
|
||||||
|
|
||||||
|
if raw:
|
||||||
|
for vm in vm_list:
|
||||||
|
click.echo(vm_name[vm])
|
||||||
|
return True, ''
|
||||||
|
|
||||||
# Determine optimal column widths
|
# Determine optimal column widths
|
||||||
# Dynamic columns: node_name, node, migrated
|
# Dynamic columns: node_name, node, migrated
|
||||||
vm_name_length = 5
|
vm_name_length = 5
|
||||||
|
|
Loading…
Reference in New Issue