diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-22 13:25:42 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-22 13:29:33 +0100 |
commit | 402bbbef16cd5996862bd1ae2ac38eee2b4c8141 (patch) | |
tree | 70392a0dd7e27cbf9cf30006c7ad57db5191d73f /sfc/lib/openstack_utils.py | |
parent | d7ca703598f48b6d2f9346de3ab6b253c915789e (diff) |
Switch from CONST to CONF
CONST is not the right Functest object to get config data.
It also updates the way to get constants as proposed by Functest [1].
[1] https://gerrit.opnfv.org/gerrit/#/c/52389/
Depends-On: Ie23c0ef90efc839d60f0f3a9754c58746b1f3a00
Change-Id: I6cfa832466dcefd737314633d807512e46267a69
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'sfc/lib/openstack_utils.py')
-rw-r--r-- | sfc/lib/openstack_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |