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

deleting instance with disk causes also delete of all corresponding snapshots. previously deleting instance with snapshots ended with error and probably also database inconsistency.

This commit is contained in:
Ing. Jan KRCMAR 2016-11-04 09:33:49 +01:00
parent a3a572a8a8
commit 48371ff92d

View file

@ -347,6 +347,8 @@ def instance(request, compute_id, vname):
if conn.get_status() == 1:
conn.force_shutdown()
if request.POST.get('delete_disk', ''):
for snap in snapshots:
conn.snapshot_delete(snap['name'])
conn.delete_disk()
conn.delete()