aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/openstack_utils.py
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-06-23 05:11:31 +0000
committerLinda Wang <wangwulin@huawei.com>2017-06-24 02:21:35 +0000
commit5cfd8ce686f8b539d01a3e7e009e7d5a18b8228f (patch)
tree0b90754180bcbc4626e3961a3684811801aa53a3 /functest/utils/openstack_utils.py
parente62f0f289621c843e60f21f69a8e87e7d2778f36 (diff)
Use glance to list images
1. Images list is not supported by novaclient 8.0.0 2. It moves images list out of nova and into glance Change-Id: I2a2d40a2ca3a0cf1ebfb55697b3c58af8748a805 Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/utils/openstack_utils.py')
-rw-r--r--functest/utils/openstack_utils.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index f155449d..3e27d672 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -1192,9 +1192,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)
@@ -1258,12 +1258,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