aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-14 16:02:53 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-16 10:24:22 +0100
commitd589e4e5345ed82c68d9a011ac89f8cdbefe2ca3 (patch)
tree1ec221f1f95e6abaec9b1465e9e46b76f8777a27 /functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
parent98e2806cb674d206dea65647c0644dc5b2871b4b (diff)
Get properly env vars or their default values
It defines env.get() as an unique way to get Functest env vars or their default values. It can be considered as a wrapper above os.environ. It enforces backward compatibility via CONST which mustn't be used for that purpose. It should be noted that it also stops using CONST for getting OpenStack env vars. Change-Id: I333dc1afbc0123166a7eaff8b551370098efa341 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/snaps/snaps_test_runner.py')
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
index 9d31f426c..216d9acf6 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
@@ -15,6 +15,7 @@ import logging
from functest.core import unit
from functest.opnfv_tests.openstack.snaps import snaps_utils
from functest.utils.constants import CONST
+from functest.utils import env
from snaps.openstack import create_flavor
@@ -44,7 +45,7 @@ class SnapsTestRunner(unit.Suite):
CONST.__getattribute__('snaps_use_floating_ips') == 'True')
self.use_keystone = (
CONST.__getattribute__('snaps_use_keystone') == 'True')
- scenario = CONST.__getattribute__('DEPLOY_SCENARIO')
+ scenario = env.get('DEPLOY_SCENARIO')
self.flavor_metadata = None
if 'ovs' in scenario or 'fdio' in scenario: