Add initial implementation of snapshot export

This commit is contained in:
2024-08-19 18:46:07 -04:00
parent 9a435fe2ae
commit d060787503
6 changed files with 395 additions and 0 deletions

View File

@ -837,6 +837,34 @@ def rollback_vm_snapshot(
return output, retcode
@ZKConnection(config)
def export_vm_snapshot(
zkhandler,
domain,
snapshot_name,
export_path,
incremental_parent=None,
):
"""
Export a snapshot of a VM to files.
"""
retflag, retdata = pvc_vm.export_vm_snapshot(
zkhandler,
domain,
snapshot_name,
export_path,
incremental_parent,
)
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):
"""