aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-06-29 14:31:08 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-08-21 08:20:19 -0600
commitb58e9f7b713e53b70b45ca3d13c0fcf0ed93e801 (patch)
tree2ec4b2e34fff2bc340966cea6255dadae91e5397 /functest/opnfv_tests
parentcfd987a6ce153be88413a38ade2bea3af2f32dcd (diff)
Added means to override the RC file credentials.
This has been done primarily to support tests using SNAPS-OO JIRA: FUNCTEST-847 Change-Id: Icf02c085a95c20d4088e5aafd6380c70689a4ee0 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py7
-rw-r--r--functest/opnfv_tests/openstack/vping/vping_base.py8
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 74fbce1b..967472fa 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