diff --git a/murano_tempest_tests/tests/api/application_catalog/artifacts/base.py b/murano_tempest_tests/tests/api/application_catalog/artifacts/base.py index 7e36d8da1..42816a85d 100644 --- a/murano_tempest_tests/tests/api/application_catalog/artifacts/base.py +++ b/murano_tempest_tests/tests/api/application_catalog/artifacts/base.py @@ -14,7 +14,6 @@ # under the License. from tempest.common import credentials_factory as common_creds -from tempest.common import dynamic_creds from tempest import config from tempest.lib import base @@ -54,20 +53,19 @@ class BaseArtifactsTest(base.BaseTestCase): cls.admin_role = CONF.identity.admin_role else: cls.admin_role = 'admin' - cls.dynamic_cred = dynamic_creds.DynamicCredentialProvider( - identity_version=CONF.identity.auth_version, - name=cls.__name__, admin_role=cls.admin_role, - admin_creds=common_creds.get_configured_admin_credentials( - 'identity_admin')) + cls.credentials = common_creds.get_credentials_provider( + name=cls.__name__, + force_tenant_isolation=CONF.auth.use_dynamic_credentials, + identity_version=CONF.identity.auth_version) if type_of_creds == 'primary': - creds = cls.dynamic_cred.get_primary_creds() + creds = cls.credentials.get_primary_creds() elif type_of_creds == 'admin': - creds = cls.dynamic_cred.get_admin_creds() + creds = cls.credentials.get_admin_creds() elif type_of_creds == 'alt': - creds = cls.dynamic_cred.get_alt_creds() + creds = cls.credentials.get_alt_creds() else: - creds = cls.dynamic_cred.get_credentials(type_of_creds) - cls.dynamic_cred.type_of_creds = type_of_creds + creds = cls.credentials.get_credentials(type_of_creds) + cls.credentials.type_of_creds = type_of_creds return creds.credentials @@ -95,7 +93,7 @@ class BaseArtifactsTest(base.BaseTestCase): @classmethod def clear_isolated_creds(cls): if hasattr(cls, "dynamic_cred"): - cls.dynamic_cred.clear_creds() + cls.credentials.clear_creds() @classmethod def upload_package(cls, application_name, version=None, require=None): diff --git a/murano_tempest_tests/tests/api/application_catalog/base.py b/murano_tempest_tests/tests/api/application_catalog/base.py index 9d815bc43..7dbb7ad5f 100644 --- a/murano_tempest_tests/tests/api/application_catalog/base.py +++ b/murano_tempest_tests/tests/api/application_catalog/base.py @@ -14,7 +14,6 @@ # under the License. from tempest.common import credentials_factory as common_creds -from tempest.common import dynamic_creds from tempest import config from tempest.lib import base @@ -55,20 +54,19 @@ class BaseApplicationCatalogTest(base.BaseTestCase): else: cls.admin_role = 'admin' if not hasattr(cls, 'dynamic_cred'): - cls.dynamic_cred = dynamic_creds.DynamicCredentialProvider( - identity_version=CONF.identity.auth_version, - name=cls.__name__, admin_role=cls.admin_role, - admin_creds=common_creds.get_configured_admin_credentials( - 'identity_admin')) + cls.credentials = common_creds.get_credentials_provider( + name=cls.__name__, + force_tenant_isolation=CONF.auth.use_dynamic_credentials, + identity_version=CONF.identity.auth_version) if type_of_creds == 'primary': - creds = cls.dynamic_cred.get_primary_creds() + creds = cls.credentials.get_primary_creds() elif type_of_creds == 'admin': - creds = cls.dynamic_cred.get_admin_creds() + creds = cls.credentials.get_admin_creds() elif type_of_creds == 'alt': - creds = cls.dynamic_cred.get_alt_creds() + creds = cls.credentials.get_alt_creds() else: - creds = cls.dynamic_cred.get_credentials(type_of_creds) - cls.dynamic_cred.type_of_creds = type_of_creds + creds = cls.credentials.get_credentials(type_of_creds) + cls.credentials.type_of_creds = type_of_creds return creds.credentials @@ -96,7 +94,7 @@ class BaseApplicationCatalogTest(base.BaseTestCase): @classmethod def clear_isolated_creds(cls): if hasattr(cls, "dynamic_cred"): - cls.dynamic_cred.clear_creds() + cls.credentials.clear_creds() @staticmethod def _get_demo_app(): diff --git a/murano_tempest_tests/tests/api/service_broker/base.py b/murano_tempest_tests/tests/api/service_broker/base.py index 8fe7fd3c9..23fde6944 100644 --- a/murano_tempest_tests/tests/api/service_broker/base.py +++ b/murano_tempest_tests/tests/api/service_broker/base.py @@ -16,7 +16,7 @@ import json import time -from tempest.common import dynamic_creds +from tempest.common import credentials_factory as common_creds from tempest import config from tempest.lib import base from tempest.lib import exceptions @@ -42,17 +42,17 @@ class BaseServiceBrokerTest(base.BaseTestCase): @classmethod def get_client_with_isolated_creds(cls, name=None, type_of_creds="admin"): - - cls.dynamic_cred = dynamic_creds.DynamicCredentialProvider( - identity_version=CONF.identity.auth_version, - name=cls.__name__) + cls.credentials = common_creds.get_credentials_provider( + name=cls.__name__, + force_tenant_isolation=CONF.auth.use_dynamic_credentials, + identity_version=CONF.identity.auth_version) if "admin" in type_of_creds: - creds = cls.dynamic_cred.get_admin_creds() + creds = cls.credentials.get_admin_creds() elif "alt" in type_of_creds: - creds = cls.dynamic_cred.get_alt_creds() + creds = cls.credentials.get_alt_creds() else: - creds = cls.dynamic_cred.get_credentials(type_of_creds) - cls.dynamic_cred.type_of_creds = type_of_creds + creds = cls.credentials.get_credentials(type_of_creds) + cls.credentials.type_of_creds = type_of_creds os = clients.Manager(credentials=creds) client = os.service_broker_client @@ -96,7 +96,7 @@ class BaseServiceBrokerTest(base.BaseTestCase): @classmethod def clear_isolated_creds(cls): if hasattr(cls, "dynamic_cred"): - cls.dynamic_cred.clear_creds() + cls.credentials.clear_creds() def wait_for_result(self, instance_id, timeout): start_time = time.time() diff --git a/murano_tempest_tests/tests/scenario/application_catalog/base.py b/murano_tempest_tests/tests/scenario/application_catalog/base.py index 41b7a11c2..dc2703d44 100644 --- a/murano_tempest_tests/tests/scenario/application_catalog/base.py +++ b/murano_tempest_tests/tests/scenario/application_catalog/base.py @@ -19,7 +19,6 @@ import time from tempest.clients import Manager as services_manager from tempest.common import credentials_factory as common_creds -from tempest.common import dynamic_creds from tempest.common import waiters from tempest import config from tempest.lib import base @@ -62,20 +61,19 @@ class BaseApplicationCatalogScenarioTest(base.BaseTestCase): else: cls.admin_role = 'admin' if not hasattr(cls, 'dynamic_cred'): - cls.dynamic_cred = dynamic_creds.DynamicCredentialProvider( - identity_version=CONF.identity.auth_version, - name=cls.__name__, admin_role=cls.admin_role, - admin_creds=common_creds.get_configured_admin_credentials( - 'identity_admin')) + cls.credentials = common_creds.get_credentials_provider( + name=cls.__name__, + force_tenant_isolation=CONF.auth.use_dynamic_credentials, + identity_version=CONF.identity.auth_version) if type_of_creds == 'primary': - creds = cls.dynamic_cred.get_primary_creds() + creds = cls.credentials.get_primary_creds() elif type_of_creds == 'admin': - creds = cls.dynamic_cred.get_admin_creds() + creds = cls.credentials.get_admin_creds() elif type_of_creds == 'alt': - creds = cls.dynamic_cred.get_alt_creds() + creds = cls.credentials.get_alt_creds() else: - creds = cls.dynamic_cred.get_credentials(type_of_creds) - cls.dynamic_cred.type_of_creds = type_of_creds + creds = cls.credentials.get_credentials(type_of_creds) + cls.credentials.type_of_creds = type_of_creds return creds.credentials @@ -118,7 +116,7 @@ class BaseApplicationCatalogScenarioTest(base.BaseTestCase): @classmethod def clear_isolated_creds(cls): if hasattr(cls, "dynamic_cred"): - cls.dynamic_cred.clear_creds() + cls.credentials.clear_creds() def environment_delete(self, environment_id, timeout=180): self.application_catalog_client.delete_environment(environment_id)