Correct bug in non-editor modify

This commit is contained in:
Joshua Boniface 2019-04-10 16:18:18 -04:00
parent c8c5d6f884
commit 30002f95d7
1 changed files with 5 additions and 5 deletions

View File

@ -298,12 +298,12 @@ def vm_modify(domain, config, editor, restart):
zk_conn = pvc_common.startZKConnection(zk_host)
if editor == True:
dom_uuid = pvc_vm.getDomainUUID(zk_conn, domain)
if dom_uuid == None:
cleanup(False, 'ERROR: Could not find VM "{}" in the cluster!'.format(domain))
dom_name = pvc_vm.getDomainName(zk_conn, dom_uuid)
dom_uuid = pvc_vm.getDomainUUID(zk_conn, domain)
if dom_uuid == None:
cleanup(False, 'ERROR: Could not find VM "{}" in the cluster!'.format(domain))
dom_name = pvc_vm.getDomainName(zk_conn, dom_uuid)
if editor == True:
# Grab the current config
current_vm_config = zk_conn.get('/domains/{}/xml'.format(dom_uuid))[0].decode('ascii')