Add extra checks for compute data disks management
This commit is contained in:
@@ -518,8 +518,11 @@ class DecortController(object):
|
|||||||
#
|
#
|
||||||
# then all values when entering this method will be of type string. We need to
|
# then all values when entering this method will be of type string. We need to
|
||||||
# explicitly cast int type on all of them.
|
# explicitly cast int type on all of them.
|
||||||
|
if new_data_disks is not None:
|
||||||
for idx, repair in enumerate(new_data_disks):
|
for idx, repair in enumerate(new_data_disks):
|
||||||
new_data_disks[idx] = int(repair)
|
new_data_disks[idx] = int(repair)
|
||||||
|
else:
|
||||||
|
new_data_disks = []
|
||||||
|
|
||||||
for disk in comp_dict['disks']:
|
for disk in comp_dict['disks']:
|
||||||
if disk['type'] == 'B':
|
if disk['type'] == 'B':
|
||||||
|
|||||||
Reference in New Issue
Block a user