From cb24c309f02c1343d749463aad30aa58c2a21db5 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Wed, 29 Aug 2018 13:32:47 +0200 Subject: Improve readability of the tests The method name "create_custom_av" does not clearly say what it is doing. Changing it to "create_vnf" clarifies the code better Change-Id: Ic3f874bdb22891d348e5609130b8e4f0f3f8c3e8 Signed-off-by: Manuel Buil --- sfc/tests/functest/sfc_chain_deletion.py | 2 +- sfc/tests/functest/sfc_one_chain_two_service_functions.py | 4 ++-- sfc/tests/functest/sfc_parent_function.py | 10 +++++----- sfc/tests/functest/sfc_symmetric_chain.py | 2 +- sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sfc/tests') diff --git a/sfc/tests/functest/sfc_chain_deletion.py b/sfc/tests/functest/sfc_chain_deletion.py index 44982c91..527dc822 100644 --- a/sfc/tests/functest/sfc_chain_deletion.py +++ b/sfc/tests/functest/sfc_chain_deletion.py @@ -34,7 +34,7 @@ class SfcChainDeletion(sfc_parent_function.SfcCommonTestCase): logger.info("The test scenario %s is starting", __name__) self.create_custom_vnfd(self.testcase_config.test_vnfd_red, 'test-vnfd1') - self.create_custom_av(self.vnfs[0], 'test-vnfd1', 'test-vim') + self.create_vnf(self.vnfs[0], 'test-vnfd1', 'test-vim') self.create_chain(self.testcase_config) diff --git a/sfc/tests/functest/sfc_one_chain_two_service_functions.py b/sfc/tests/functest/sfc_one_chain_two_service_functions.py index bc36c494..039cf625 100644 --- a/sfc/tests/functest/sfc_one_chain_two_service_functions.py +++ b/sfc/tests/functest/sfc_one_chain_two_service_functions.py @@ -34,8 +34,8 @@ class SfcOneChainTwoServiceTC(sfc_parent_function.SfcCommonTestCase): self.create_custom_vnfd(self.testcase_config.test_vnfd_blue, 'test-vnfd2') - self.create_custom_av(self.vnfs[0], 'test-vnfd1', 'test-vim') - self.create_custom_av(self.vnfs[1], 'test-vnfd2', 'test-vim') + self.create_vnf(self.vnfs[0], 'test-vnfd1', 'test-vim') + self.create_vnf(self.vnfs[1], 'test-vnfd2', 'test-vim') self.create_vnffg(self.testcase_config.test_vnffgd_red, 'red', 'red_http') diff --git a/sfc/tests/functest/sfc_parent_function.py b/sfc/tests/functest/sfc_parent_function.py index aa08e831..9b8ccee2 100644 --- a/sfc/tests/functest/sfc_parent_function.py +++ b/sfc/tests/functest/sfc_parent_function.py @@ -201,12 +201,12 @@ class SfcCommonTestCase(object): tosca_file=tosca_file, vnfd_name=vnfd_name) - def create_custom_av(self, vnf_names, av_member1, av_member2): - """Create custom 'av' + def create_vnf(self, vnf_names, vnfd_name, vim_name): + """Create vnf :param vnf_names: names of available vnf(s) - :param av_member1: the first member of av zone - :param av_member2: the second member of av zone + :param vnfd_name: name of the vnfd template (tacker) + :param vim_name: name of the vim (tacker) :return: av zone """ @@ -216,7 +216,7 @@ class SfcCommonTestCase(object): .format(self.test_topology['description'])) os_sfc_utils.create_vnf_in_av_zone( - self.tacker_client, vnf_names, av_member1, av_member2, + self.tacker_client, vnf_names, vnfd_name, vim_name, self.default_param_file, self.test_topology[vnf_names]) self.vnf_id = os_sfc_utils.wait_for_vnf(self.tacker_client, diff --git a/sfc/tests/functest/sfc_symmetric_chain.py b/sfc/tests/functest/sfc_symmetric_chain.py index 7d6b4c15..1b57a244 100644 --- a/sfc/tests/functest/sfc_symmetric_chain.py +++ b/sfc/tests/functest/sfc_symmetric_chain.py @@ -43,7 +43,7 @@ class SfcSymmetricChain(sfc_parent_function.SfcCommonTestCase): logger.info("The test scenario %s is starting", __name__) self.create_custom_vnfd(self.testcase_config.test_vnfd, 'test-vnfd1') - self.create_custom_av(self.vnfs[0], 'test-vnfd1', 'test-vim') + self.create_vnf(self.vnfs[0], 'test-vnfd1', 'test-vim') if self.vnf_id is None: logger.error('ERROR while booting VNF') diff --git a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py index 29441c63..b8fc2826 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -37,8 +37,8 @@ class SfcTwoChainsSSHandHTTP(sfc_parent_function.SfcCommonTestCase): self.create_custom_vnfd(self.testcase_config.test_vnfd_blue, 'test-vnfd2') - self.create_custom_av(self.vnfs[0], 'test-vnfd1', 'test-vim') - self.create_custom_av(self.vnfs[1], 'test-vnfd2', 'test-vim') + self.create_vnf(self.vnfs[0], 'test-vnfd1', 'test-vim') + self.create_vnf(self.vnfs[1], 'test-vnfd2', 'test-vim') self.create_vnffg(self.testcase_config.test_vnffgd_red, 'red', 'red_http') -- cgit 1.2.3-korg