diff options
author | Linda Wang <wangwulin@huawei.com> | 2018-01-29 07:37:37 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2018-02-01 14:38:16 +0000 |
commit | 1825aa713952288e4204ea3b38f0d3c0635a6918 (patch) | |
tree | 1f5174de93defbf8e703c73785eaaa118f4a940e /functest/ci | |
parent | 416461c30d5a9a0df38e6c1bdef7061fce2c7eaf (diff) |
Rename a common credential file for OS and K8S
Change-Id: Ib8d24be4b29ab1de00d5dd5e3442146b2437cb94
Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/ci')
-rw-r--r-- | functest/ci/check_deployment.py | 2 | ||||
-rw-r--r-- | functest/ci/config_functest.yaml | 4 | ||||
-rw-r--r-- | functest/ci/run_tests.py | 14 |
3 files changed, 6 insertions, 14 deletions
diff --git a/functest/ci/check_deployment.py b/functest/ci/check_deployment.py index 8d19d850..bf43b537 100644 --- a/functest/ci/check_deployment.py +++ b/functest/ci/check_deployment.py @@ -68,7 +68,7 @@ def get_auth_token(os_creds): class CheckDeployment(object): """ Check deployment class.""" - def __init__(self, rc_file='/home/opnfv/functest/conf/openstack.creds'): + def __init__(self, rc_file='/home/opnfv/functest/conf/env_file'): self.rc_file = rc_file self.services = ('compute', 'network', 'image') self.os_creds = None diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 192a1ee0..ebaccc0c 100644 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -15,9 +15,9 @@ general: functest_images: /home/opnfv/functest/images rally_inst: /root/.rally - openstack: - creds: /home/opnfv/functest/conf/openstack.creds + env_file: /home/opnfv/functest/conf/env_file + openstack: image_name: Cirros-0.4.0 image_name_alt: Cirros-0.4.0-1 image_file_name: cirros-0.4.0-x86_64-disk.img diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 7cba0efb..feef7d6a 100644 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -99,16 +99,6 @@ class Runner(object): pkg_resources.resource_filename('functest', 'ci/testcases.yaml')) @staticmethod - def source_rc_file(): - """Set the environmental vars from openstack.creds""" - - rc_file = CONST.__getattribute__('openstack_creds') - if not os.path.isfile(rc_file): - raise Exception("RC file %s does not exist..." % rc_file) - LOGGER.debug("Sourcing the OpenStack RC file...") - os_utils.source_credentials(rc_file) - - @staticmethod def get_run_dict(testname): """Obtain the 'run' block of the testcase from testcases.yaml""" try: @@ -211,7 +201,9 @@ class Runner(object): self.report_flag = kwargs['report'] try: if 'test' in kwargs: - self.source_rc_file() + LOGGER.debug("Sourcing the credential file...") + os_utils.source_credentials(CONST.__getattribute__('env_file')) + LOGGER.debug("Test args: %s", kwargs['test']) if self.tiers.get_tier(kwargs['test']): self.run_tier(self.tiers.get_tier(kwargs['test'])) |