1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +00:00

Merge branch 'master' into master

This commit is contained in:
Anatoliy Guskov 2018-06-15 19:13:41 +03:00 committed by GitHub
commit 920739c4c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,8 +330,7 @@ def instance(request, compute_id, vname):
console_type = conn.get_console_type() console_type = conn.get_console_type()
console_port = conn.get_console_port() console_port = conn.get_console_port()
console_keymap = conn.get_console_keymap() console_keymap = conn.get_console_keymap()
console_listen_address = conn.get_console_listen_addr() snapshots = sorted(conn.get_snapshot(), reverse=True, key=lambda k:k['date'])
snapshots = sorted(conn.get_snapshot(), reverse=True)
inst_xml = conn._XMLDesc(VIR_DOMAIN_XML_SECURE) inst_xml = conn._XMLDesc(VIR_DOMAIN_XML_SECURE)
has_managed_save_image = conn.get_managed_save_image() has_managed_save_image = conn.get_managed_save_image()
clone_disks = show_clone_disk(disks, vname) clone_disks = show_clone_disk(disks, vname)
@ -963,7 +962,7 @@ def delete_instance(instance, delete_disk=False):
print("Forcing shutdown") print("Forcing shutdown")
conn.force_shutdown() conn.force_shutdown()
if delete_disk: if delete_disk:
snapshots = sorted(conn.get_snapshot(), reverse=True) snapshots = sorted(conn.get_snapshot(), reverse=True, key=lambda k:k['date'])
for snap in snapshots: for snap in snapshots:
print("Deleting snapshot {}".format(snap['name'])) print("Deleting snapshot {}".format(snap['name']))
conn.snapshot_delete(snap['name']) conn.snapshot_delete(snap['name'])