Merge "Inject all envs in openrc into CONST"
authorCedric Ollivier <cedric.ollivier@orange.com>
Mon, 18 Dec 2017 07:38:31 +0000 (07:38 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 18 Dec 2017 07:38:31 +0000 (07:38 +0000)
1  2 
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):