2 Documentation Test suite to validate 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 Basic Vpnservice Suite Setup
6 Suite Teardown Basic Vpnservice Suite Teardown
7 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
8 Test Teardown Get Test Teardown Debugs
9 Library OperatingSystem
10 Library RequestsLibrary
11 Resource ../../../libraries/Utils.robot
12 Resource ../../../libraries/OpenStackOperations.robot
13 Resource ../../../libraries/DevstackUtils.robot
14 Resource ../../../libraries/VpnOperations.robot
15 Resource ../../../libraries/OVSDB.robot
16 Resource ../../../libraries/SetupUtils.robot
17 Resource ../../../libraries/Tcpdump.robot
18 Resource ../../../variables/Variables.robot
19 Resource ../../../variables/netvirt/Variables.robot
22 @{NETWORKS} NET10 NET20
23 @{SUBNETS} SUBNET1 SUBNET2
24 @{SUBNETS_CIDR} 10.1.1.0/24 20.1.1.0/24
25 @{PORT_LIST} PORT11 PORT21 PORT12 PORT22
26 @{VM_INSTANCES_NET10} VM11 VM21
27 @{VM_INSTANCES_NET20} VM12 VM22
28 @{ROUTERS} ROUTER_1 ROUTER_2
29 @{EXTRA_NW_IP} 40.1.1.2 50.1.1.2
30 @{EXTRA_NW_SUBNET} 40.1.1.0/24 50.1.1.0/24
31 ${SECURITY_GROUP} sg-vpnservice
32 ${UPDATE_NETWORK} UpdateNetwork
33 ${UPDATE_SUBNET} UpdateSubnet
34 ${UPDATE_PORT} UpdatePort
37 Create Neutron Networks
38 [Documentation] Create two networks
39 Create Network ${NETWORKS[0]}
40 Create Network ${NETWORKS[1]}
41 ${NET_LIST} List Networks
42 Should Contain ${NET_LIST} ${NETWORKS[0]}
43 Should Contain ${NET_LIST} ${NETWORKS[1]}
44 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${NETWORK_URL} ${NETWORKS}
45 Update Network ${NETWORKS[0]} additional_args=--description ${UPDATE_NETWORK}
46 ${output} = Show Network ${NETWORKS[0]}
47 Should Contain ${output} ${UPDATE_NETWORK}
49 Create Neutron Subnets
50 [Documentation] Create two subnets for previously created networks
51 Create SubNet ${NETWORKS[0]} ${SUBNETS[0]} ${SUBNETS_CIDR[0]}
52 Create SubNet ${NETWORKS[1]} ${SUBNETS[1]} ${SUBNETS_CIDR[1]}
53 ${SUB_LIST} List Subnets
54 Should Contain ${SUB_LIST} ${SUBNETS[0]}
55 Should Contain ${SUB_LIST} ${SUBNETS[1]}
56 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${SUBNETWORK_URL} ${SUBNETS}
57 Update SubNet ${SUBNETS[0]} additional_args=--description ${UPDATE_SUBNET}
58 ${output} = Show SubNet ${SUBNETS[0]}
59 Should Contain ${output} ${UPDATE_SUBNET}
62 [Documentation] Allow all TCP/UDP/ICMP packets for this suite
63 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
66 [Documentation] Create four ports under previously created subnets
67 ${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]}
68 Create Port ${NETWORKS[0]} ${PORT_LIST[0]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
69 Create Port ${NETWORKS[0]} ${PORT_LIST[1]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
70 Create Port ${NETWORKS[1]} ${PORT_LIST[2]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
71 Create Port ${NETWORKS[1]} ${PORT_LIST[3]} sg=${SECURITY_GROUP} additional_args=${allowed_address_pairs_args}
72 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${CONFIG_API}/neutron:neutron/ports/ ${PORT_LIST}
73 ${PORTS_MACADDR} = Get Ports MacAddr ${PORT_LIST}
74 Set Suite Variable ${PORTS_MACADDR}
75 Update Port ${PORT_LIST[0]} additional_args=--description ${UPDATE_PORT}
76 ${output} = Show Port ${PORT_LIST[0]}
79 [Documentation] Create Vm instances on compute node with port
80 Create Vm Instance With Port On Compute Node ${PORT_LIST[0]} ${VM_INSTANCES_NET10[0]} ${OS_COMPUTE_1_IP} sg=${SECURITY_GROUP}
81 Create Vm Instance With Port On Compute Node ${PORT_LIST[1]} ${VM_INSTANCES_NET10[1]} ${OS_COMPUTE_2_IP} sg=${SECURITY_GROUP}
82 Create Vm Instance With Port On Compute Node ${PORT_LIST[2]} ${VM_INSTANCES_NET20[0]} ${OS_COMPUTE_1_IP} sg=${SECURITY_GROUP}
83 Create Vm Instance With Port On Compute Node ${PORT_LIST[3]} ${VM_INSTANCES_NET20[1]} ${OS_COMPUTE_2_IP} sg=${SECURITY_GROUP}
84 ${VM_INSTANCES} = Create List @{VM_INSTANCES_NET10} @{VM_INSTANCES_NET20}
85 : FOR ${VM} IN @{VM_INSTANCES}
86 \ Poll VM Is ACTIVE ${VM}
87 Wait Until Keyword Succeeds 30s 10s Wait For Routes To Propogate ${NETWORKS} ${SUBNETS_CIDR}
88 ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
89 ... true @{VM_INSTANCES_NET10}
90 ${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
91 ... true @{VM_INSTANCES_NET20}
92 ${VM_IP_NET10} ${DHCP_IP1} Collect VM IP Addresses false @{VM_INSTANCES_NET10}
93 ${VM_IP_NET20} ${DHCP_IP2} Collect VM IP Addresses false @{VM_INSTANCES_NET20}
94 ${VM_INSTANCES}= Collections.Combine Lists ${VM_INSTANCES_NET10} ${VM_INSTANCES_NET20}
95 ${VM_IPS}= Collections.Combine Lists ${VM_IP_NET10} ${VM_IP_NET20}
96 Log Many Obtained IPs ${VM_IPS}
97 ${LOOP_COUNT} Get Length ${VM_INSTANCES_NET10}
98 : FOR ${index} IN RANGE 0 ${LOOP_COUNT}
99 \ ${status} ${message} Run Keyword And Ignore Error Should Not Contain @{VM_IPS}[${index}] None
100 \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt openstack console log show @{VM_INSTANCES}[${index}] 30s
102 Set Suite Variable ${VM_IP_NET10}
104 Set Suite Variable ${VM_IP_NET20}
105 Should Not Contain ${VM_IP_NET10} None
106 Should Not Contain ${VM_IP_NET20} None
107 [Teardown] Run Keywords Show Debugs @{VM_INSTANCES_NET10} @{VM_INSTANCES_NET20}
108 ... AND Get Test Teardown Debugs
110 Check ELAN Datapath Traffic Within The Networks
111 [Documentation] Checks datapath within the same network with different vlans.
112 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ping -c 3 ${VM_IP_NET10[1]}
113 Should Contain ${output} 64 bytes
114 ${output} = Execute Command on VM Instance @{NETWORKS}[1] ${VM_IP_NET20[0]} ping -c 3 ${VM_IP_NET20[1]}
115 Should Contain ${output} 64 bytes
118 [Documentation] Create Router
119 Create Router ${ROUTERS[0]}
120 ${router_output} = List Router
121 Should Contain ${router_output} ${ROUTERS[0]}
122 ${router_list} = Create List ${ROUTERS[0]}
123 Wait Until Keyword Succeeds 3s 1s Check For Elements At URI ${ROUTER_URL} ${router_list}
125 Add Interfaces To Router
126 [Documentation] Add Interfaces
127 : FOR ${INTERFACE} IN @{SUBNETS}
128 \ Add Router Interface ${ROUTERS[0]} ${INTERFACE}
129 ${interface_output} = Show Router Interface ${ROUTERS[0]}
130 ${GWMAC_ADDRS} ${GWIP_ADDRS} = Get Gateway MAC And IP Address ${ROUTERS[0]}
132 Set Suite Variable ${GWMAC_ADDRS}
134 Set Suite Variable ${GWIP_ADDRS}
136 Check L3_Datapath Traffic Across Networks With Router
137 [Documentation] Datapath test across the networks using router for L3.
138 Log Verification of FIB Entries and Flow
139 ${cn1_conn_id} = Start Packet Capture on Node ${OS_COMPUTE_1_IP} file_Name=tcpDumpCN1
140 ${cn2_conn_id} = Start Packet Capture on Node ${OS_COMPUTE_2_IP} file_Name=tcpDumpCN2
141 ${os_conn_id} = Start Packet Capture on Node ${OS_CONTROL_NODE_IP} file_Name=tcpDumpOS
142 ${vm_instances} = Create List @{VM_IP_NET10} @{VM_IP_NET20}
143 Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${FIB_ENTRY_URL} ${vm_instances}
144 Wait Until Keyword Succeeds 30s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_instances}
145 Wait Until Keyword Succeeds 30s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${vm_instances}
147 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Entry On ODL ${GWMAC_ADDRS}
148 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP}
149 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
150 Log L3 Datapath test across the networks using router
151 ${dst_ip_list} = Create List ${VM_IP_NET10[1]} @{VM_IP_NET20}
152 Test Operations From Vm Instance ${NETWORKS[0]} ${VM_IP_NET10[0]} ${dst_ip_list}
153 ${dst_ip_list} = Create List ${VM_IP_NET20[1]} @{VM_IP_NET10}
154 Test Operations From Vm Instance ${NETWORKS[1]} ${VM_IP_NET20[0]} ${dst_ip_list}
155 [Teardown] Test Teardown With Tcpdump Stop ${cn1_conn_id} ${cn2_conn_id} ${os_conn_id}
157 Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
158 [Documentation] Add multiple extra routes and check data path before L3VPN creation
159 Log "Adding extra one route to VM"
160 ${CONFIG_EXTRA_ROUTE_IP1} = Catenate sudo ifconfig eth0:1 @{EXTRA_NW_IP}[0] netmask 255.255.255.0 up
161 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP1}
162 ${CONFIG_EXTRA_ROUTE_IP2} = Catenate sudo ifconfig eth0:2 @{EXTRA_NW_IP}[1] netmask 255.255.255.0 up
163 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP2}
164 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ifconfig
165 ${EXT_RT1} = Set Variable destination=40.1.1.0/24,gateway=${VM_IP_NET10[0]}
166 ${EXT_RT2} = Set Variable destination=50.1.1.0/24,gateway=${VM_IP_NET10[0]}
167 ${cmd} = Catenate ${RT_OPTIONS} ${EXT_RT1} ${RT_OPTIONS} ${EXT_RT2}
168 Update Router @{ROUTERS}[0] ${cmd}
169 Show Router @{ROUTERS}[0] -D
170 Log "Verify FIB table"
171 ${vm_instances} = Create List @{EXTRA_NW_SUBNET}
172 Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${FIB_ENTRY_URL} ${vm_instances}
173 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[1]} ping -c 3 @{EXTRA_NW_IP}[1]
174 Should Contain ${output} 64 bytes
175 ${output} = Execute Command on VM Instance @{NETWORKS}[1] ${VM_IP_NET20[1]} ping -c 3 @{EXTRA_NW_IP}[1]
176 Should Contain ${output} 64 bytes
177 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[1]} ping -c 3 @{EXTRA_NW_IP}[0]
178 Should Contain ${output} 64 bytes
181 [Documentation] Delete the extra routes
182 Update Router @{ROUTERS}[0] ${RT_CLEAR}
183 Show Router @{ROUTERS}[0] -D
185 Delete And Recreate Extra Route
186 [Documentation] Recreate multiple extra route and check data path before L3VPN creation
187 Log "Adding extra route to VM"
188 ${CONFIG_EXTRA_ROUTE_IP1} = Catenate sudo ifconfig eth0:1 @{EXTRA_NW_IP}[0] netmask 255.255.255.0 up
189 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[0]} ${CONFIG_EXTRA_ROUTE_IP1}
190 ${EXT_RT1} = Set Variable destination=40.1.1.0/24,gateway=${VM_IP_NET10[0]}
191 ${cmd} = Catenate ${RT_OPTIONS} ${EXT_RT1}
192 Update Router @{ROUTERS}[0] ${cmd}
193 Show Router @{ROUTERS}[0] -D
194 ${output} = Execute Command on VM Instance @{NETWORKS}[0] ${VM_IP_NET10[1]} ping -c 3 @{EXTRA_NW_IP}[0]
195 Should Contain ${output} 64 bytes
196 # clear off extra-routes before the next set of tests
197 [Teardown] Run Keywords Update Router @{ROUTERS}[0] ${RT_CLEAR}
198 ... AND Show Router @{ROUTERS}[0] -D
199 ... AND Get Test Teardown Debugs
202 [Documentation] Creates L3VPN and verify the same
203 ${net_id} = Get Net Id @{NETWORKS}[0] ${devstack_conn_id}
204 ${tenant_id} = Get Tenant ID From Network ${net_id}
206 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[0]} name=${VPN_NAME[0]} rd=@{RDS}[0] exportrt=@{RDS}[0] importrt=@{RDS}[0] tenantid=${tenant_id}
207 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
208 Should Contain ${resp} ${VPN_INSTANCE_ID[0]}
210 Associate L3VPN To Routers
211 [Documentation] Associating router to L3VPN
212 ${router_id}= Get Router Id ${ROUTERS[0]} ${devstack_conn_id}
213 Associate VPN to Router routerid=${router_id} vpnid=${VPN_INSTANCE_ID[0]}
214 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
215 Should Contain ${resp} ${router_id}
217 Verify L3VPN Datapath With Router Association
218 [Documentation] Datapath test across the networks using L3VPN with router association.
219 Log Verify VPN interfaces, FIB entries and Flow table
220 ${vm_instances} = Create List @{VM_IP_NET10} @{VM_IP_NET20}
221 Wait Until Keyword Succeeds 30s 5s Check For Elements At URI ${VPN_IFACES_URL} ${vm_instances}
222 ${RD} = Strip String ${RDS[0]} characters="[]
223 Wait Until Keyword Succeeds 60s 5s Check For Elements At URI ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/ ${vm_instances}
224 Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_1_IP} ${vm_instances}
225 Wait Until Keyword Succeeds 60s 5s Verify Flows Are Present For L3VPN ${OS_COMPUTE_2_IP} ${vm_instances}
227 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Entry On ODL ${GWMAC_ADDRS}
228 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_1_IP}
229 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry On Flow Table ${OS_COMPUTE_2_IP}
230 Log Check datapath from network1 to network2
231 ${dst_ip_list} = Create List @{VM_IP_NET10}[1] @{VM_IP_NET20}
232 Test Operations From Vm Instance ${NETWORKS[0]} @{VM_IP_NET10}[0] ${dst_ip_list}
233 Log Check datapath from network2 to network1
234 ${dst_ip_list} = Create List @{VM_IP_NET20}[1] @{VM_IP_NET10}
235 Test Operations From Vm Instance ${NETWORKS[1]} @{VM_IP_NET20}[0] ${dst_ip_list}
237 Dissociate L3VPN From Routers
238 [Documentation] Dissociating router from L3VPN
239 ${router_id}= Get Router Id ${ROUTERS[0]} ${devstack_conn_id}
240 Dissociate VPN to Router routerid=${router_id} vpnid=${VPN_INSTANCE_ID[0]}
241 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
242 Should Not Contain ${resp} ${router_id}
244 Delete Router And Router Interfaces With L3VPN
245 [Documentation] Delete Router and Interface to the subnets with L3VPN assciate
246 # Asscoiate router with L3VPN
247 ${router_id}= Get Router Id ${ROUTERS[0]} ${devstack_conn_id}
248 Associate VPN to Router routerid=${router_id} vpnid=${VPN_INSTANCE_ID[0]}
249 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
250 Should Contain ${resp} ${router_id}
252 : FOR ${INTERFACE} IN @{SUBNETS}
253 \ Remove Interface ${ROUTERS[0]} ${INTERFACE}
254 ${interface_output} = Show Router Interface ${ROUTERS[0]}
255 : FOR ${INTERFACE} IN @{SUBNETS}
256 \ ${subnet_id} = Get Subnet Id ${INTERFACE} ${devstack_conn_id}
257 \ Should Not Contain ${interface_output} ${subnet_id}
258 # Delete Router and Interface to the subnets.
259 Delete Router ${ROUTERS[0]}
260 ${router_output} = List Router
261 Should Not Contain ${router_output} ${ROUTERS[0]}
262 ${router_list} = Create List ${ROUTERS[0]}
263 Wait Until Keyword Succeeds 3s 1s Check For Elements Not At URI ${ROUTER_URL} ${router_list}
264 # Verify Router Entry removed from L3VPN
265 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
266 Should Not Contain ${resp} ${router_id}
267 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_1_IP}
268 Wait Until Keyword Succeeds 30s 5s Verify GWMAC Flow Entry Removed From Flow Table ${OS_COMPUTE_2_IP}
270 Delete Router With NonExistentRouter Name
271 [Documentation] Delete router with nonExistentRouter name
272 ${rc} ${output}= Run And Return Rc And Output neutron router-delete nonExistentRouter
273 Should Match Regexp ${output} Unable to find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
275 Associate L3VPN To Networks
276 [Documentation] Associates L3VPN to networks and verify
277 ${network1_id} = Get Net Id ${NETWORKS[0]} ${devstack_conn_id}
278 ${network2_id} = Get Net Id ${NETWORKS[1]} ${devstack_conn_id}
279 Associate L3VPN To Network networkid=${network1_id} vpnid=${VPN_INSTANCE_ID[0]}
280 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
281 Should Contain ${resp} ${network1_id}
282 Associate L3VPN To Network networkid=${network2_id} vpnid=${VPN_INSTANCE_ID[0]}
283 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
284 Should Contain ${resp} ${network2_id}
286 Dissociate L3VPN From Networks
287 [Documentation] Dissociate L3VPN from networks
288 ${network1_id} = Get Net Id ${NETWORKS[0]} ${devstack_conn_id}
289 ${network2_id} = Get Net Id ${NETWORKS[1]} ${devstack_conn_id}
290 Dissociate L3VPN From Networks networkid=${network1_id} vpnid=${VPN_INSTANCE_ID[0]}
291 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
292 Should Not Contain ${resp} ${network1_id}
293 Dissociate L3VPN From Networks networkid=${network2_id} vpnid=${VPN_INSTANCE_ID[0]}
294 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
295 Should Not Contain ${resp} ${network2_id}
298 [Documentation] Delete L3VPN
299 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[0]}
301 Create Multiple L3VPN
302 [Documentation] Creates three L3VPNs and then verify the same
303 ${net_id} = Get Net Id @{NETWORKS}[0] ${devstack_conn_id}
304 ${tenant_id} = Get Tenant ID From Network ${net_id}
305 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[0]} name=${VPN_NAME[0]} rd=${RDS[0]} exportrt=${RDS[0]} importrt=${RDS[0]} tenantid=${tenant_id}
306 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[1]} name=${VPN_NAME[1]} rd=${RDS[1]} exportrt=${RDS[1]} importrt=${RDS[1]} tenantid=${tenant_id}
307 VPN Create L3VPN vpnid=${VPN_INSTANCE_ID[2]} name=${VPN_NAME[2]} rd=${RDS[2]} exportrt=${RDS[2]} importrt=${RDS[2]} tenantid=${tenant_id}
308 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[0]}
309 Should Contain ${resp} ${VPN_INSTANCE_ID[0]}
310 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[1]}
311 Should Contain ${resp} ${VPN_INSTANCE_ID[1]}
312 ${resp}= VPN Get L3VPN vpnid=${VPN_INSTANCE_ID[2]}
313 Should Contain ${resp} ${VPN_INSTANCE_ID[2]}
315 Check Datapath Traffic Across Networks With L3VPN
316 [Documentation] Datapath Test Across the networks with VPN.
318 Log This test will be added in the next patch
320 Delete Multiple L3VPN
321 [Documentation] Delete three L3VPNs created using Multiple L3VPN Test
322 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[0]}
323 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[1]}
324 VPN Delete L3VPN vpnid=${VPN_INSTANCE_ID[2]}
327 Test Teardown With Tcpdump Stop
328 [Arguments] ${cn1_conn_id} ${cn2_conn_id} ${os_conn_id}
329 Stop Packet Capture on Node ${cn1_conn_id}
330 Stop Packet Capture on Node ${cn2_conn_id}
331 Stop Packet Capture on Node ${os_conn_id}
332 Get Test Teardown Debugs
334 Get Gateway MAC And IP Address
335 [Arguments] ${router_Name}
336 [Documentation] Get Gateway mac and IP Address
337 ${output} = Write Commands Until Prompt neutron router-port-list ${router_Name} 30s
338 @{MacAddr-list} = Get Regexp Matches ${output} ${MAC_REGEX}
339 @{IpAddr-list} = Get Regexp Matches ${output} ${IP_REGEX}
340 [Return] ${MacAddr-list} ${IpAddr-list}
342 Verify GWMAC Flow Entry On Flow Table
344 [Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
345 ${flow_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
346 ${group_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-groups br-int
347 #Verify DISPATCHER_TABLE - 17
348 Should Contain ${flow_output} table=${DISPATCHER_TABLE}
349 ${dispatcher_table} = Get Lines Containing String ${flow_output} table=${DISPATCHER_TABLE}
350 Should Contain ${dispatcher_table} goto_table:${GWMAC_TABLE}
351 Should Not Contain ${dispatcher_table} goto_table:${ARP_RESPONSE_TABLE}
352 #Verify GWMAC_TABLE - 19
353 Should Contain ${flow_output} table=${GWMAC_TABLE}
354 ${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
355 #Verify GWMAC address present in table 19
356 : FOR ${macAdd} IN @{GWMAC_ADDRS}
357 \ Should Contain ${gwmac_table} dl_dst=${macAdd} actions=goto_table:${L3_TABLE}
359 Should Contain ${gwmac_table} actions=resubmit(,17)
360 #Verify ARP_CHECK_TABLE - 43
361 #arp request and response
362 ${arpchk_table} = Get Lines Containing String ${flow_output} table=${ARP_CHECK_TABLE}
363 Should Match Regexp ${arpchk_table} ${ARP_RESPONSE_REGEX}
364 ${match} = Should Match Regexp ${arpchk_table} ${ARP_REQUEST_REGEX}
365 ${groupID} = Split String ${match} separator=:
366 Verify ARP REQUEST in groupTable ${group_output} ${groupID[1]}
367 #Verify ARP_RESPONSE_TABLE - 81
368 Should Contain ${flow_output} table=${ARP_RESPONSE_TABLE}
369 ${arpResponder_table} = Get Lines Containing String ${flow_output} table=${ARP_RESPONSE_TABLE}
370 Should Contain ${arpResponder_table} priority=0 actions=drop
371 : FOR ${macAdd} ${ipAdd} IN ZIP ${GWMAC_ADDRS} ${GWIP_ADDRS}
372 \ ${ARP_RESPONSE_IP_MAC_REGEX} = Set Variable arp_tpa=${ipAdd},arp_op=1 actions=.*,set_field:${macAdd}->eth_src
373 \ Should Match Regexp ${arpResponder_table} ${ARP_RESPONSE_IP_MAC_REGEX}