Merge "Stop using aliases for creds manager"

This commit is contained in:
Jenkins 2017-05-10 19:50:05 +00:00 committed by Gerrit Code Review
commit 5354a3b553
4 changed files with 24 additions and 20 deletions

View File

@ -80,11 +80,12 @@ class BaseArtifactsTest(base.BaseTestCase):
if not CONF.service_available.murano:
skip_msg = "Murano is disabled"
raise cls.skipException(skip_msg)
if not hasattr(cls, "os"):
if not hasattr(cls, "os_primary"):
creds = cls.get_configured_isolated_creds(type_of_creds='primary')
cls.os = clients.Manager(credentials=creds)
cls.artifacts_client = cls.os.artifacts_client
cls.application_catalog_client = cls.os.application_catalog_client
cls.os_primary = clients.Manager(credentials=creds)
cls.artifacts_client = cls.os_primary.artifacts_client
cls.application_catalog_client = \
cls.os_primary.application_catalog_client
@classmethod
def resource_cleanup(cls):

View File

@ -81,11 +81,12 @@ class BaseApplicationCatalogTest(base.BaseTestCase):
if not CONF.service_available.murano:
skip_msg = "Murano is disabled"
raise cls.skipException(skip_msg)
if not hasattr(cls, "os"):
if not hasattr(cls, "os_primary"):
creds = cls.get_configured_isolated_creds(type_of_creds='primary')
cls.os = clients.Manager(credentials=creds)
cls.application_catalog_client = cls.os.application_catalog_client
cls.artifacts_client = cls.os.artifacts_client
cls.os_primary = clients.Manager(credentials=creds)
cls.application_catalog_client = \
cls.os_primary.application_catalog_client
cls.artifacts_client = cls.os_primary.artifacts_client
@classmethod
def resource_cleanup(cls):
@ -122,7 +123,7 @@ class BaseApplicationCatalogAdminTest(BaseApplicationCatalogTest):
@classmethod
def resource_setup(cls):
cls.os = clients.Manager()
cls.os_primary = clients.Manager()
super(BaseApplicationCatalogAdminTest, cls).resource_setup()
@ -131,5 +132,5 @@ class BaseApplicationCatalogIsolatedAdminTest(BaseApplicationCatalogTest):
@classmethod
def resource_setup(cls):
creds = cls.get_configured_isolated_creds(type_of_creds='admin')
cls.os = clients.Manager(credentials=creds)
cls.os_primary = clients.Manager(credentials=creds)
super(BaseApplicationCatalogIsolatedAdminTest, cls).resource_setup()

View File

@ -76,14 +76,15 @@ class BaseServiceBrokerTest(base.BaseTestCase):
if not CONF.service_available.murano:
skip_msg = "Murano is disabled"
raise cls.skipException(skip_msg)
if not hasattr(cls, "os"):
if not hasattr(cls, "os_primary"):
cls.username = CONF.identity.username
cls.password = CONF.identity.password
cls.tenant_name = CONF.identity.tenant_name
cls.verify_nonempty(cls.username, cls.password, cls.tenant_name)
cls.os = clients.Manager()
cls.service_broker_client = cls.os.service_broker_client
cls.application_catalog_client = cls.os.application_catalog_client
cls.os_primary = clients.Manager()
cls.service_broker_client = cls.os_primary.service_broker_client
cls.application_catalog_client = \
cls.os_primary.application_catalog_client
def setUp(self):
super(BaseServiceBrokerTest, self).setUp()
@ -129,5 +130,5 @@ class BaseServiceBrokerAdminTest(BaseServiceBrokerTest):
@classmethod
def resource_setup(cls):
cls.os = clients.Manager()
cls.os_primary = clients.Manager()
super(BaseServiceBrokerAdminTest, cls).resource_setup()

View File

@ -88,14 +88,15 @@ class BaseApplicationCatalogScenarioTest(base.BaseTestCase):
if not CONF.service_available.murano:
skip_msg = "Murano is disabled"
raise cls.skipException(skip_msg)
if not hasattr(cls, "os"):
if not hasattr(cls, "os_primary"):
creds = cls.get_configured_isolated_creds(type_of_creds='primary')
cls.os = clients.Manager(credentials=creds)
cls.os_primary = clients.Manager(credentials=creds)
cls.services_manager = services_manager(creds)
cls.linux_image = CONF.application_catalog.linux_image
cls.application_catalog_client = cls.os.application_catalog_client
cls.artifacts_client = cls.os.artifacts_client
cls.application_catalog_client = \
cls.os_primary.application_catalog_client
cls.artifacts_client = cls.os_primary.artifacts_client
cls.servers_client = cls.services_manager.servers_client
cls.orchestration_client = cls.services_manager.orchestration_client
cls.snapshots_client = cls.services_manager.snapshots_v2_client
@ -400,7 +401,7 @@ class BaseApplicationCatalogScenarioIsolatedAdminTest(
@classmethod
def resource_setup(cls):
creds = cls.get_configured_isolated_creds(type_of_creds='admin')
cls.os = clients.Manager(credentials=creds)
cls.os_primary = clients.Manager(credentials=creds)
cls.services_manager = services_manager(creds)
super(BaseApplicationCatalogScenarioIsolatedAdminTest, cls).\
resource_setup()