Support raw VM listing

This commit is contained in:
2019-03-12 21:30:01 -04:00
parent 081d855a03
commit c4a97f04a7
2 changed files with 11 additions and 3 deletions

View File

@ -496,7 +496,7 @@ def get_info(zk_conn, domain, long_output):
return True, ''
def get_list(zk_conn, node, limit):
def get_list(zk_conn, node, limit, raw):
if node != None:
# Verify node is valid
common.verifyNode(zk_conn, node)
@ -552,6 +552,10 @@ def get_list(zk_conn, node, limit):
if vm_node[vm] == node:
vm_list.append(vm)
if raw:
click.echo('\n'.join(vm_list))
return True, ''
# Gather information for printing
for vm in vm_list:
vm_state[vm] = zkhandler.readdata(zk_conn, '/domains/{}/state'.format(vm))