diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-08-24 14:23:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-08-24 14:23:39 +0000 |
commit | 1da439765b20bbc9a1f63d736f4c6284b654d50d (patch) | |
tree | 0a21706812bd6ca0161c4dc2fc2d8ecc76383029 /functest/opnfv_tests/openstack | |
parent | 671b3356e8fc7c6219919f978a3dee6b69e8c663 (diff) | |
parent | b58e9f7b713e53b70b45ca3d13c0fcf0ed93e801 (diff) |
Merge "Added means to override the RC file credentials."
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r-- | functest/opnfv_tests/openstack/snaps/snaps_test_runner.py | 7 | ||||
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_base.py | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py index 0b87440b..19c6a87f 100644 --- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py +++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py @@ -28,9 +28,14 @@ class SnapsTestRunner(unit.Suite): 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'), - proxy_settings_str=None, ssh_proxy_cmd=None) + proxy_settings_str=None, ssh_proxy_cmd=None, + overrides=creds_override) if 'ext_net_name' in kwargs: self.ext_net_name = kwargs['ext_net_name'] diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index f3e0cfe3..40fcb07f 100644 --- a/functest/opnfv_tests/openstack/vping/vping_base.py +++ b/functest/opnfv_tests/openstack/vping/vping_base.py @@ -43,8 +43,14 @@ class VPingBase(testcase.TestCase): 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')) + os_env_file=CONST.__getattribute__('openstack_creds'), + overrides=creds_override) self.creators = list() self.image_creator = None |