diff options
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 | 41 |
1 files changed, 22 insertions, 19 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 29441c63..92c2711e 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -32,23 +32,29 @@ class SfcTwoChainsSSHandHTTP(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_vnfd(self.testcase_config.test_vnfd_blue, - 'test-vnfd2') + self.register_vnf_template(self.testcase_config.test_vnfd_red, + 'test-vnfd1') + self.register_vnf_template(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') + logger.info("Call Parent create_vnffg with index") self.create_vnffg(self.testcase_config.test_vnffgd_red, 'red', - 'red_http') + '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, self.odl_ip, self.odl_port, - self.client_instance.compute_host, + self.client_instance.hypervisor_hostname, [self.neutron_port],)) - try: t1.start() except Exception as e: @@ -61,29 +67,26 @@ 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 t2 = threading.Thread(target=odl_utils.wait_for_classification_rules, args=(self.ovs_logger, self.compute_nodes, self.odl_ip, self.odl_port, - self.client_instance.compute_host, - self.neutron_port,)) + self.client_instance.hypervisor_hostname, + [self.neutron_port],)) try: t2.start() except Exception as e: @@ -92,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__': |