aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/router
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-02-22 17:43:35 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-02-22 19:41:31 +0100
commit9f7c63ffaf64b3ca81ae86a0b3477e5007916fcd (patch)
tree71d1e082404d4356a1f3491482c03bbb6a6914a5 /functest/opnfv_tests/vnf/router
parentd701e9737f83ff29faba830df426b5a75c9746b1 (diff)
Switch from CONST to CONF
It also removes constants.CONST and env.Environment which are now useless. Depends-On: I764a0a2a24447c941d1e726f3116593b29dd1c1e Depends-On: I6cfa832466dcefd737314633d807512e46267a69 Change-Id: Ife41c59d9f2e6ec4e49df38af962039f99554bc5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/router')
-rw-r--r--functest/opnfv_tests/vnf/router/cloudify_vrouter.py4
-rw-r--r--functest/opnfv_tests/vnf/router/utilvnf.py6
-rw-r--r--functest/opnfv_tests/vnf/router/vrouter_base.py6
3 files changed, 8 insertions, 8 deletions
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
index eb1c4050..18acce6f 100644
--- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
+++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
@@ -23,7 +23,7 @@ from scp import SCPClient
from functest.opnfv_tests.openstack.snaps import snaps_utils
import functest.opnfv_tests.vnf.router.vrouter_base as vrouter_base
from functest.opnfv_tests.vnf.router.utilvnf import Utilvnf
-from functest.utils.constants import CONST
+from functest.utils import config
from functest.utils import functest_utils
from git import Repo
@@ -69,7 +69,7 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase):
# Retrieve the configuration
try:
self.config = getattr(
- CONST, 'vnf_{}_config'.format(self.case_name))
+ config.CONF, 'vnf_{}_config'.format(self.case_name))
except Exception:
raise Exception("VNF config file not found")
diff --git a/functest/opnfv_tests/vnf/router/utilvnf.py b/functest/opnfv_tests/vnf/router/utilvnf.py
index d18e9375..6861b386 100644
--- a/functest/opnfv_tests/vnf/router/utilvnf.py
+++ b/functest/opnfv_tests/vnf/router/utilvnf.py
@@ -18,7 +18,7 @@ import pkg_resources
import requests
import yaml
-from functest.utils.constants import CONST
+from functest.utils import config
from git import Repo
from requests.auth import HTTPBasicAuth
from snaps.openstack.utils import nova_utils
@@ -55,7 +55,7 @@ class Utilvnf(object): # pylint: disable=too-many-instance-attributes
def __init__(self):
self.snaps_creds = ""
- self.vnf_data_dir = getattr(CONST, 'dir_router_data')
+ self.vnf_data_dir = getattr(config.CONF, 'dir_router_data')
self.opnfv_vnf_data_dir = "opnfv-vnf-data/"
self.command_template_dir = "command_template/"
self.test_scenario_yaml = "test_scenario.yaml"
@@ -76,7 +76,7 @@ class Utilvnf(object): # pylint: disable=too-many-instance-attributes
'functest', 'opnfv_tests/vnf/router')
config_file_name = getattr(
- CONST, 'vnf_{}_config'.format("vyos_vrouter"))
+ config.CONF, 'vnf_{}_config'.format("vyos_vrouter"))
config_file = os.path.join(case_dir, config_file_name)
diff --git a/functest/opnfv_tests/vnf/router/vrouter_base.py b/functest/opnfv_tests/vnf/router/vrouter_base.py
index 84cd51e5..8818032d 100644
--- a/functest/opnfv_tests/vnf/router/vrouter_base.py
+++ b/functest/opnfv_tests/vnf/router/vrouter_base.py
@@ -20,7 +20,7 @@ import time
import pkg_resources
import functest.core.vnf as vnf
-from functest.utils.constants import CONST
+from functest.utils import config
from functest.opnfv_tests.vnf.router.test_controller import function_test_exec
from functest.opnfv_tests.vnf.router.utilvnf import Utilvnf
@@ -37,8 +37,8 @@ class VrouterOnBoardingBase(vnf.VnfOnBoarding):
super(VrouterOnBoardingBase, self).__init__(**kwargs)
self.case_dir = pkg_resources.resource_filename(
'functest', 'opnfv_tests/vnf/router')
- self.data_dir = getattr(CONST, 'dir_router_data')
- self.result_dir = os.path.join(getattr(CONST, 'dir_results'),
+ self.data_dir = getattr(config.CONF, 'dir_router_data')
+ self.result_dir = os.path.join(getattr(config.CONF, 'dir_results'),
self.case_name)
self.util = Utilvnf()
self.util_info = {}