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 | 23 |
1 files changed, 17 insertions, 6 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 f7527d48..54cacbc7 100644 --- a/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py +++ b/sfc/tests/functest/sfc_two_chains_SSH_and_HTTP.py @@ -49,6 +49,11 @@ def main(): compute_nodes = [node for node in openstack_nodes if node.is_compute()] + odl_ip, odl_port = test_utils.get_odl_ip_port(openstack_nodes) + + for compute in compute_nodes: + logger.info("This is a compute: %s" % compute.info) + results = Results(COMMON_CONFIG.line_length) results.add_to_summary(0, "=") results.add_to_summary(2, "STATUS", "SUBTEST") @@ -158,6 +163,11 @@ def main(): logger.error('ERROR while booting vnfs') sys.exit(1) + instances = os_utils.get_instances(nova_client) + for instance in instances: + if ('client' not in instance.name) and ('server' not in instance.name): + os_utils.add_secgroup_to_instance(nova_client, instance.id, sg_id) + os_tacker.create_sfc(tacker_client, 'red', chain_vnf_names=['testVNF1']) os_tacker.create_sfc(tacker_client, 'blue', chain_vnf_names=['testVNF2']) @@ -181,12 +191,10 @@ def main(): logger.info(test_utils.run_cmd('tacker sfc-classifier-list')[1]) num_chains = 2 - # We want to check the classif. only in the SFFs (computes with a SF) - compute_sffs = test_utils.filter_sffs(compute_nodes, testTopology, vnfs) # Start measuring the time it takes to implement the classification rules t1 = threading.Thread(target=test_utils.wait_for_classification_rules, - args=(ovs_logger, compute_sffs, num_chains,)) + args=(ovs_logger, compute_clients, num_chains,)) try: t1.start() @@ -235,8 +243,11 @@ def main(): results.add_to_summary(2, "FAIL", "HTTP works") logger.info("Changing the classification") - os_tacker.delete_sfc_classifier(tacker_client, sfc_clf_name='red_http') - os_tacker.delete_sfc_classifier(tacker_client, sfc_clf_name='red_ssh') + test_utils.delete_classifier_and_acl( + tacker_client, 'red_http', odl_ip, odl_port) + + test_utils.delete_classifier_and_acl( + tacker_client, 'red_ssh', odl_ip, odl_port) os_tacker.create_sfc_classifier( tacker_client, 'blue_http', sfc_name='blue', @@ -258,7 +269,7 @@ def main(): # Start measuring the time it takes to implement the classification rules t2 = threading.Thread(target=test_utils.wait_for_classification_rules, - args=(ovs_logger, compute_sffs, num_chains,)) + args=(ovs_logger, compute_clients, num_chains,)) try: t2.start() except Exception, e: |