From: Cedric Ollivier Date: Mon, 18 Dec 2017 07:38:31 +0000 (+0000) Subject: Merge "Inject all envs in openrc into CONST" X-Git-Tag: 0.2~156 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=0d71ebc2ddc07f92d1ca1901c3fec53ff1a3af84;p=functest-xtesting.git Merge "Inject all envs in openrc into CONST" --- 0d71ebc2ddc07f92d1ca1901c3fec53ff1a3af84 diff --cc functest/ci/run_tests.py index 48193169,c8143f1e..166dbfc9 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@@ -22,10 -16,9 +22,9 @@@ import o import re import sys import textwrap +import pkg_resources import prettytable - import six import functest.ci.tier_builder as tb import functest.core.testcase as testcase @@@ -106,20 -83,8 +105,8 @@@ class Runner(object) 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...") + LOGGER.debug("Sourcing the OpenStack RC file...") os_utils.source_credentials(rc_file) - for key, value in six.iteritems(os.environ): - if re.search("OS_", key): - if key == 'OS_AUTH_URL': - CONST.__setattr__('OS_AUTH_URL', value) - elif key == 'OS_USERNAME': - CONST.__setattr__('OS_USERNAME', value) - elif key == 'OS_TENANT_NAME': - CONST.__setattr__('OS_TENANT_NAME', value) - elif key == 'OS_PASSWORD': - CONST.__setattr__('OS_PASSWORD', value) - elif key == "OS_PROJECT_DOMAIN_NAME": - CONST.__setattr__('OS_PROJECT_DOMAIN_NAME', value) @staticmethod def get_run_dict(testname):