diff --git a/module_utils/decort_utils.py b/module_utils/decort_utils.py index 7eb3bd1..851d6a1 100644 --- a/module_utils/decort_utils.py +++ b/module_utils/decort_utils.py @@ -1439,7 +1439,7 @@ class DecortController(object): api_resp = self.decort_api_call(requests.post, "/restmachine/cloudapi/image/list", api_params) # On success the above call will return here. On error it will abort execution by calling fail_json. images_list = json.loads(api_resp.content.decode('utf8')) - for image_record in images_list: + for image_record in images_list['data']: if image_record['name'] == virt_name and image_record['status'] == "CREATED" and image_record['type'] == "virtual": if sepid == 0 and pool == "": # if no filtering by SEP ID or pool name is requested, return the first match