diff options
author | Manuel Buil <mbuil@suse.com> | 2018-02-23 08:26:00 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-23 08:26:00 +0000 |
commit | f396d3993fca365a82272f3b48eca1bb9bbfc389 (patch) | |
tree | 2193028213e28ef6511782df58440ca5d1cddc00 | |
parent | cb98872baed1135491bda909d35ffa2298b7fc55 (diff) | |
parent | 402bbbef16cd5996862bd1ae2ac38eee2b4c8141 (diff) |
Merge "Switch from CONST to CONF"
-rw-r--r-- | sfc/lib/config.py | 4 | ||||
-rw-r--r-- | sfc/lib/openstack_utils.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sfc/lib/config.py b/sfc/lib/config.py index 49cebc7d..28541ce3 100644 --- a/sfc/lib/config.py +++ b/sfc/lib/config.py @@ -13,7 +13,7 @@ import os import yaml import functest -from functest.utils.constants import CONST +from functest.utils import config from functest.utils import env import functest.utils.functest_utils as ft_utils @@ -43,7 +43,7 @@ class CommonConfig(object): self.sfc_test_dir, "vnfd-default-params-file") self.vnffgd_dir = os.path.join(self.sfc_test_dir, "vnffgd-templates") self.functest_results_dir = os.path.join( - getattr(CONST, 'dir_results'), "odl-sfc") + getattr(config.CONF, 'dir_results'), "odl-sfc") self.config_file = os.path.join(self.sfc_test_dir, "config.yaml") self.vim_file = os.path.join(self.sfc_test_dir, "register-vim.json") diff --git a/sfc/lib/openstack_utils.py b/sfc/lib/openstack_utils.py index 37ad36f0..535870da 100644 --- a/sfc/lib/openstack_utils.py +++ b/sfc/lib/openstack_utils.py @@ -4,7 +4,7 @@ import time import json import yaml from tackerclient.tacker import client as tackerclient -from functest.utils.constants import CONST +from functest.utils import constants from functest.utils import env from snaps.openstack.tests import openstack_tests @@ -40,7 +40,7 @@ class OpenStackSFC: def __init__(self): self.os_creds = openstack_tests.get_credentials( - os_env_file=CONST.__getattribute__('env_file')) + os_env_file=constants.ENV_FILE) self.creators = [] self.nova = nova_utils.nova_client(self.os_creds) self.neutron = neutron_utils.neutron_client(self.os_creds) @@ -228,7 +228,7 @@ def get_tacker_client_version(): def get_tacker_client(other_creds={}): creds_override = None os_creds = openstack_tests.get_credentials( - os_env_file=CONST.__getattribute__('env_file'), + os_env_file=constants.ENV_FILE, overrides=creds_override) sess = keystone_utils.keystone_session(os_creds) return tackerclient.Client(get_tacker_client_version(), session=sess) |