aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
Diffstat (limited to 'functest/utils')
-rw-r--r--functest/utils/constants.py20
-rw-r--r--functest/utils/env.py13
-rw-r--r--functest/utils/functest_utils.py4
3 files changed, 2 insertions, 35 deletions
diff --git a/functest/utils/constants.py b/functest/utils/constants.py
index 2184c472..0bc00d80 100644
--- a/functest/utils/constants.py
+++ b/functest/utils/constants.py
@@ -3,28 +3,8 @@
# pylint: disable=missing-docstring
import pkg_resources
-import six
-
-from functest.utils import config
-from functest.utils import env
CONFIG_FUNCTEST_YAML = pkg_resources.resource_filename(
'functest', 'ci/config_functest.yaml')
ENV_FILE = '/home/opnfv/functest/conf/env_file'
-
-
-class Constants(object): # pylint: disable=too-few-public-methods
-
- # Backward compatibility (waiting for SDNVPN and SFC)
- CONFIG_FUNCTEST_YAML = CONFIG_FUNCTEST_YAML
- env_file = ENV_FILE
-
- def __init__(self):
- for attr_n, attr_v in six.iteritems(config.CONF.__dict__):
- setattr(self, attr_n, attr_v)
- for env_n, env_v in six.iteritems(env.ENV.__dict__):
- setattr(self, env_n, env_v)
-
-
-CONST = Constants()
diff --git a/functest/utils/env.py b/functest/utils/env.py
index e75b17d1..ed09d9f0 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -11,8 +11,6 @@
import os
-import six
-
INPUTS = {
'EXTERNAL_NETWORK': None,
'CI_LOOP': 'daily',
@@ -33,14 +31,3 @@ def get(env_var):
if env_var not in INPUTS.keys():
return os.environ.get(env_var, None)
return os.environ.get(env_var, INPUTS[env_var])
-
-
-class Environment(object): # pylint: disable=too-few-public-methods
-
- # Backward compatibility (waiting for SDNVPN and SFC)
- def __init__(self):
- for key, _ in six.iteritems(INPUTS):
- setattr(self, key, get(key))
-
-# Backward compatibility (waiting for SDNVPN and SFC)
-ENV = Environment()
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py
index 72c9d207..38a60d49 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -157,13 +157,13 @@ def get_parameter_from_yaml(parameter, yfile):
def get_functest_config(parameter):
- yaml_ = constants.Constants.CONFIG_FUNCTEST_YAML
+ yaml_ = constants.CONFIG_FUNCTEST_YAML
return get_parameter_from_yaml(parameter, yaml_)
def get_functest_yaml():
# pylint: disable=bad-continuation
- with open(constants.Constants.CONFIG_FUNCTEST_YAML) as yaml_fd:
+ with open(constants.CONFIG_FUNCTEST_YAML) as yaml_fd:
functest_yaml = yaml.safe_load(yaml_fd)
return functest_yaml