From 3b36c06f9223322e23e3885759355593b3c598a3 Mon Sep 17 00:00:00 2001 From: Juha Kosonen Date: Tue, 30 Jan 2018 14:59:05 +0200 Subject: Remove duplicated code related to snaps creds Add support for providing credentials in snaps_utils. JIRA: FUNCTEST-916 Change-Id: I3e027229d213d3791a115920f7012309cc027712 Signed-off-by: Juha Kosonen --- functest/opnfv_tests/openstack/rally/rally.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'functest/opnfv_tests/openstack/rally') diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index b3aaab65..59a67095 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -36,7 +36,6 @@ from snaps.config.network import NetworkConfig, SubnetConfig from snaps.config.router import RouterConfig from snaps.openstack.create_flavor import OpenStackFlavor -from snaps.openstack.tests import openstack_tests from snaps.openstack.utils import deploy_utils LOGGER = logging.getLogger(__name__) @@ -92,20 +91,8 @@ class RallyBase(testcase.TestCase): def __init__(self, **kwargs): """Initialize RallyBase object.""" super(RallyBase, self).__init__(**kwargs) - if 'os_creds' in kwargs: - self.os_creds = kwargs['os_creds'] - else: - creds_override = None - if hasattr(CONST, 'snaps_os_creds_override'): - creds_override = CONST.__getattribute__( - 'snaps_os_creds_override') - - self.os_creds = openstack_tests.get_credentials( - os_env_file=CONST.__getattribute__('openstack_creds'), - overrides=creds_override) - + self.os_creds = kwargs.get('os_creds') or snaps_utils.get_credentials() self.guid = '-' + str(uuid.uuid4()) - self.creators = [] self.mode = '' self.summary = [] -- cgit 1.2.3-korg