summaryrefslogtreecommitdiffstats
path: root/yardstick/common/openstack_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/common/openstack_utils.py')
-rw-r--r--yardstick/common/openstack_utils.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/yardstick/common/openstack_utils.py b/yardstick/common/openstack_utils.py
index 2785230c0..5208a2749 100644
--- a/yardstick/common/openstack_utils.py
+++ b/yardstick/common/openstack_utils.py
@@ -733,7 +733,7 @@ def create_security_group_full(neutron_client, sg_name,
log.debug("Adding ICMP rules in security group '%s'...", sg_name)
if not create_security_group_rule(neutron_client, sg_id,
- 'ingress', 'icmp'):
+ 'ingress', 'icmp'):
log.error("Failed to create the security group rule...")
return None
@@ -797,6 +797,18 @@ def delete_image(glance_client, image_id): # pragma: no cover
return True
+def list_images(shade_client=None):
+ if shade_client is None:
+ shade_client = get_shade_client()
+
+ try:
+ return shade_client.list_images()
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [list_images(shade_client)]."
+ "Exception message, '%s'", o_exc.orig_message)
+ return False
+
+
# *********************************************
# CINDER
# *********************************************