aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/refstack_client
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-02-13 10:15:27 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-13 10:15:27 +0000
commit03ed2e069ddf8fc82428def13862d06bb8e4b105 (patch)
treef9f6372330d2b20df244b7aa70a0e7cf53c29bc1 /functest/opnfv_tests/openstack/refstack_client
parentae6798b7018e609d7a4833599e7915cebc258ac5 (diff)
parent26a736ea4414616f509b4a161fe06970df832436 (diff)
Merge "Export env vars instead of CONST in refstack"
Diffstat (limited to 'functest/opnfv_tests/openstack/refstack_client')
-rw-r--r--functest/opnfv_tests/openstack/refstack_client/refstack_client.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
index 4e8f58b6..cb2ba220 100644
--- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
+++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py
@@ -26,7 +26,6 @@ from functest.energy import energy
from functest.opnfv_tests.openstack.refstack_client.tempest_conf \
import TempestConf
from functest.opnfv_tests.openstack.tempest import conf_utils
-from functest.utils.constants import CONST
import functest.utils.functest_utils as ft_utils
__author__ = ("Matthew Li <matthew.lijun@huawei.com>,"
@@ -58,8 +57,8 @@ class RefstackClient(testcase.TestCase):
'functest', 'opnfv_tests/openstack/refstack_client/defcore.txt')
self.testlist = None
self.insecure = ''
- if ('https' in CONST.__getattribute__('OS_AUTH_URL') and
- CONST.__getattribute__('OS_INSECURE').lower() == 'true'):
+ if ('https' in os.environ['OS_AUTH_URL'] and
+ os.getenv('OS_INSECURE', '').lower() == 'true'):
self.insecure = '-k'
def generate_conf(self):
@@ -89,9 +88,9 @@ class RefstackClient(testcase.TestCase):
f_env.write(
("Refstack environment:\n"
" SUT: {}\n Scenario: {}\n Node: {}\n Date: {}\n")
- .format(CONST.__getattribute__('INSTALLER_TYPE'),
- CONST.__getattribute__('DEPLOY_SCENARIO'),
- CONST.__getattribute__('NODE_NAME'),
+ .format(os.getenv('INSTALLER_TYPE', None),
+ os.getenv('DEPLOY_SCENARIO', None),
+ os.getenv('NODE_NAME', 'unknown_pod'),
time.strftime("%a %b %d %H:%M:%S %Z %Y")))
with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,