Add VM snapshot removal

This commit is contained in:
2024-05-17 10:55:42 -04:00
parent 553c1e670e
commit 0c240a5129
5 changed files with 172 additions and 8 deletions

View File

@ -789,6 +789,30 @@ def create_vm_snapshot(
return output, retcode
@ZKConnection(config)
def remove_vm_snapshot(
zkhandler,
domain,
snapshot_name,
):
"""
Take a snapshot of a VM.
"""
retflag, retdata = pvc_vm.remove_vm_snapshot(
zkhandler,
domain,
snapshot_name,
)
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):
"""