diff options
author | gvrangan <venkatrangang@hcl.com> | 2019-01-03 11:32:11 +0000 |
---|---|---|
committer | ananth.y <ananth.y@hcl.com> | 2019-01-25 22:52:13 +0900 |
commit | 50ad0d757b2015067c2b13adbbe59b746477b207 (patch) | |
tree | bb9be072a0cef8fd32898a375285fd2c19844397 /sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py | |
parent | a4b8b22caf02f46e2019a957af782a4fd77b9bea (diff) |
Fix Two Chains Test and Enabled all Testcases
- Method added to support Port Chain update
- Used the new method to modify the test as follows
- Create two Port Chains (one VNF per chain)
- Block ssh in one vnf and http in the other
- Test communication
- Swap the flow classifiers in the chains
so that ssh packets are sent to vnf where
http is blocked and vice versa
- Fix extracting odl username/password from ml2_conf
- Checking flow classifiers are implemented
- Fixed odl cleanup
Change-Id: I1f0f3a3b829d6c73d1bb1a774ebf3484912b84b7
Signed-off-by: gvrangan <venkatrangang@hcl.com>
Diffstat (limited to 'sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py')
-rw-r--r-- | sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py | 24 |
1 files changed, 14 insertions, 10 deletions
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 0cfbea22..92c2711e 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -40,8 +40,15 @@ class SfcTwoChainsSSHandHTTP(sfc_parent_function.SfcCommonTestCase): self.create_vnf(self.vnfs[0], 'test-vnfd1', 'test-vim') self.create_vnf(self.vnfs[1], 'test-vnfd2', 'test-vim') + logger.info("Call Parent create_vnffg with index") self.create_vnffg(self.testcase_config.test_vnffgd_red, 'red', - 'red_http', port=80, protocol='tcp', symmetric=False) + 'red_http', port=80, protocol='tcp', + symmetric=False, vnf_index=0) + + self.create_vnffg(self.testcase_config.test_vnffgd_blue, 'blue', + 'blue_ssh', port=22, protocol='tcp', + symmetric=False, vnf_index=1) + self.create_classifier('dummy') t1 = threading.Thread(target=odl_utils.wait_for_classification_rules, args=(self.ovs_logger, self.compute_nodes, @@ -60,21 +67,18 @@ class SfcTwoChainsSSHandHTTP(sfc_parent_function.SfcCommonTestCase): self.check_floating_ips() self.start_services_in_vm() - self.vxlan_blocking_start(self.fips_sfs[0], "22") - self.vxlan_blocking_start(self.fips_sfs[1], "80") + self.vxlan_blocking_start(self.fips_sfs[0], "80") + self.vxlan_blocking_start(self.fips_sfs[1], "22") logger.info("Wait for ODL to update the classification rules in OVS") t1.join() results = self.present_results_ssh() - results = self.present_results_allowed_http() + results = self.present_results_http() logger.info("Changing the classification") - self.remove_vnffg('red_http', 'red') - - self.create_vnffg(self.testcase_config.test_vnffgd_blue, 'blue', - 'blue_ssh') + self.swap_classifiers('red_http', 'blue_ssh') # Start measuring the time it takes to implement the classification # rules @@ -82,7 +86,7 @@ class SfcTwoChainsSSHandHTTP(sfc_parent_function.SfcCommonTestCase): args=(self.ovs_logger, self.compute_nodes, self.odl_ip, self.odl_port, self.client_instance.hypervisor_hostname, - self.neutron_port,)) + [self.neutron_port],)) try: t2.start() except Exception as e: @@ -91,7 +95,7 @@ class SfcTwoChainsSSHandHTTP(sfc_parent_function.SfcCommonTestCase): logger.info("Wait for ODL to update the classification rules in OVS") t2.join() - results = self.present_results_http() + results = self.present_results_allowed_http() results = self.present_results_allowed_ssh() if __name__ == '__main__': |