Fix router assoc in Boron 29/23929/1
authorRomanos Skiadas <rski@intracom-telecom.com>
Wed, 2 Nov 2016 12:11:41 +0000 (14:11 +0200)
committerRomanos Skiadas <rski@intracom-telecom.com>
Thu, 3 Nov 2016 10:50:29 +0000 (12:50 +0200)
As per I6b57eab89839d9e9122cd24b0f05737467439dd9:
- Add a route distinguisher
- Remove the router from the network that is network associated

Change-Id: I1399bb51c787df881529279ef7a1946a3c5c5591
JIRA: SDNVPN-66
Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
test/functest/config.yaml
test/functest/testcase_4.py

index 63d5843..41996e0 100644 (file)
@@ -91,3 +91,4 @@ testcases:
       sdnvpn_sg_descr: Security group for SDNVPN test cases
       targets1: '88:88'
       targets2: '55:55'
+      route_distinguishers: '12:12'
index 13f531f..6798c53 100644 (file)
@@ -82,6 +82,8 @@ TARGETS_1 = ft_utils.get_parameter_from_yaml(
     "testcases.testcase_4.targets1", config_file)
 TARGETS_2 = ft_utils.get_parameter_from_yaml(
     "testcases.testcase_4.targets2", config_file)
+ROUTE_DISTINGUISHERS = ft_utils.get_parameter_from_yaml(
+    "testcases.testcase_4.route_distinguishers", config_file)
 SUCCESS_CRITERIA = ft_utils.get_parameter_from_yaml(
     "testcases.testcase_4.succes_criteria", config_file)
 TEST_DB = ft_utils.get_functest_config("results.test_db_url")
@@ -113,11 +115,15 @@ def main():
                                                              SUBNET_1_NAME,
                                                              SUBNET_1_CIDR,
                                                              ROUTER_1_NAME)
-    network_2_id, _, router_2_id = test_utils.create_network(neutron_client,
-                                                             NET_2_NAME,
-                                                             SUBNET_2_NAME,
-                                                             SUBNET_2_CIDR,
-                                                             ROUTER_2_NAME)
+    # the network that is net-assoc'd cannot have a router
+    # because ODL doesn't support it
+    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)
 
@@ -205,6 +211,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']