diff options
author | George Paraskevopoulos <geopar@intracom-telecom.com> | 2016-11-08 14:33:19 +0200 |
---|---|---|
committer | Romanos Skiadas <rski@intracom-telecom.com> | 2016-11-18 16:49:19 +0200 |
commit | 5b2b4922740b2f189b1be2192d8e405fb9a535bb (patch) | |
tree | b30e81f711f111c943959647c67611466724fa85 /test/functest/utils.py | |
parent | 9492d419754c44ea38e6751a91b0c3625afccb07 (diff) |
Refactor config global variables
- Create config.py module to handle configuration parsing
- Remove globals from testcases
Change-Id: I16ed7bb138fde2d5d3c69703e3c2e569d49f0b37
Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
Diffstat (limited to 'test/functest/utils.py')
-rw-r--r-- | test/functest/utils.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/functest/utils.py b/test/functest/utils.py index b75cb3b..351797b 100644 --- a/test/functest/utils.py +++ b/test/functest/utils.py @@ -9,21 +9,16 @@ # import sys import time -import os import functest.utils.functest_logger as ft_logger -import functest.utils.functest_utils as ft_utils import functest.utils.openstack_utils as os_utils import re +import config as sdnvpn_config logger = ft_logger.Logger("sndvpn_test_utils").getLogger() -REPO_PATH = os.environ['repos_dir'] + '/sdnvpn/' -config_file = REPO_PATH + 'test/functest/config.yaml' - -DEFAULT_FLAVOR = ft_utils.get_parameter_from_yaml( - "defaults.flavor", config_file) +common_config = sdnvpn_config.CommonConfig() def create_net(neutron_client, name): @@ -94,7 +89,7 @@ def create_instance(nova_client, **kwargs ): if 'flavor' not in kwargs: - kwargs['flavor'] = DEFAULT_FLAVOR + kwargs['flavor'] = common_config.default_flavor logger.info("Creating instance '%s'..." % name) logger.debug( |