aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/openstack_utils.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-08 18:55:08 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-08 19:24:34 +0100
commit181e6d6e4828711744d451185d64c5c4939824fe (patch)
tree18722b0e324de7e11234c22dc44efd3d429dd262 /functest/utils/openstack_utils.py
parent89bb80232f777b0619d4168b292338c16a0a704c (diff)
Move source_credentials() into run_tests.py
It's also renamed source_envfile(). Change-Id: I0e7c38c2def125961f86dc2bc9a63cfb6ad87c03 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/utils/openstack_utils.py')
-rw-r--r--functest/utils/openstack_utils.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/functest/utils/openstack_utils.py b/functest/utils/openstack_utils.py
index 655ca464..f7069a63 100644
--- a/functest/utils/openstack_utils.py
+++ b/functest/utils/openstack_utils.py
@@ -10,7 +10,6 @@
import logging
import os.path
-import re
import sys
import time
@@ -115,21 +114,6 @@ def get_credentials(other_creds={}):
return creds
-def source_credentials(rc_file):
- with open(rc_file, "r") as f:
- for line in f:
- var = (line.rstrip('"\n').replace('export ', '').split("=")
- if re.search(r'(.*)=(.*)', line) else None)
- # The two next lines should be modified as soon as rc_file
- # conforms with common rules. Be aware that it could induce
- # issues if value starts with '
- if var:
- 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={}):
loader = loading.get_plugin_loader('password')
creds = get_credentials(other_creds)