Allow modification of a VM profile
And fix some bugs around this. Fixes #76
This commit is contained in:
@ -478,12 +478,17 @@ def get_vm_meta(vm):
|
||||
|
||||
return retdata, retcode
|
||||
|
||||
def update_vm_meta(vm, limit, selector, autostart):
|
||||
def update_vm_meta(vm, limit, selector, autostart, provisioner_profile):
|
||||
"""
|
||||
Update metadata of a VM.
|
||||
"""
|
||||
zk_conn = pvc_common.startZKConnection(config['coordinators'])
|
||||
retflag, retdata = pvc_vm.modify_vm_metadata(zk_conn, vm, limit, selector, bool(strtobool(autostart)))
|
||||
if autostart is not None:
|
||||
try:
|
||||
autostart = bool(strtobool(autostart))
|
||||
except:
|
||||
autostart = False
|
||||
retflag, retdata = pvc_vm.modify_vm_metadata(zk_conn, vm, limit, selector, autostart, provisioner_profile)
|
||||
pvc_common.stopZKConnection(zk_conn)
|
||||
|
||||
if retflag:
|
||||
|
Reference in New Issue
Block a user