aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-12-15 02:57:26 +0000
committerLinda Wang <wangwulin@huawei.com>2017-12-15 03:57:36 +0000
commit6a2ee8883daf1795ec84fc2868c17c0723025447 (patch)
tree84aa49757c5c80e406293b6b090f3c0ae04e8d48 /functest/utils
parentfc0d8c601ce627d5f7b8c5e3eef73bd01c6db7d4 (diff)
Inject all envs in openrc into CONST
After "env_prepare" is removed, some specific vars in openrc (eg,."EXTERNAL_NETWORK") loaded to os.environ should be injected into CONST in one python process. Change-Id: Iaa5c6047033dc2a30c533174e2016111759aec31 Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/utils')
-rw-r--r--functest/utils/openstack_utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index b479198d2..1d7cdafb9 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -127,6 +127,7 @@ def source_credentials(rc_file):
key = re.sub(r'^["\' ]*|[ \'"]*$', '', var[0])
value = re.sub(r'^["\' ]*|[ \'"]*$', '', "".join(var[1:]))
os.environ[key] = value
+ CONST.__setattr__(key, value)
def get_session_auth(other_creds={}):