|
|
@ -121,6 +121,8 @@ class DecortController(object):
|
|
|
|
'STOPPING',
|
|
|
|
'STOPPING',
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DISK_TYPES = ['B', 'D']
|
|
|
|
|
|
|
|
|
|
|
|
RESOURCE_GROUP_STATUSES = [
|
|
|
|
RESOURCE_GROUP_STATUSES = [
|
|
|
|
'CREATED',
|
|
|
|
'CREATED',
|
|
|
|
'DELETED',
|
|
|
|
'DELETED',
|
|
|
@ -2448,6 +2450,15 @@ class DecortController(object):
|
|
|
|
`/cloudapi/account/listDisks`.
|
|
|
|
`/cloudapi/account/listDisks`.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if disk_type and (
|
|
|
|
|
|
|
|
not disk_type in self.DISK_TYPES
|
|
|
|
|
|
|
|
):
|
|
|
|
|
|
|
|
self.result['msg'] = (
|
|
|
|
|
|
|
|
f'{disk_type} is not valid disk type'
|
|
|
|
|
|
|
|
f' for filtering account disk list.'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
self.amodule.fail_json(**self.result)
|
|
|
|
|
|
|
|
|
|
|
|
sort_by = None
|
|
|
|
sort_by = None
|
|
|
|
if sort_by_field:
|
|
|
|
if sort_by_field:
|
|
|
|
if not sort_by_field in self.FIELDS_FOR_SORTING_ACCOUNT_DISK_LIST:
|
|
|
|
if not sort_by_field in self.FIELDS_FOR_SORTING_ACCOUNT_DISK_LIST:
|
|
|
|