diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-19 20:49:00 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-02-19 20:49:25 +0100 |
commit | edac6a883e0b80724140305258649b4891a2d14c (patch) | |
tree | 53ffb0ed618b5eca4a18c9b4ff892c350450e6f3 /functest/opnfv_tests/vnf/router | |
parent | c49ada60d6b5390ea7e28d4e681195ad759b5214 (diff) |
Remove last CONST.__getattribute__()
Change-Id: I82f6aa1e723c88eebd4c7410da4b9741a482e9bc
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.py | 4 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/router/utilvnf.py | 9 | ||||
-rw-r--r-- | functest/opnfv_tests/vnf/router/vrouter_base.py | 4 |
3 files changed, 7 insertions, 10 deletions
diff --git a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py index a6740718..829206d6 100644 --- a/functest/opnfv_tests/vnf/router/cloudify_vrouter.py +++ b/functest/opnfv_tests/vnf/router/cloudify_vrouter.py @@ -65,8 +65,8 @@ class CloudifyVrouter(vrouter_base.VrouterOnBoardingBase): # Retrieve the configuration try: - self.config = CONST.__getattribute__( - 'vnf_{}_config'.format(self.case_name)) + self.config = getattr( + CONST, '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 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) diff --git a/functest/opnfv_tests/vnf/router/vrouter_base.py b/functest/opnfv_tests/vnf/router/vrouter_base.py index 0678313e..84cd51e5 100644 --- a/functest/opnfv_tests/vnf/router/vrouter_base.py +++ b/functest/opnfv_tests/vnf/router/vrouter_base.py @@ -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 = CONST.__getattribute__('dir_router_data') - self.result_dir = os.path.join(CONST.__getattribute__('dir_results'), + self.data_dir = getattr(CONST, 'dir_router_data') + self.result_dir = os.path.join(getattr(CONST, 'dir_results'), self.case_name) self.util = Utilvnf() self.util_info = {} |