diff options
author | Jose Lausuch <jose.lausuch@ericsson.com> | 2017-06-26 10:06:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-06-26 10:06:41 +0000 |
commit | 4252d177e9ccb0e533b74751008d7f8d5ab57840 (patch) | |
tree | ef83382cc610dffb89bd8708b015983ca2c6b0c2 /functest/utils/openstack_utils.py | |
parent | c8d5216c01c42f0e090f9b441985f8ebc3eca0ed (diff) | |
parent | 5cfd8ce686f8b539d01a3e7e009e7d5a18b8228f (diff) |
Merge "Use glance to list images"
Diffstat (limited to 'functest/utils/openstack_utils.py')
-rw-r--r-- | functest/utils/openstack_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py index 354a562e..a50bf179 100644 --- a/functest/utils/openstack_utils.py +++ b/functest/utils/openstack_utils.py @@ -1188,9 +1188,9 @@ def delete_security_group(neutron_client, secgroup_id): # ********************************************* # GLANCE # ********************************************* -def get_images(nova_client): +def get_images(glance_client): try: - images = nova_client.images.list() + images = glance_client.images.list() return images except Exception as e: logger.error("Error [get_images]: %s" % e) @@ -1254,12 +1254,12 @@ def get_or_create_image(name, path, format): return image_exists, image_id -def delete_glance_image(nova_client, image_id): +def delete_glance_image(glance_client, image_id): try: - nova_client.images.delete(image_id) + glance_client.images.delete(image_id) return True except Exception as e: - logger.error("Error [delete_glance_image(nova_client, '%s')]: %s" + logger.error("Error [delete_glance_image(glance_client, '%s')]: %s" % (image_id, e)) return False |