aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/snaps
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack/snaps')
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_test_runner.py3
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_utils.py5
2 files changed, 5 insertions, 3 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py b/functest/opnfv_tests/openstack/snaps/snaps_test_runner.py
index 9d31f426..216d9acf 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:
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_utils.py b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
index 6bc50ad6..59bd063c 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_utils.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
@@ -10,6 +10,7 @@
"""Some common utils wrapping snaps functions """
from functest.utils.constants import CONST
+from functest.utils import env
from snaps.openstack.tests import openstack_tests
from snaps.openstack.utils import neutron_utils, nova_utils
@@ -24,8 +25,8 @@ def get_ext_net_name(os_creds):
"""
neutron = neutron_utils.neutron_client(os_creds)
ext_nets = neutron_utils.get_external_networks(neutron)
- if hasattr(CONST, 'EXTERNAL_NETWORK'):
- extnet_config = CONST.__getattribute__('EXTERNAL_NETWORK')
+ if env.get('EXTERNAL_NETWORK'):
+ extnet_config = env.get('EXTERNAL_NETWORK')
for ext_net in ext_nets:
if ext_net.name == extnet_config:
return extnet_config