12.0.2
This commit is contained in:
@@ -1652,12 +1652,17 @@ class decort_vm(DecortController):
|
||||
f'disk {aparam_boot_disk_id} is not attached to '
|
||||
f'Compute ID {self.comp_id}.'
|
||||
)
|
||||
else:
|
||||
elif aparam_boot_disk_id is not None:
|
||||
aparam_disk_ids = []
|
||||
if aparam_disks['objects']:
|
||||
aparam_disk_ids = [
|
||||
disk['id'] for disk in aparam_disks['objects']
|
||||
]
|
||||
match aparam_disks['mode']:
|
||||
case 'update':
|
||||
if (
|
||||
aparam_boot_disk_id not in comp_disk_ids
|
||||
and aparam_boot_disk_id not in aparam_disks['ids']
|
||||
and aparam_boot_disk_id not in aparam_disk_ids
|
||||
):
|
||||
check_errors = True
|
||||
self.message(
|
||||
@@ -1666,7 +1671,7 @@ class decort_vm(DecortController):
|
||||
f'to Compute ID {self.comp_id}.'
|
||||
)
|
||||
case 'match':
|
||||
if aparam_boot_disk_id not in aparam_disks['ids']:
|
||||
if aparam_boot_disk_id not in aparam_disk_ids:
|
||||
check_errors = True
|
||||
self.message(
|
||||
f'Check for parameter "boot.disk_id" failed: '
|
||||
@@ -1674,7 +1679,7 @@ class decort_vm(DecortController):
|
||||
f'disks.ids'
|
||||
)
|
||||
case 'detach' | 'delete':
|
||||
if aparam_boot_disk_id in aparam_disks['ids']:
|
||||
if aparam_boot_disk_id in aparam_disk_ids:
|
||||
check_errors = True
|
||||
self.message(
|
||||
f'Check for parameter "boot.disk_id" failed: '
|
||||
|
||||
Reference in New Issue
Block a user