Complete VM restore functionality
This commit is contained in:
@ -498,6 +498,32 @@ def vm_backup(
|
||||
return output, retcode
|
||||
|
||||
|
||||
@ZKConnection(config)
|
||||
def vm_restore(
|
||||
zkhandler,
|
||||
domain,
|
||||
target_path,
|
||||
datestring,
|
||||
):
|
||||
"""
|
||||
Restore a VM from a local (primary coordinator) filesystem path.
|
||||
"""
|
||||
retflag, retdata = pvc_vm.restore_vm(
|
||||
zkhandler,
|
||||
domain,
|
||||
target_path,
|
||||
datestring,
|
||||
)
|
||||
|
||||
if retflag:
|
||||
retcode = 200
|
||||
else:
|
||||
retcode = 400
|
||||
|
||||
output = {"message": retdata.replace('"', "'")}
|
||||
return output, retcode
|
||||
|
||||
|
||||
@ZKConnection(config)
|
||||
def vm_attach_device(zkhandler, vm, device_spec_xml):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user