Update logic to only request RG resources info if the RG is not deleted.
This commit is contained in:
@@ -1593,6 +1593,9 @@ class DecortController(object):
|
|||||||
ret_rg_dict = api_rg_resp.json()
|
ret_rg_dict = api_rg_resp.json()
|
||||||
|
|
||||||
# Get RG resources info
|
# Get RG resources info
|
||||||
|
rg_status = ret_rg_dict.get('status')
|
||||||
|
if not rg_status or rg_status == 'DELETED':
|
||||||
|
return ret_rg_id, ret_rg_dict
|
||||||
api_rg_res_resp = self.decort_api_call(
|
api_rg_res_resp = self.decort_api_call(
|
||||||
arg_req_function=requests.post,
|
arg_req_function=requests.post,
|
||||||
arg_api_name='/restmachine/cloudapi/rg/getResourceConsumption',
|
arg_api_name='/restmachine/cloudapi/rg/getResourceConsumption',
|
||||||
|
|||||||
Reference in New Issue
Block a user