aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-21 11:33:39 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-22 10:31:32 +0100
commitfdbfe10922d09ee3dad407b10be0205082dddce3 (patch)
tree4e9045128181f4683f1918ed7ecebecdacd53387 /functest/utils
parent78a21107e377f4f4722fd8d570dc0394f6ae5692 (diff)
Use constants for Functest config file
env_file can't be defined in a config file simply because it's an entry point (Jenkins jobs, end users) Change-Id: Ie23c0ef90efc839d60f0f3a9754c58746b1f3a00 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/utils')
-rw-r--r--functest/utils/constants.py10
-rw-r--r--functest/utils/env.py4
2 files changed, 10 insertions, 4 deletions
diff --git a/functest/utils/constants.py b/functest/utils/constants.py
index d8a1d54d..2184c472 100644
--- a/functest/utils/constants.py
+++ b/functest/utils/constants.py
@@ -8,11 +8,17 @@ 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
- CONFIG_FUNCTEST_YAML = pkg_resources.resource_filename(
- 'functest', 'ci/config_functest.yaml')
+ # 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__):
diff --git a/functest/utils/env.py b/functest/utils/env.py
index 0c0515ba..e75b17d1 100644
--- a/functest/utils/env.py
+++ b/functest/utils/env.py
@@ -37,10 +37,10 @@ def get(env_var):
class Environment(object): # pylint: disable=too-few-public-methods
- # Backward compatibilty (waiting for SDNVPN and SFC)
+ # Backward compatibility (waiting for SDNVPN and SFC)
def __init__(self):
for key, _ in six.iteritems(INPUTS):
setattr(self, key, get(key))
-# Backward compatibilty (waiting for SDNVPN and SFC)
+# Backward compatibility (waiting for SDNVPN and SFC)
ENV = Environment()