mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-06-03 10:59:38 +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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user