diff --git a/module_utils/decort_utils.py b/module_utils/decort_utils.py index 72b119d..847632d 100644 --- a/module_utils/decort_utils.py +++ b/module_utils/decort_utils.py @@ -1924,7 +1924,7 @@ class DecortController(object): # Parse response to see if a account matching arg_account_name is found in the output # If it is found, assign its ID to the return variable and copy dictionary with the facts accounts_list = json.loads(api_resp.content.decode('utf8')) - for runner in accounts_list: + for runner in accounts_list['data']: if runner['name'] == account_name: # get detailed information about the account from "accounts/get" call as # "accounts/list" does not return all necessary fields @@ -2029,7 +2029,7 @@ class DecortController(object): if api_resp.status_code == 200: ret_gpu_list = json.loads(api_resp.content.decode('utf8')) - return ret_gpu_list + return ret_gpu_list['data'] ################################### # Workflow callback stub methods - not fully implemented yet @@ -2087,7 +2087,7 @@ class DecortController(object): if location_code == "" and locations: ret_gid = locations['data'][0]['gid'] else: - for runner in locations: + for runner in locations['data']: if runner['locationCode'] == location_code: # location code matches ret_gid = runner['gid'] @@ -3037,7 +3037,7 @@ class DecortController(object): return all_rules filtered_rules = [] - for runner in all_rules: + for runner in all_rules['data']: if runner['vmId'] == comp_id: filtered_rules.append(runner)