tempest: allow usage of scenario-img for autoscaling
When tempest is not run by devstack the image name for scenario is different.
This change allows to use it.
Change-Id: I4493e61df8723d510766a79295a4d477c793ef24
diff --git a/ceilometer/tests/tempest/scenario/test_autoscaling.py b/ceilometer/tests/tempest/scenario/test_autoscaling.py
index 3b0217b..bed56c3 100644
--- a/ceilometer/tests/tempest/scenario/test_autoscaling.py
+++ b/ceilometer/tests/tempest/scenario/test_autoscaling.py
@@ -66,11 +66,14 @@
images = cls.os_admin.image_client_v2.list_images()["images"]
for img in images:
name = img["name"]
- if name.startswith("cirros") and name.endswith("-uec"):
+ # devstack or tempest format
+ if ((name.startswith("cirros") and name.endswith("-uec")) or
+ name == 'scenario-img'):
os.environ["GLANCE_IMAGE_NAME"] = name
break
+
else:
- cls.skipException("A cirros-.*-uec image is required")
+ cls.skipException("A cirros-.*-uec/cirros image is required")
@staticmethod
def clear_credentials():