Merge "Increase support for isolated tenants in scenario"
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 9f97964..e2ff1a7 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -220,16 +220,29 @@
cls.os_resources = []
@classmethod
- def credentials(cls):
+ def _get_credentials(cls, get_creds, prefix):
if cls.config.compute.allow_tenant_isolation:
- return cls.isolated_creds.get_primary_creds()
+ return get_creds()
- username = cls.config.identity.username
- password = cls.config.identity.password
- tenant_name = cls.config.identity.tenant_name
+ username = getattr(cls.config.identity, prefix + 'username')
+ password = getattr(cls.config.identity, prefix + 'password')
+ tenant_name = getattr(cls.config.identity, prefix + 'tenant_name')
return username, tenant_name, password
@classmethod
+ def credentials(cls):
+ return cls._get_credentials(cls.isolated_creds.get_primary_creds, '')
+
+ @classmethod
+ def alt_credentials(cls):
+ return cls._get_credentials(cls.isolated_creds.get_alt_creds, 'alt_')
+
+ @classmethod
+ def admin_credentials(cls):
+ return cls._get_credentials(cls.isolated_creds.get_admin_creds,
+ 'admin_')
+
+ @classmethod
def tearDownClass(cls):
# NOTE(jaypipes): Because scenario tests are typically run in a
# specific order, and because test methods in scenario tests