From: Nikolas Hermanns Date: Thu, 16 Mar 2017 12:49:50 +0000 (+0000) Subject: Merge "Fix most end-to-end issues with testcase 3 and reenable it" X-Git-Tag: opnfv-5.0.RC1~66 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=6bb2eae86a0935443d8e65df0780c3df994a669b;hp=6674049b09d02fe0dc7e11e007e710643cdd49ca;p=sdnvpn.git Merge "Fix most end-to-end issues with testcase 3 and reenable it" --- diff --git a/docs/scenarios/os-odl_l2-bgpvpn/index.rst b/docs/scenarios/os-odl_l2-bgpvpn/index.rst index a2e5076..2389706 100644 --- a/docs/scenarios/os-odl_l2-bgpvpn/index.rst +++ b/docs/scenarios/os-odl_l2-bgpvpn/index.rst @@ -1,3 +1,5 @@ +.. _sdnvpn-os-odl_l2-bgpvpn: + .. This work is licensed under a Creative Commons Attribution 4.0 International License. .. http://creativecommons.org/licenses/by/4.0 .. (c) Tim Irnich and others diff --git a/sdnvpn/lib/utils.py b/sdnvpn/lib/utils.py index d085111..a047269 100644 --- a/sdnvpn/lib/utils.py +++ b/sdnvpn/lib/utils.py @@ -54,7 +54,7 @@ def create_subnet(neutron_client, name, cidr, net_id): def create_network(neutron_client, net, subnet1, cidr1, router, subnet2=None, cidr2=None): - """Network assoc will not work for networks/subnets created by this function. + """Network assoc won't work for networks/subnets created by this function. It is an ODL limitation due to it handling routers as vpns. See https://bugs.opendaylight.org/show_bug.cgi?id=6962""" @@ -234,6 +234,11 @@ def get_installer_ip(): return str(os.environ['INSTALLER_IP']) +def get_instance_ip(instance): + instance_ip = instance.networks.itervalues().next()[0] + return instance_ip + + def wait_for_instance(instance): logger.info("Waiting for instance %s to get a DHCP lease..." % instance.id) # The sleep this function replaced waited for 80s diff --git a/sdnvpn/test/functest/run_tests.py b/sdnvpn/test/functest/run_tests.py index e828af3..9acfa0f 100644 --- a/sdnvpn/test/functest/run_tests.py +++ b/sdnvpn/test/functest/run_tests.py @@ -50,6 +50,13 @@ def main(): output = cmd.read() logger.debug(output) + # Workaround for https://jira.opnfv.org/projects/SDNVPN/issues/SDNVPN-115 + cmd_line = "nova quota-class-update --instances -1 default" + logger.info("Setting instances quota to unlimited : %s" % cmd_line) + cmd = os.popen(cmd_line) + output = cmd.read() + logger.debug(output) + with open(COMMON_CONFIG.config_file) as f: config_yaml = yaml.safe_load(f) diff --git a/sdnvpn/test/functest/testcase_1.py b/sdnvpn/test/functest/testcase_1.py index a5c1494..5aa6411 100644 --- a/sdnvpn/test/functest/testcase_1.py +++ b/sdnvpn/test/functest/testcase_1.py @@ -82,7 +82,7 @@ def main(): sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_1) - vm_2_ip = vm_2.networks.itervalues().next()[0] + vm_2_ip = test_utils.get_instance_ip(vm_2) vm_3 = test_utils.create_instance( nova_client, @@ -92,7 +92,7 @@ def main(): sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_2) - vm_3_ip = vm_3.networks.itervalues().next()[0] + vm_3_ip = test_utils.get_instance_ip(vm_3) vm_5 = test_utils.create_instance( nova_client, @@ -102,7 +102,7 @@ def main(): sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_2) - vm_5_ip = vm_5.networks.itervalues().next()[0] + vm_5_ip = test_utils.get_instance_ip(vm_5) # We boot vm5 first because we need vm5_ip for vm4 userdata u4 = test_utils.generate_ping_userdata([vm_5_ip]) @@ -115,7 +115,7 @@ def main(): secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_1, userdata=u4) - vm_4_ip = vm_4.networks.itervalues().next()[0] + vm_4_ip = test_utils.get_instance_ip(vm_4) # We boot VM1 at the end because we need to get the IPs first to generate # the userdata diff --git a/sdnvpn/test/functest/testcase_4.py b/sdnvpn/test/functest/testcase_4.py index bb3ea3e..a474630 100644 --- a/sdnvpn/test/functest/testcase_4.py +++ b/sdnvpn/test/functest/testcase_4.py @@ -82,7 +82,7 @@ def main(): sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_1) - vm_2_ip = vm_2.networks.itervalues().next()[0] + vm_2_ip = test_utils.get_instance_ip(vm_2) vm_3 = test_utils.create_instance( nova_client, @@ -92,7 +92,7 @@ def main(): sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_2) - vm_3_ip = vm_3.networks.itervalues().next()[0] + vm_3_ip = test_utils.get_instance_ip(vm_3) vm_5 = test_utils.create_instance( nova_client, @@ -102,7 +102,7 @@ def main(): sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_2) - vm_5_ip = vm_5.networks.itervalues().next()[0] + vm_5_ip = test_utils.get_instance_ip(vm_5) # We boot vm5 first because we need vm5_ip for vm4 userdata u4 = test_utils.generate_ping_userdata([vm_5_ip]) @@ -115,7 +115,7 @@ def main(): secgroup_name=TESTCASE_CONFIG.secgroup_name, compute_node=av_zone_1, userdata=u4) - vm_4_ip = vm_4.networks.itervalues().next()[0] + vm_4_ip = test_utils.get_instance_ip(vm_4) # We boot VM1 at the end because we need to get the IPs first to generate # the userdata diff --git a/sdnvpn/test/functest/testcase_7.py b/sdnvpn/test/functest/testcase_7.py index 18b6dda..3bc9afb 100644 --- a/sdnvpn/test/functest/testcase_7.py +++ b/sdnvpn/test/functest/testcase_7.py @@ -82,7 +82,7 @@ def main(): network_2_id, sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name) - vm_2_ip = vm_2.networks.itervalues().next()[0] + vm_2_ip = test_utils.get_instance_ip(vm_2) u1 = test_utils.generate_ping_userdata([vm_2_ip]) vm_1 = test_utils.create_instance( diff --git a/sdnvpn/test/functest/testcase_8.py b/sdnvpn/test/functest/testcase_8.py index 1e29bb2..1fdfa00 100644 --- a/sdnvpn/test/functest/testcase_8.py +++ b/sdnvpn/test/functest/testcase_8.py @@ -81,7 +81,7 @@ def main(): network_2_id, sg_id, secgroup_name=TESTCASE_CONFIG.secgroup_name) - vm_2_ip = vm_2.networks.itervalues().next()[0] + vm_2_ip = test_utils.get_instance_ip(vm_2) u1 = test_utils.generate_ping_userdata([vm_2_ip]) vm_1 = test_utils.create_instance(