From fdbfe10922d09ee3dad407b10be0205082dddce3 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 21 Feb 2018 11:33:39 +0100 Subject: Use constants for Functest config file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- functest/utils/constants.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'functest/utils/constants.py') diff --git a/functest/utils/constants.py b/functest/utils/constants.py index d8a1d54d1..2184c472f 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__): -- cgit 1.2.3-korg