From 80ad3feb6f6f8e8e7d86ddf1f96dd160f05e5059 Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Tue, 18 Oct 2016 16:34:24 +0300 Subject: Fix network assoc tests in Boron Network assoc in Boron with netvirt does not work for subnets that have a router due to an inherent limitation in the implementation. See the mailing list and related bug: https://bugs.opendaylight.org/show_bug.cgi?id=6962 https://lists.opendaylight.org/pipermail/netvirt-dev/2016-October/001815.html Also, if a subnet does not have a route distinguisher, it is not added to the FIB, so association does not make traffic move between subnets. This is intentional and an error is logged when a subnet is associated to a bvpvpn without a route distinguisher. This commit fixes the net assoc case and works around these issues by: - Removing the routers from the subnets in testcase_1 - Adding a route distinguisher to the bgpvpn JIRA: SDNVPN-74 Change-Id: I6b57eab89839d9e9122cd24b0f05737467439dd9 Signed-off-by: Romanos Skiadas (cherry picked from commit b9eb7024b014cba0d299b1cf3b01e179c7d0482e) --- test/functest/testcase_1.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'test/functest/testcase_1.py') diff --git a/test/functest/testcase_1.py b/test/functest/testcase_1.py index 1356518..fe4298b 100644 --- a/test/functest/testcase_1.py +++ b/test/functest/testcase_1.py @@ -50,6 +50,9 @@ FLAVOR = ft_utils.get_parameter_from_yaml( "testcases.testcase_1.flavor", config_file) IMAGE_NAME = ft_utils.get_parameter_from_yaml( "testcases.testcase_1.image_name", config_file) +ROUTE_DISTINGUISHERS = ft_utils.get_parameter_from_yaml( + "testcases.testcase_1.route_distinguishers", config_file) + IMAGE_FILENAME = ft_utils.get_functest_config( "general.openstack.image_file_name") IMAGE_FORMAT = ft_utils.get_functest_config( @@ -188,16 +191,21 @@ def main(): disk=IMAGE_FORMAT, container="bare", public=True) - network_1_id, _, _ = test_utils.create_network(neutron_client, - NET_1_NAME, - SUBNET_1_NAME, - SUBNET_1_CIDR, - ROUTER_1_NAME) - network_2_id, _, _ = test_utils.create_network(neutron_client, - NET_2_NAME, - SUBNET_2_NAME, - SUBNET_2_CIDR, - ROUTER_2_NAME) + network_1_id = test_utils.create_net(neutron_client, + NET_1_NAME) + test_utils.create_subnet(neutron_client, + SUBNET_1_NAME, + SUBNET_1_CIDR, + network_1_id) + + network_2_id = test_utils.create_net(neutron_client, + NET_2_NAME) + + test_utils.create_subnet(neutron_client, + SUBNET_2_NAME, + SUBNET_2_CIDR, + network_2_id) + sg_id = os_utils.create_security_group_full(neutron_client, SECGROUP_NAME, SECGROUP_DESCR) @@ -289,6 +297,7 @@ def main(): vpn_name = "sdnvpn-" + str(randint(100000, 999999)) kwargs = {"import_targets": TARGETS_1, "export_targets": TARGETS_2, + "route_distinguishers": ROUTE_DISTINGUISHERS, "name": vpn_name} bgpvpn = os_utils.create_bgpvpn(neutron_client, **kwargs) bgpvpn_id = bgpvpn['bgpvpn']['id'] -- cgit 1.2.3-korg