2 Documentation Test suite to validate IPv6 vpnservice functionality in an Openstack integrated environment.
3 ... The assumption of this suite is that the environment is already configured with the proper
4 ... integration bridges and vxlan tunnels.
5 Suite Setup BuiltIn.Run Keywords Get OvsDebugInfo
6 ... AND Basic Vpnservice Suite Setup
7 ... AND Get OvsDebugInfo
8 Suite Teardown BuiltIn.Run Keywords Basic Vpnservice Suite Teardown
9 ... AND Get OvsDebugInfo
10 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
11 Test Teardown Get Test Teardown Debugs
12 Library OperatingSystem
13 Library RequestsLibrary
14 Resource ../../../libraries/Utils.robot
15 Resource ../../../libraries/OpenStackOperations.robot
16 Resource ../../../libraries/DevstackUtils.robot
17 Resource ../../../libraries/VpnOperations.robot
18 Resource ../../../libraries/OVSDB.robot
19 Resource ../../../libraries/SetupUtils.robot
20 Resource ../../../libraries/Tcpdump.robot
21 Resource ../../../variables/Variables.robot
22 Resource ../../../variables/netvirt/Variables.robot
25 @{NETWORKS} NET1_IPV6 NET2_IPV6
26 @{SUBNETS} SUBNET1_IPV6 SUBNET2_IPV6
27 @{SUBNETS_CIDR} 2001:db8:0:2::/64 2001:db8:0:3::/64
28 @{PORT_LIST} PORT11_IPV6 PORT21_IPV6 PORT12_IPV6 PORT22_IPV6
29 @{VM_INSTANCES_NET10} VM11_IPV6 VM21_IPV6
30 @{VM_INSTANCES_NET20} VM12_IPV6 VM22_IPV6
31 @{ROUTERS} ROUTER_1_IPV6
32 @{EXTRA_NW_IP} 2001:db9:cafe:d::10 2001:db9:abcd:d::20
33 @{EXTRA_NW_SUBNET} 2001:db9:cafe:d::/64 2001:db9:abcd:d::/64
34 ${NET1_ADDR_POOL} --allocation-pool start=2001:db8:0:2::2,end=2001:db8:0:2:ffff:ffff:ffff:fffe
35 ${NET2_ADDR_POOL} --allocation-pool start=2001:db8:0:3::2,end=2001:db8:0:3:ffff:ffff:ffff:fffe
36 ${SECURITY_GROUP} sg-vpnservice-ipv6
37 ${UPDATE_NETWORK} UpdateNetwork
38 ${UPDATE_SUBNET} UpdateSubnet
39 ${UPDATE_PORT} UpdatePort
42 Create Neutron Networks
43 [Documentation] Create two networks
44 Create Network ${NETWORKS[0]}
45 Create Network ${NETWORKS[1]}
46 ${NET_LIST} List Networks
48 Should Contain ${NET_LIST} ${NETWORKS[0]}
49 Should Contain ${NET_LIST} ${NETWORKS[1]}
50 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
51 Update Network ${NETWORKS[0]} additional_args=--description ${UPDATE_NETWORK}
52 ${output} = Show Network ${NETWORKS[0]}
53 Should Contain ${output} ${UPDATE_NETWORK}
55 Create Neutron Subnets
56 [Documentation] Create two subnets for previously created networks
57 ${net1_additional_args}= Catenate --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET1_ADDR_POOL}
58 ${net2_additional_args}= Catenate --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET2_ADDR_POOL}
59 Create SubNet ${NETWORKS[0]} ${SUBNETS[0]} ${SUBNETS_CIDR[0]} ${net1_additional_args}
60 Create SubNet ${NETWORKS[1]} ${SUBNETS[1]} ${SUBNETS_CIDR[1]} ${net2_additional_args}
61 ${SUB_LIST} List Subnets
63 Should Contain ${SUB_LIST} ${SUBNETS[0]}
64 Should Contain ${SUB_LIST} ${SUBNETS[1]}
65 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
66 Update SubNet ${SUBNETS[0]} additional_args=--description ${UPDATE_SUBNET}
67 ${output} = Show SubNet ${SUBNETS[0]}
68 Should Contain ${output} ${UPDATE_SUBNET}
71 [Documentation] Create Router
72 Create Router ${ROUTERS[0]}
73 ${router_output} = List Router
75 Should Contain ${router_output} ${ROUTERS[0]}
76 ${router_list} = Create List ${ROUTERS[0]}
77 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${ROUTER_URL} ${router_list}
79 Add Interfaces To Router
80 [Documentation] Add Interfaces
81 : FOR ${INTERFACE} IN @{SUBNETS}
82 \ Add Router Interface ${ROUTERS[0]} ${INTERFACE}
83 ${interface_output} = Show Router Interface ${ROUTERS[0]}
84 : FOR ${INTERFACE} IN @{SUBNETS}
85 \ ${subnet_id} = Get Subnet Id ${INTERFACE} ${devstack_conn_id}
86 \ Should Contain ${interface_output} ${subnet_id}
87 ${GWMAC_ADDRS} ${GWIP_ADDRS} = Get Gateway MAC And IP Address ${ROUTERS[0]}
89 Set Suite Variable ${GWMAC_ADDRS}
91 Set Suite Variable ${GWIP_ADDRS}
94 [Documentation] Allow all TCP/UDP/ICMP6 packets for this suite
95 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP} IPv6
98 [Documentation] Create four ports under previously created subnets
99 ${allowed_address_pairs_args}= Set Variable If '${OPENSTACK_BRANCH}'=='stable/newton' --allowed-address ip_address=${EXTRA_NW_SUBNET[0]} --allowed-address ip_address=${EXTRA_NW_SUBNET[1]} --allowed-address ip-address=${EXTRA_NW_SUBNET[0]} --allowed-address ip-address=${EXTRA_NW_SUBNET[1]}
100 Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
101 Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
102 Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
103 Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
104 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${PORT_URL} ${PORT_LIST}
105 Update Port ${PORT_LIST[0]} additional_args=--name ${UPDATE_PORT}
106 ${output} = Show Port ${UPDATE_PORT}
107 Should Contain ${output} ${UPDATE_PORT}
108 Update Port ${UPDATE_PORT} additional_args=--name ${PORT_LIST[0]}
111 [Documentation] Create Vm instances on compute node with port
112 Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES_NET10[0]} ${OS_COMPUTE_1_IP} sg=${SECURITY_GROUP}
113 Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES_NET10[1]} ${OS_COMPUTE_2_IP} sg=${SECURITY_GROUP}
114 Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES_NET20[0]} ${OS_COMPUTE_1_IP} sg=${SECURITY_GROUP}
115 Create Vm Instance With Port On Compute Node ${PORT_LIST[3]} ${VM_INSTANCES_NET20[1]} ${OS_COMPUTE_2_IP} sg=${SECURITY_GROUP}
116 ${VM_INSTANCES}= Create List @{VM_INSTANCES_NET10} @{VM_INSTANCES_NET20}
117 : FOR ${VM} IN @{VM_INSTANCES}
118 \ Poll VM Is ACTIVE ${VM}
120 Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNETS_CIDR}
121 ${prefix_net10}= Replace String ${SUBNETS_CIDR[0]} ::/64 (:[a-f0-9]{,4}){,4}
123 ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 5x 60s Collect VM IPv6 SLAAC Addresses
124 ... true ${prefix_net10} @{VM_INSTANCES_NET10}
125 ${prefix_net20}= Replace String ${SUBNETS_CIDR[1]} ::/64 (:[a-f0-9]{,4}){,4}
127 ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 5x 60s Collect VM IPv6 SLAAC Addresses
128 ... true ${prefix_net20} @{VM_INSTANCES_NET20}
129 ${VM_IP_NET10}= Collect VM IPv6 SLAAC Addresses false ${prefix_net10} @{VM_INSTANCES_NET10}
130 ${VM_IP_NET20}= Collect VM IPv6 SLAAC Addresses false ${prefix_net20} @{VM_INSTANCES_NET20}
133 ${VM_INSTANCES}= Collections.Combine Lists ${VM_INSTANCES_NET10} ${VM_INSTANCES_NET20}
134 ${VM_IPS}= Collections.Combine Lists ${VM_IP_NET10} ${VM_IP_NET20}
135 Log Many Obtained IPs ${VM_IPS}
136 ${LOOP_COUNT} Get Length ${VM_INSTANCES_NET10}
137 : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
138 \ ${status} ${message} Run Keyword And Ignore Error Should Not Contain @{VM_IPS}[${index}] None
139 \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt openstack console log show @{VM_INSTANCES}[${index}] 30s
141 Set Suite Variable ${VM_IP_NET10}
143 Set Suite Variable ${VM_IP_NET20}
144 Should Not Contain ${VM_IP_NET10} None
145 Should Not Contain ${VM_IP_NET20} None
146 [Teardown] Run Keywords Show Debugs @{VM_INSTANCES_NET10} @{VM_INSTANCES_NET20}
147 ... AND Get Test Teardown Debugs
149 Check ELAN Datapath Traffic Within The Networks
150 [Documentation] Checks datapath within the same network with different vlans.
151 ${output}= Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ping6 -c 3 ${VM_IP_NET10[1]}
152 Should Contain ${output} 64 bytes
153 ${output}= Execute Command on VM Instance @{NETWORKS}[1] ${VM_IP_NET20[0]} ping6 -c 3 ${VM_IP_NET20[1]}
154 Should Contain ${output} 64 bytes
156 Check L3_Datapath Traffic Across Networks With Router
157 [Documentation] Datapath test across the networks using router for L3.
158 Log Verification of FIB Entries and Flow
159 ${cn1_conn_id} = Start Packet Capture on Node ${OS_COMPUTE_1_IP} file_Name=tcpDumpCN1
160 ${cn2_conn_id} = Start Packet Capture on Node ${OS_COMPUTE_2_IP} file_Name=tcpDumpCN2
161 ${os_conn_id} = Start Packet Capture on Node ${OS_CONTROL_NODE_IP} file_Name=tcpDumpOS
162 ${vm_instances} = Create List @{VM_IP_NET10} @{VM_IP_NET20}
163 Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${FIB_ENTRY_URL} ${vm_instances}
164 Wait Until Keyword Succeeds 30s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${VM_IP_NET10}
165 Wait Until Keyword Succeeds 30s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${VM_IP_NET20}
166 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Entry On ODL ${GWMAC_ADDRS}
167 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP}
168 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
169 Log L3 Datapath test across the networks using router
170 ${dst_ip_list} = Create List ${VM_IP_NET10[1]} @{VM_IP_NET20}
171 Log Many Destination IPs list ${dst_ip_list}
172 Log Many Source IP ${VM_IP_NET10[1]}
173 Test Operations From Vm Instance ${NETWORKS[0]} ${VM_IP_NET10[0]} ${dst_ip_list}
174 ${dst_ip_list} = Create List ${VM_IP_NET20[1]} @{VM_IP_NET10}
175 Log Many Destination IPs list ${dst_ip_list}
176 Log Many Source IP ${VM_IP_NET20[0]}
177 Test Operations From Vm Instance ${NETWORKS[1]} ${VM_IP_NET20[0]} ${dst_ip_list}
178 [Teardown] Test Teardown With Tcpdump Stop ${cn1_conn_id} ${cn2_conn_id} ${os_conn_id}
180 Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
181 [Documentation] Add multiple extra routes and check data path before L3VPN creation
182 Log "Adding extra one route to VM"
183 ${CONFIG_EXTRA_ROUTE_IP1} = Catenate sudo ip -6 addr add ${EXTRA_NW_IP[0]}/64 dev eth0
184 Log ${CONFIG_EXTRA_ROUTE_IP1}
185 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP1}
186 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ip -6 a
187 ${CONFIG_EXTRA_ROUTE_IP2} = Catenate sudo ip -6 addr add ${EXTRA_NW_IP[1]}/64 dev eth0
188 Log ${CONFIG_EXTRA_ROUTE_IP2}
189 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP2}
190 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ip -6 a
191 ${EXT_RT1} = Set Variable destination=${EXTRA_NW_SUBNET[0]},gateway=${VM_IP_NET10[0]}
192 ${EXT_RT2} = Set Variable destination=${EXTRA_NW_SUBNET[1]},gateway=${VM_IP_NET10[0]}
193 ${cmd} = Catenate ${RT_OPTIONS} ${EXT_RT1} ${RT_OPTIONS} ${EXT_RT2}
194 Update Router @{ROUTERS}[0] ${cmd}
195 Show Router @{ROUTERS}[0] -D
196 Log "Verify FIB table"
197 ${vm_instances} = Create List @{EXTRA_NW_SUBNET}
198 Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${FIB_ENTRY_URL} ${vm_instances}
199 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[1]} ping6 -c 3 @{EXTRA_NW_IP}[1]
200 Should Contain ${output} 64 bytes
201 ${output} = Execute Command on VM Instance @{NETWORKS}[1] ${VM_IP_NET20[1]} ping6 -c 3 @{EXTRA_NW_IP}[1]
202 Should Contain ${output} 64 bytes
203 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[1]} ping6 -c 3 @{EXTRA_NW_IP}[0]
204 Should Contain ${output} 64 bytes
207 [Documentation] Delete the extra routes
208 Update Router @{ROUTERS}[0] ${RT_CLEAR}
209 Show Router @{ROUTERS}[0] -D
211 Delete And Recreate Extra Route
212 [Documentation] Recreate multiple extra route and check data path before L3VPN creation
213 Log "Adding extra route to VM"
214 ${CONFIG_EXTRA_ROUTE_IP1} = Catenate sudo ip -6 addr add ${EXTRA_NW_IP[1]}/64 dev eth0
215 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP1}
216 ${EXT_RT1} = Set Variable destination=${EXTRA_NW_SUBNET[0]},gateway=${VM_IP_NET10[0]}
217 ${cmd} = Catenate ${RT_OPTIONS} ${EXT_RT1}
218 Update Router @{ROUTERS}[0] ${cmd}
219 Show Router @{ROUTERS}[0] -D
220 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[1]} ping6 -c 3 @{EXTRA_NW_IP}[0]
221 Should Contain ${output} 64 bytes
222 # clear off extra-routes before the next set of tests
223 [Teardown] Run Keywords Update Router @{ROUTERS}[0] ${RT_CLEAR}
224 ... AND Show Router @{ROUTERS}[0] -D
225 ... AND Get Test Teardown Debugs
228 [Documentation] Creates L3VPN and verify the same
229 ${net_id} = Get Net Id @{NETWORKS}[0] ${devstack_conn_id}
230 ${tenant_id} = Get Tenant ID From Network ${net_id}
231 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[0]} name=${VPN_NAME[0]} rd=@{RDS}[0] exportrt=@{RDS}[0] importrt=@{RDS}[0] tenantid=${tenant_id}
232 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
233 Should Contain ${resp} ${VPN_INSTANCE_ID[0]}
235 Associate L3VPN To Routers
236 [Documentation] Associating router to L3VPN
237 ${router_id}= Get Router Id ${ROUTERS[0]} ${devstack_conn_id}
238 Associate VPN to Router routerid=${router_id} vpnid=${VPN_INSTANCE_ID[0]}
239 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
240 Should Contain ${resp} ${router_id}
242 Verify L3VPN Datapath With Router Association
243 [Documentation] Datapath test across the networks using L3VPN with router association.
244 Log Verify VPN interfaces, FIB entries and Flow table
245 ${vm_instances} = Create List @{VM_IP_NET10} @{VM_IP_NET20}
246 Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${VPN_IFACES_URL} ${vm_instances}
247 ${RD} = Strip String ${RDS[0]} characters="[]
249 Wait Until Keyword Succeeds 60s 5s Check For Elements At URI ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/ ${vm_instances}
250 Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_instances}
251 Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${vm_instances}
252 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Entry On ODL ${GWMAC_ADDRS}
253 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP}
254 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
255 Log Check datapath from network1 to network2
256 ${dst_ip_list} = Create List @{VM_IP_NET10}[1] @{VM_IP_NET20}
258 Test Operations From Vm Instance ${NETWORKS[0]} @{VM_IP_NET10}[0] ${dst_ip_list}
259 Log Check datapath from network2 to network1
260 ${dst_ip_list} = Create List @{VM_IP_NET20}[1] @{VM_IP_NET10}
262 Test Operations From Vm Instance ${NETWORKS[1]} @{VM_IP_NET20}[0] ${dst_ip_list}
264 Dissociate L3VPN From Routers
265 [Documentation] Dissociating router from L3VPN
266 ${router_id}= Get Router Id ${ROUTERS[0]} ${devstack_conn_id}
267 Dissociate VPN to Router routerid=${router_id} vpnid=${VPN_INSTANCE_ID[0]}
268 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
269 Should Not Contain ${resp} ${router_id}
271 Delete Router And Router Interfaces With L3VPN
272 [Documentation] Delete Router and Interface to the subnets with L3VPN associate
273 # Asscoiate router with L3VPN
274 ${router_id}= Get Router Id ${ROUTERS[0]} ${devstack_conn_id}
275 Associate VPN to Router routerid=${router_id} vpnid=${VPN_INSTANCE_ID[0]}
276 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
277 Should Contain ${resp} ${router_id}
279 : FOR ${INTERFACE} IN @{SUBNETS}
280 \ Remove Interface ${ROUTERS[0]} ${INTERFACE}
281 ${interface_output} = Show Router Interface ${ROUTERS[0]}
282 : FOR ${INTERFACE} IN @{SUBNETS}
283 \ ${subnet_id} = Get Subnet Id ${INTERFACE} ${devstack_conn_id}
284 \ Should Not Contain ${interface_output} ${subnet_id}
285 # Delete Router and Interface to the subnets.
286 Delete Router ${ROUTERS[0]}
287 ${router_output} = List Router
289 Should Not Contain ${router_output} ${ROUTERS[0]}
290 ${router_list} = Create List ${ROUTERS[0]}
291 Wait Until Keyword Succeeds 3s 1s Check For Elements Not At URI ${ROUTER_URL} ${router_list}
292 # Verify Router Entry removed from L3VPN
293 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
294 Should Not Contain ${resp} ${router_id}
295 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_1_IP}
296 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_2_IP}
298 Delete Router With NonExistentRouter Name
299 [Documentation] Delete router with nonExistentRouter name
300 ${rc} ${output}= Run And Return Rc And Output neutron router-delete nonExistentRouter
303 Should Match Regexp ${output} Unable to find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
305 Associate L3VPN To Networks
306 [Documentation] Associates L3VPN to networks and verify
307 ${network1_id} = Get Net Id ${NETWORKS[0]} ${devstack_conn_id}
308 ${network2_id} = Get Net Id ${NETWORKS[1]} ${devstack_conn_id}
309 Associate L3VPN To Network networkid=${network1_id} vpnid=${VPN_INSTANCE_ID[0]}
310 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
311 Should Contain ${resp} ${network1_id}
312 Associate L3VPN To Network networkid=${network2_id} vpnid=${VPN_INSTANCE_ID[0]}
313 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
314 Should Contain ${resp} ${network2_id}
316 Dissociate L3VPN From Networks
317 [Documentation] Dissociate L3VPN from networks
318 ${network1_id} = Get Net Id ${NETWORKS[0]} ${devstack_conn_id}
319 ${network2_id} = Get Net Id ${NETWORKS[1]} ${devstack_conn_id}
320 Dissociate L3VPN From Networks networkid=${network1_id} vpnid=${VPN_INSTANCE_ID[0]}
321 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
322 Should Not Contain ${resp} ${network1_id}
323 Dissociate L3VPN From Networks networkid=${network2_id} vpnid=${VPN_INSTANCE_ID[0]}
324 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
325 Should Not Contain ${resp} ${network2_id}
328 [Documentation] Delete L3VPN
329 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[0]}
331 Create Multiple L3VPN
332 [Documentation] Creates three L3VPNs and then verify the same
333 ${net_id} = Get Net Id @{NETWORKS}[0] ${devstack_conn_id}
334 ${tenant_id} = Get Tenant ID From Network ${net_id}
335 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[0]} name=${VPN_NAME[0]} rd=${RDS[0]} exportrt=${RDS[0]} importrt=${RDS[0]} tenantid=${tenant_id}
336 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[1]} name=${VPN_NAME[1]} rd=${RDS[1]} exportrt=${RDS[1]} importrt=${RDS[1]} tenantid=${tenant_id}
337 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[2]} name=${VPN_NAME[2]} rd=${RDS[2]} exportrt=${RDS[2]} importrt=${RDS[2]} tenantid=${tenant_id}
338 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
339 Should Contain ${resp} ${VPN_INSTANCE_ID[0]}
340 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[1]}
341 Should Contain ${resp} ${VPN_INSTANCE_ID[1]}
342 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[2]}
343 Should Contain ${resp} ${VPN_INSTANCE_ID[2]}
345 Delete Multiple L3VPN
346 [Documentation] Delete three L3VPNs created using Multiple L3VPN Test
347 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[0]}
348 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[1]}
349 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[2]}
352 Test Teardown With Tcpdump Stop
353 [Arguments] ${cn1_conn_id} ${cn2_conn_id} ${os_conn_id}
354 Stop Packet Capture on Node ${cn1_conn_id}
355 Stop Packet Capture on Node ${cn2_conn_id}
356 Stop Packet Capture on Node ${os_conn_id}
357 Get Test Teardown Debugs
359 Get Gateway MAC And IP Address
360 [Arguments] ${router_Name}
361 [Documentation] Get Gateway mac and IP Address
362 ${output} = Write Commands Until Prompt neutron router-port-list ${router_Name} 30s
363 @{MacAddr-list} = Get Regexp Matches ${output} ${MAC_REGEX}
364 @{IpAddr-list} = Get Regexp Matches ${output} ${IP6_REGEX}
365 [Return] ${MacAddr-list} ${IpAddr-list}
367 Verify GWMAC Flow Entry On Flow Table
369 [Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
370 ${flow_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
372 ${group_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-groups br-int
374 Should Contain ${flow_output} table=${DISPATCHER_TABLE}
375 ${dispatcher_table} = Get Lines Containing String ${flow_output} table=${DISPATCHER_TABLE}
376 Log ${dispatcher_table}
377 Should Contain ${dispatcher_table} goto_table:${GWMAC_TABLE}
378 Should Not Contain ${dispatcher_table} goto_table:${ARP_RESPONSE_TABLE}
379 Should Contain ${flow_output} table=${GWMAC_TABLE}
380 ${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
382 #Verify GWMAC address present in table 19
383 : FOR ${macAdd} IN @{GWMAC_ADDRS}
384 \ Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
386 Should Contain ${gwmac_table} actions=resubmit(,17)
387 #Verify ARP_CHECK_TABLE - 43
388 #arp request and response
389 ${arpchk_table} = Get Lines Containing String ${flow_output} table=${ARP_CHECK_TABLE}
390 Should Match Regexp ${arpchk_table} ${ARP_RESPONSE_REGEX}
391 ${match} = Should Match Regexp ${arpchk_table} ${ARP_REQUEST_REGEX}
392 ${groupID} = Split String ${match} separator=:
394 Should Contain ${flow_output} table=${IPV6_TABLE}
395 ${icmp_ipv6_flows} = Get Lines Containing String ${flow_output} icmp_type=135
396 Log ${icmp_ipv6_flows}
397 : FOR ${ip_addr} IN @{GWIP_ADDRS}
398 \ ${rule} = Set Variable icmp_type=135,icmp_code=0,nd_target=${ip_addr} actions=CONTROLLER:65535
399 \ Should Match Regexp ${icmp_ipv6_flows} ${rule}