Scenario manager: don't access glance_client if Glance is not available
Without this patch, if Glance is not enabled, then no Tempest scenario
can be executed because scenario/manager.py tries to access the
`image_client` attribute during its initialization. But `image_client`
is defined only if CONF.service_available.glance is true.
Change-Id: Ib8d317608ac6a13438581f389b42064772908ef9
Closes-Bug: #1513474
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index e5e0d16..0557d06 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -49,8 +49,9 @@
cls.flavors_client = cls.manager.flavors_client
cls.compute_floating_ips_client = (
cls.manager.compute_floating_ips_client)
- # Glance image client v1
- cls.image_client = cls.manager.image_client
+ if CONF.service_available.glance:
+ # Glance image client v1
+ cls.image_client = cls.manager.image_client
# Compute image client
cls.images_client = cls.manager.images_client
cls.keypairs_client = cls.manager.keypairs_client