Nicer messages when restarting modified VMs

This commit is contained in:
Joshua Boniface 2018-09-25 02:36:37 -04:00
parent 1c9c63db92
commit 477b3c3708
1 changed files with 8 additions and 2 deletions

View File

@ -341,6 +341,9 @@ def vm_modify(domain, config, editor, restart):
click.confirm('Write modifications to Zookeeper?', abort=True)
if restart:
click.echo('Writing modified config of VM "{}" and restarting.'.format(dom_name))
else:
click.echo('Writing modified config of VM "{}".'.format(dom_name))
# We're operating in replace mode
@ -349,6 +352,9 @@ def vm_modify(domain, config, editor, restart):
new_vm_config = config.read()
config.close()
if restart:
click.echo('Replacing config of VM "{}" with file "{}" and restarting.'.format(dom_name, config))
else:
click.echo('Replacing config of VM "{}" with file "{}".'.format(dom_name, config))
retcode, retmsg = pvc_vm.modify_vm(zk_conn, domain, restart, new_vm_config)