aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
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/opnfv_tests
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/opnfv_tests')
-rw-r--r--functest/opnfv_tests/openstack/snaps/snaps_utils.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/functest/opnfv_tests/openstack/snaps/snaps_utils.py b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
index 4b1c9352..fc03ee9b 100644
--- a/functest/opnfv_tests/openstack/snaps/snaps_utils.py
+++ b/functest/opnfv_tests/openstack/snaps/snaps_utils.py
@@ -9,7 +9,7 @@
"""Some common utils wrapping snaps functions """
-from functest.utils.constants import CONST
+from functest.utils import constants
from functest.utils import env
from snaps.openstack.tests import openstack_tests
@@ -52,10 +52,9 @@ def get_credentials(proxy_settings_str=None, ssh_proxy_cmd=None):
:return: an instance of snaps OSCreds object
"""
creds_override = None
- if hasattr(CONST, 'snaps_os_creds_override'):
- creds_override = getattr(CONST, 'snaps_os_creds_override')
+ if hasattr(constants.CONST, 'snaps_os_creds_override'):
+ creds_override = getattr(constants.CONST, 'snaps_os_creds_override')
os_creds = openstack_tests.get_credentials(
- os_env_file=getattr(CONST, 'env_file'),
- proxy_settings_str=proxy_settings_str, ssh_proxy_cmd=ssh_proxy_cmd,
- overrides=creds_override)
+ os_env_file=constants.ENV_FILE, proxy_settings_str=proxy_settings_str,
+ ssh_proxy_cmd=ssh_proxy_cmd, overrides=creds_override)
return os_creds