aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/router/utilvnf.py
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2018-02-20 10:17:18 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-20 10:17:18 +0000
commit1a04979f3fff45117754653e20758d2ac6a02615 (patch)
tree001bd04d4370e232efb1a253ceb8e84ca5845a94 /functest/opnfv_tests/vnf/router/utilvnf.py
parentde3160230a010e5fd2aaf03630e31e807aeee34f (diff)
parentedac6a883e0b80724140305258649b4891a2d14c (diff)
Merge "Remove last CONST.__getattribute__()"
Diffstat (limited to 'functest/opnfv_tests/vnf/router/utilvnf.py')
-rw-r--r--functest/opnfv_tests/vnf/router/utilvnf.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/functest/opnfv_tests/vnf/router/utilvnf.py b/functest/opnfv_tests/vnf/router/utilvnf.py
index 421cfe83..d18e9375 100644
--- a/functest/opnfv_tests/vnf/router/utilvnf.py
+++ b/functest/opnfv_tests/vnf/router/utilvnf.py
@@ -55,10 +55,7 @@ class Utilvnf(object): # pylint: disable=too-many-instance-attributes
def __init__(self):
self.snaps_creds = ""
-
- data_dir = data_dir = CONST.__getattribute__('dir_router_data')
-
- self.vnf_data_dir = data_dir
+ self.vnf_data_dir = getattr(CONST, 'dir_router_data')
self.opnfv_vnf_data_dir = "opnfv-vnf-data/"
self.command_template_dir = "command_template/"
self.test_scenario_yaml = "test_scenario.yaml"
@@ -78,8 +75,8 @@ class Utilvnf(object): # pylint: disable=too-many-instance-attributes
case_dir = pkg_resources.resource_filename(
'functest', 'opnfv_tests/vnf/router')
- config_file_name = CONST.__getattribute__(
- 'vnf_{}_config'.format("vyos_vrouter"))
+ config_file_name = getattr(
+ CONST, 'vnf_{}_config'.format("vyos_vrouter"))
config_file = os.path.join(case_dir, config_file_name)