Some better handling
This commit is contained in:
15
pvc.py
15
pvc.py
@@ -573,6 +573,20 @@ def search(dom_name, dom_uuid, long_output):
|
||||
pvcf.stopZKConnection(zk)
|
||||
|
||||
|
||||
###############################################################################
|
||||
# pvc list
|
||||
###############################################################################
|
||||
@click.command(name='vlist', short_help='List all VM objects')
|
||||
def vlist():
|
||||
"""
|
||||
List all virtual machines in the cluster.
|
||||
"""
|
||||
|
||||
zk = pvcf.startZKConnection(zk_host)
|
||||
for vm in zk.get_children('/domains'):
|
||||
print(vm)
|
||||
|
||||
|
||||
###############################################################################
|
||||
# pvc init
|
||||
###############################################################################
|
||||
@@ -643,6 +657,7 @@ vm.add_command(unmigrate_vm)
|
||||
cli.add_command(node)
|
||||
cli.add_command(vm)
|
||||
cli.add_command(search)
|
||||
cli.add_command(vlist)
|
||||
cli.add_command(init_cluster)
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user