diff options
Diffstat (limited to 'sdnvpn/test/functest')
-rw-r--r-- | sdnvpn/test/functest/testcase_1.py | 11 | ||||
-rw-r--r-- | sdnvpn/test/functest/testcase_10.py | 13 | ||||
-rw-r--r-- | sdnvpn/test/functest/testcase_2.py | 16 | ||||
-rw-r--r-- | sdnvpn/test/functest/testcase_4.py | 11 | ||||
-rw-r--r-- | sdnvpn/test/functest/testcase_7.py | 10 | ||||
-rw-r--r-- | sdnvpn/test/functest/testcase_8.py | 10 |
6 files changed, 37 insertions, 34 deletions
diff --git a/sdnvpn/test/functest/testcase_1.py b/sdnvpn/test/functest/testcase_1.py index 718f305..2c4ddbe 100644 --- a/sdnvpn/test/functest/testcase_1.py +++ b/sdnvpn/test/functest/testcase_1.py @@ -154,13 +154,12 @@ def main(): test_utils.create_network_association( neutron_client, bgpvpn_id, network_1_id) - # Wait for VMs to get ips. - instances_up = test_utils.wait_for_instances_up(vm_1, vm_2, - vm_3, vm_4, - vm_5) + # Wait for VMs to be ready. + instances_up = test_utils.wait_for_instances_up(vm_2, vm_3, vm_5) + instances_dhcp_up = test_utils.wait_for_instances_get_dhcp(vm_1, vm_4) - if not instances_up: - logger.error("One or more instances is down") + if (not instances_up or not instances_dhcp_up): + logger.error("One or more instances are down") # TODO: Handle this appropriately results.get_ping_status(vm_1, vm_2, expected="PASS", timeout=200) diff --git a/sdnvpn/test/functest/testcase_10.py b/sdnvpn/test/functest/testcase_10.py index 557b658..5a88603 100644 --- a/sdnvpn/test/functest/testcase_10.py +++ b/sdnvpn/test/functest/testcase_10.py @@ -142,11 +142,11 @@ def main(): instance_ids.extend([vm_1.id, vm_3.id]) # Wait for VMs to get ips. - instances_up = test_utils.wait_for_instances_up(vm_1, vm_2, - vm_3) + instances_up = test_utils.wait_for_instances_up(vm_2) + instances_dhcp_up = test_utils.wait_for_instances_get_dhcp(vm_1, vm_3) - if not instances_up: - logger.error("One or more instances is down") + if (not instances_up or not instances_dhcp_up): + logger.error("One or more instances are down") # TODO: Handle this appropriately # Create monitor threads to monitor traffic between vm_1, vm_2 and vm_3 m = Manager() @@ -208,9 +208,10 @@ def main(): compute_node=av_zone_1, userdata=u4) instance_ids.append(vm_4.id) + # Wait for VMs to get ips. - instances_up = test_utils.wait_for_instances_up(vm_4) - if not instances_up: + instances_dhcp_up = test_utils.wait_for_instances_get_dhcp(vm_4) + if not instances_dhcp_up: logger.error("Instance vm_4 failed to start.") # TODO: Handle this appropriately # Create and start a new monitor thread for vm_4 diff --git a/sdnvpn/test/functest/testcase_2.py b/sdnvpn/test/functest/testcase_2.py index bc37c5c..928656e 100644 --- a/sdnvpn/test/functest/testcase_2.py +++ b/sdnvpn/test/functest/testcase_2.py @@ -200,16 +200,12 @@ def main(): neutron_client, bgpvpn1_id, network_1_id) # Wait for VMs to get ips. - instances_up = test_utils.wait_for_instances_up(vm_1, - vm_2, - # vm_3, - vm_4, - # vm_5 - ) - - if not instances_up: - logger.error("One or more instances is down") - sys.exit(-1) + instances_up = test_utils.wait_for_instances_up(vm_2) + instances_dhcp_up = test_utils.wait_for_instances_get_dhcp(vm_1, vm_4) + + if (not instances_up or not instances_dhcp_up): + logger.error("One or more instances are down") + # TODO: Handle this appropriately logger.info("Waiting for the VMs to connect to each other using the" " updated network configuration") diff --git a/sdnvpn/test/functest/testcase_4.py b/sdnvpn/test/functest/testcase_4.py index f6748f9..9b1c1fa 100644 --- a/sdnvpn/test/functest/testcase_4.py +++ b/sdnvpn/test/functest/testcase_4.py @@ -162,13 +162,12 @@ def main(): neutron_client, bgpvpn_id, router_1_id) # Wait for VMs to get ips. - instances_up = test_utils.wait_for_instances_up(vm_1, vm_2, - vm_3, vm_4, - vm_5) + instances_up = test_utils.wait_for_instances_up(vm_2, vm_3, vm_5) + instances_dhcp_up = test_utils.wait_for_instances_get_dhcp(vm_1, vm_4) - if not instances_up: - logger.error("One or more instances is down") - # TODO Handle appropriately + if (not instances_up or not instances_dhcp_up): + logger.error("One or more instances are down") + # TODO: Handle this appropriately results.get_ping_status(vm_1, vm_2, expected="PASS", timeout=200) results.get_ping_status(vm_1, vm_3, expected="PASS", timeout=30) diff --git a/sdnvpn/test/functest/testcase_7.py b/sdnvpn/test/functest/testcase_7.py index 65a77b6..e018022 100644 --- a/sdnvpn/test/functest/testcase_7.py +++ b/sdnvpn/test/functest/testcase_7.py @@ -132,9 +132,13 @@ def main(): test_utils.wait_for_bgp_net_assoc( neutron_client, bgpvpn_id, network_2_id) - instances_up = test_utils.wait_for_instances_up(vm_1, vm_2) - if not instances_up: - logger.error("One or more instances is down") + # Wait for VMs to get ips. + instances_up = test_utils.wait_for_instances_up(vm_2) + instances_dhcp_up = test_utils.wait_for_instances_get_dhcp(vm_1) + + if (not instances_up or not instances_dhcp_up): + logger.error("One or more instances are down") + # TODO: Handle this appropriately logger.info("Waiting for the VMs to connect to each other using the" " updated network configuration") diff --git a/sdnvpn/test/functest/testcase_8.py b/sdnvpn/test/functest/testcase_8.py index abb111f..b166362 100644 --- a/sdnvpn/test/functest/testcase_8.py +++ b/sdnvpn/test/functest/testcase_8.py @@ -131,9 +131,13 @@ def main(): test_utils.wait_for_bgp_net_assoc( neutron_client, bgpvpn_id, network_2_id) - instances_up = test_utils.wait_for_instances_up(vm_1, vm_2) - if not instances_up: - logger.error("One or more instances is down") + # Wait for VMs to get ips. + instances_up = test_utils.wait_for_instances_up(vm_2) + instances_dhcp_up = test_utils.wait_for_instances_get_dhcp(vm_1) + + if (not instances_up or not instances_dhcp_up): + logger.error("One or more instances are down") + # TODO: Handle this appropriately logger.info("Waiting for the VMs to connect to each other using the" " updated network configuration") |