<div dir="ltr">Hi all<div><br></div><div>I've written a Python script to take nightly snapshots of VMs which are kept for x days. After x days the snapshot is deleted.</div><div><br></div><div>I can't work out how to wait for the snapshot deletion to complete. I know how to do it for creating the snapshot but I've not been able to get it right for the deletion.</div><div><br></div><div><div> api.vms.get(VM_NAME).snapshots.add(params.Snapshot(description=SNAPSHOT_NAME, vm=api.vms.get(VM_NAME), persist_memorystate=True))</div><div> while api.vms.get(VM_NAME).status.state == 'image_locked':</div><div> sleep(1)</div></div><div><br></div><div>Any ideas?</div><div><br></div><div>Thanks</div><div><br></div><div>CC</div></div>