Update Robot Framework format - step 11
[integration/test.git] / csit / suites / netvirt / vpnservice / arp_learning.robot
1 *** Settings ***
2 Documentation       Test suite for ARP Request. More test cases to be added in subsequent patches.
3
4 Library             RequestsLibrary
5 Library             SSHLibrary
6 Resource            ../../../libraries/DevstackUtils.robot
7 Resource            ../../../libraries/OpenStackOperations.robot
8 Resource            ../../../libraries/SetupUtils.robot
9 Resource            ../../../libraries/VpnOperations.robot
10 Resource            ../../../variables/netvirt/Variables.robot
11 Resource            ../../../variables/Variables.robot
12
13 Suite Setup         Suite Setup
14 Suite Teardown      Suite Teardown
15 Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
16 Test Teardown       OpenStackOperations.Get Test Teardown Debugs
17
18
19 *** Variables ***
20 ${SECURITY_GROUP}       vpna_sg
21 @{NETWORKS}             vpna_net_1    vpna_net_2    vpna_net_3
22 @{SUBNETS}              vpna_sub_1    vpna_sub_2    vpna_sub_3
23 @{SUBNET_CIDRS}         10.10.10.0/24    10.20.20.0/24    10.30.30.0/24
24 @{PORTS}
25 ...                     vpna_net_1_port_1
26 ...                     vpna_net_1_port_2
27 ...                     vpna_net_2_port_1
28 ...                     vpna_net_2_port_2
29 ...                     vpna_net_3_port_1
30 ...                     vpna_net_3_port_2
31 @{NET_1_VMS}            vpna_net_1_vm_1    vpna_net_1_vm_2
32 @{NET_2_VMS}            vpna_net_2_vm_1    vpna_net_2_vm_2
33 @{NET_3_VMS}            vpna_net_3_vm_1    vpna_net_3_vm_2
34 ${ROUTER}               vpna_router
35 @{VPN_INSTANCE_IDS}     4ae8cd92-48ca-49b5-94e1-b2921a261111
36 @{VPN_NAMES}            vpna_1
37 ${RD1}                  ["2200:2"]
38 ${RD2}                  ["2200:3"]
39 ${EXPORT_RT}            ["2200:2","2200:3"]
40 ${IMPORT_RT}            ["2200:2","2200:3"]
41 ${SUB_IF}               eth0:1
42 @{EXTRA_NW_IP}          192.168.10.110    192.168.20.110
43 ${FIB_ENTRY_2}          192.168.10.110
44 ${RPING_MIP_IP}         sudo arping -I eth0:1 -c 5 -b -s 192.168.10.110 192.168.10.110
45 ${RPING_MIP_IP_2}       sudo arping -I eth0:1 -c 5 -b -s 192.168.20.110 192.168.20.110
46 ${RPING_EXP_STR}        broadcast
47
48
49 *** Test Cases ***
50 Verify Setup
51     [Documentation]    Verify that VMs received ip and ping is happening between different VMs.
52     ...    For this, we ssh to the VM using the dhcp-namespace on the controller node and verify ping
53     ...    reachability to the second VM on the same network and VMs on other network (i.e., east-west routing)
54     ${vms} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{NET_3_VM_IPS}
55     BuiltIn.Wait Until Keyword Succeeds
56     ...    30s
57     ...    10s
58     ...    Utils.Check For Elements At URI
59     ...    ${FIB_ENTRIES_URL}
60     ...    ${vms}
61     Verify Ping On Same Networks
62     Verify Ping On Different Networks
63
64 Verify GARP Requests
65     [Documentation]    Verify that GARP request is sent to controller and controller learns this info.
66     ...    In this test-case, before we validate the GARPs, we ensure that the necessary pipeline
67     ...    flows for the VMs spawned on the networks are as expected (along with the FIB Entries
68     ...    in the ODL Datastore). For triggering GARPs, we create an alias interface (eth0:1) on
69     ...    VM1_net0, configure it with an extra_route_ip, trigger 5 GARPs from the VM for the
70     ...    extra_route_ip and ensure that ODL learns (by looking at odl-fib:fibEntries) the
71     ...    extra_route_ip info with the nexthop pointing to Compute-1 (where VM1_net0 is spawned)
72     ...    hostIP. Finally, we verify ping reachability to the extra_route_ip from other VMs on
73     ...    the network.
74     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
75     BuiltIn.Set Test Variable    ${fib_entry_1}    ${NET_1_VM_IPS}[0]
76     BuiltIn.Set Test Variable    ${fib_entry_3}    ${NET_1_VM_IPS}[1]
77     Verify Flows Are Present On All Compute Nodes
78     ${output} =    VpnOperations.Get Fib Entries    session
79     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${fib_entry_3}\/32".*"${OS_CMP2_IP}\\"
80     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${fib_entry_1}\/32".*"${OS_CMP1_IP}\\"
81     ${rx_packet1_before} =    OpenStackOperations.Execute Command on VM Instance
82     ...    ${NETWORKS}[0]
83     ...    ${NET_1_VM_IPS}[1]
84     ...    ifconfig eth0
85     ${rx_packet0_before} =    OpenStackOperations.Execute Command on VM Instance
86     ...    ${NETWORKS}[0]
87     ...    ${NET_1_VM_IPS}[0]
88     ...    ifconfig eth0
89     ${config_extra_route_ip1} =    BuiltIn.Catenate
90     ...    sudo ifconfig ${SUB_IF} ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
91     ${output} =    OpenStackOperations.Execute Command on VM Instance
92     ...    ${NETWORKS}[0]
93     ...    ${NET_1_VM_IPS}[1]
94     ...    ${config_extra_route_ip1}
95     ${output} =    OpenStackOperations.Execute Command on VM Instance
96     ...    ${NETWORKS}[0]
97     ...    ${NET_1_VM_IPS}[1]
98     ...    ifconfig
99     BuiltIn.Should Contain    ${output}    ${SUB_IF}
100     ${output} =    OpenStackOperations.Execute Command on VM Instance
101     ...    ${NETWORKS}[0]
102     ...    ${NET_1_VM_IPS}[1]
103     ...    ${RPING_MIP_IP}
104     BuiltIn.Should Contain    ${output}    broadcast
105     BuiltIn.Should Contain    ${output}    Received 0 reply
106     ${rx_packet1_after} =    OpenStackOperations.Execute Command on VM Instance
107     ...    ${NETWORKS}[0]
108     ...    ${NET_1_VM_IPS}[1]
109     ...    ifconfig eth0
110     ${rx_packet0_after} =    OpenStackOperations.Execute Command on VM Instance
111     ...    ${NETWORKS}[0]
112     ...    ${NET_1_VM_IPS}[0]
113     ...    ifconfig eth0
114     BuiltIn.Should Not Be Equal    ${rx_packet0_before}    ${rx_packet0_after}
115     BuiltIn.Should Not Be Equal    ${rx_packet1_before}    ${rx_packet1_after}
116     Verify Flows Are Present On All Compute Nodes
117     BuiltIn.Wait Until Keyword Succeeds    5s    1s    Verify Learnt IP    ${FIB_ENTRY_2}    session
118     ${output} =    VpnOperations.Get Fib Entries    session
119     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${fib_entry_3}\\/32".*"${OS_CMP2_IP}\\"
120     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${fib_entry_1}\\/32".*"${OS_CMP1_IP}\\"
121     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${FIB_ENTRY_2}\\/32".*"${OS_CMP2_IP}\\"
122     Verify Ping To Sub Interface    ${FIB_ENTRY_2}
123
124 Verify MIP Migration
125     [Documentation]    Verify that after migration of movable ip across compute nodes, the controller updates the routes.
126     ...    Unconfigure the extra_route_ip on VM1_net0 and configure it on vm0_net0 (on Compute-0 host).
127     ...    Trigger 5 GARPs from the VM for the extra_route_ip and ensure that ODL learns/updates
128     ...    the extra_route_ip info with nexthop in the FIB entry pointing to Compute-0 hostip.
129     BuiltIn.Pass Execution If    "${OPENSTACK_TOPO}" == "1cmb-0ctl-0cmp"    "Test is not supported for combo node"
130     ${unconfig_extra_route_ip1} =    BuiltIn.Catenate    sudo ifconfig ${SUB_IF} down
131     ${output} =    OpenStackOperations.Execute Command on VM Instance
132     ...    ${NETWORKS}[0]
133     ...    ${NET_1_VM_IPS}[1]
134     ...    ${unconfig_extra_route_ip1}
135     ${output} =    OpenStackOperations.Execute Command on VM Instance
136     ...    ${NETWORKS}[0]
137     ...    ${NET_1_VM_IPS}[1]
138     ...    ifconfig
139     BuiltIn.Should Not Contain    ${output}    ${SUB_IF}
140     ${config_extra_route_ip1} =    BuiltIn.Catenate
141     ...    sudo ifconfig ${SUB_IF} ${EXTRA_NW_IP}[0] netmask 255.255.255.0 up
142     ${output} =    OpenStackOperations.Execute Command on VM Instance
143     ...    ${NETWORKS}[0]
144     ...    ${NET_1_VM_IPS}[0]
145     ...    ${config_extra_route_ip1}
146     ${output} =    OpenStackOperations.Execute Command on VM Instance
147     ...    ${NETWORKS}[0]
148     ...    ${NET_1_VM_IPS}[0]
149     ...    ifconfig
150     BuiltIn.Should Contain    ${output}    ${SUB_IF}
151     ${output} =    OpenStackOperations.Execute Command on VM Instance
152     ...    ${NETWORKS}[0]
153     ...    ${NET_1_VM_IPS}[0]
154     ...    ifconfig ${SUB_IF}
155     ${output} =    OpenStackOperations.Execute Command on VM Instance
156     ...    ${NETWORKS}[0]
157     ...    ${NET_1_VM_IPS}[0]
158     ...    ${RPING_MIP_IP}
159     BuiltIn.Should Contain    ${output}    Received 0 reply
160     BuiltIn.Should Contain    ${output}    broadcast
161     BuiltIn.Wait Until Keyword Succeeds    5s    1s    Verify Learnt IP    ${FIB_ENTRY_2}    session
162     ${output} =    OpenStackOperations.Execute Command on VM Instance
163     ...    ${NETWORKS}[0]
164     ...    ${NET_1_VM_IPS}[0]
165     ...    ${RPING_MIP_IP}
166     ${output} =    VpnOperations.Get Fib Entries    session
167     ${resp} =    BuiltIn.Should Match Regexp    ${output}    destPrefix\\":\\"${FIB_ENTRY_2}\\/32".*"${OS_CMP1_IP}\\"
168     Verify Ping To Sub Interface    ${FIB_ENTRY_2}
169     ${unconfig_extra_route_ip1} =    BuiltIn.Catenate    sudo ifconfig ${SUB_IF} down
170     ${output} =    OpenStackOperations.Execute Command on VM Instance
171     ...    ${NETWORKS}[0]
172     ...    ${NET_1_VM_IPS}[0]
173     ...    ${unconfig_extra_route_ip1}
174
175 Verify ping to subnet gateway
176     [Documentation]    Verify ping happens to subnet gateway. To be submitted in next patch
177     [Tags]    not-implemented    exclude
178     TODO
179
180 If anything other than subnet ip then no reply
181     [Documentation]    If anything other than subnet ip then no reply. To be submitted in next patch
182     [Tags]    not-implemented    exclude
183     TODO
184
185 Validate multiple mip migration
186     [Documentation]    Validate multiple mip migration. To be submitted in next patch
187     [Tags]    not-implemented    exclude
188     TODO
189
190 Same DPN MIP Migration
191     [Documentation]    Same DPN MIP Migration. To be submitted in next patch
192     [Tags]    not-implemented    exclude
193     TODO
194
195
196 *** Keywords ***
197 Suite Setup
198     [Documentation]    Suite Setup to create the necessary resources.
199     ...    Create three tenant networks with a subnet in each network and an allow-all Security Group.
200     ...    In each of the networks, create two ports (i.e., total of 6 ports, two in each network)
201     ...    Create two VMs in each network (so total of 6 VMs). VM0_net0 on Compute-0 and VM1_net0 on Compute-1.
202     ...    Create a Neutron Router and associate subnet1 and subnet2.
203     ...    Create an L3VPN instance and associate the L3VPN instance to the neutron router.
204     VpnOperations.Basic Suite Setup
205     FOR    ${network}    IN    @{NETWORKS}
206         OpenStackOperations.Create Network    ${network}
207     END
208     ${neutron_networks} =    OpenStackOperations.List Networks
209     FOR    ${network}    IN    @{NETWORKS}
210         BuiltIn.Should Contain    ${neutron_networks}    ${network}
211     END
212     ${NET_ID} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
213     BuiltIn.Set Suite Variable    ${NET_ID}
214     FOR    ${i}    IN RANGE    0    3
215         OpenStackOperations.Create SubNet    ${NETWORKS}[${i}]    ${SUBNETS}[${i}]    ${SUBNET_CIDRS}[${i}]
216     END
217     ${neutron_subnets} =    OpenStackOperations.List Subnets
218     FOR    ${subnet}    IN    @{SUBNETS}
219         BuiltIn.Should Contain    ${neutron_subnets}    ${subnet}
220     END
221     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}
222     OpenStackOperations.Create Port
223     ...    ${NETWORKS}[0]
224     ...    ${PORTS}[0]
225     ...    sg=${SECURITY_GROUP}
226     ...    allowed_address_pairs=@{EXTRA_NW_IP}
227     OpenStackOperations.Create Port
228     ...    ${NETWORKS}[0]
229     ...    ${PORTS}[1]
230     ...    sg=${SECURITY_GROUP}
231     ...    allowed_address_pairs=@{EXTRA_NW_IP}
232     OpenStackOperations.Create Port
233     ...    ${NETWORKS}[1]
234     ...    ${PORTS}[2]
235     ...    sg=${SECURITY_GROUP}
236     ...    allowed_address_pairs=@{EXTRA_NW_IP}
237     OpenStackOperations.Create Port
238     ...    ${NETWORKS}[1]
239     ...    ${PORTS}[3]
240     ...    sg=${SECURITY_GROUP}
241     ...    allowed_address_pairs=@{EXTRA_NW_IP}
242     OpenStackOperations.Create Port
243     ...    ${NETWORKS}[2]
244     ...    ${PORTS}[4]
245     ...    sg=${SECURITY_GROUP}
246     ...    allowed_address_pairs=@{EXTRA_NW_IP}
247     OpenStackOperations.Create Port
248     ...    ${NETWORKS}[2]
249     ...    ${PORTS}[5]
250     ...    sg=${SECURITY_GROUP}
251     ...    allowed_address_pairs=@{EXTRA_NW_IP}
252     Wait Until Keyword Succeeds
253     ...    3s
254     ...    1s
255     ...    Check For Elements At URI
256     ...    ${CONFIG_API}/neutron:neutron/ports/
257     ...    ${PORTS}
258     OpenStackOperations.Create Vm Instance With Port On Compute Node
259     ...    ${PORTS}[0]
260     ...    ${NET_1_VMS}[0]
261     ...    ${OS_CMP1_HOSTNAME}
262     ...    sg=${SECURITY_GROUP}
263     OpenStackOperations.Create Vm Instance With Port On Compute Node
264     ...    ${PORTS}[1]
265     ...    ${NET_1_VMS}[1]
266     ...    ${OS_CMP2_HOSTNAME}
267     ...    sg=${SECURITY_GROUP}
268     OpenStackOperations.Create Vm Instance With Port On Compute Node
269     ...    ${PORTS}[2]
270     ...    ${NET_2_VMS}[0]
271     ...    ${OS_CMP1_HOSTNAME}
272     ...    sg=${SECURITY_GROUP}
273     OpenStackOperations.Create Vm Instance With Port On Compute Node
274     ...    ${PORTS}[3]
275     ...    ${NET_2_VMS}[1]
276     ...    ${OS_CMP2_HOSTNAME}
277     ...    sg=${SECURITY_GROUP}
278     OpenStackOperations.Create Vm Instance With Port On Compute Node
279     ...    ${PORTS}[4]
280     ...    ${NET_3_VMS}[0]
281     ...    ${OS_CMP1_HOSTNAME}
282     ...    sg=${SECURITY_GROUP}
283     OpenStackOperations.Create Vm Instance With Port On Compute Node
284     ...    ${PORTS}[5]
285     ...    ${NET_3_VMS}[1]
286     ...    ${OS_CMP2_HOSTNAME}
287     ...    sg=${SECURITY_GROUP}
288     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
289     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
290     @{NET_3_VM_IPS}    ${NET_3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
291     BuiltIn.Set Suite Variable    @{NET_1_VM_IPS}
292     BuiltIn.Set Suite Variable    @{NET_2_VM_IPS}
293     BuiltIn.Set Suite Variable    @{NET_3_VM_IPS}
294     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
295     BuiltIn.Should Not Contain    ${NET_2_VM_IPS}    None
296     BuiltIn.Should Not Contain    ${NET_3_VM_IPS}    None
297     BuiltIn.Should Not Contain    ${NET_1_DHCP_IP}    None
298     BuiltIn.Should Not Contain    ${NET_2_DHCP_IP}    None
299     BuiltIn.Should Not Contain    ${NET_3_DHCP_IP}    None
300     OpenStackOperations.Create Router    ${ROUTER}
301     OpenStackOperations.Add Router Interface    ${ROUTER}    ${SUBNETS}[1]
302     OpenStackOperations.Add Router Interface    ${ROUTER}    ${SUBNETS}[2]
303     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${NET_ID}
304     VpnOperations.VPN Create L3VPN
305     ...    vpnid=${VPN_INSTANCE_IDS}[0]
306     ...    name=${VPN_NAMES[0]}
307     ...    rd=${RD1}
308     ...    exportrt=${EXPORT_RT}
309     ...    importrt=${IMPORT_RT}
310     ...    tenantid=${tenant_id}
311     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
312     BuiltIn.Should Contain    ${resp}    ${VPN_INSTANCE_IDS}[0]
313     Associate L3VPN To ROUTER
314     OpenStackOperations.Show Debugs    @{NET_1_VMS}    @{NET_2_VMS}    @{NET_3_VMS}
315     OpenStackOperations.Get Suite Debugs
316
317 Suite Teardown
318     [Documentation]    Delete the setup
319     BuiltIn.Run Keyword And Ignore Error
320     ...    VpnOperations.Dissociate L3VPN From Networks
321     ...    networkid=${NET_ID}
322     ...    vpnid=${VPN_INSTANCE_IDS}[0]
323     BuiltIn.Run Keyword And Ignore Error
324     ...    VpnOperations.Dissociate VPN to Router
325     ...    routerid=${ROUTER_ID}
326     ...    vpnid=${VPN_INSTANCE_IDS}[0]
327     BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
328     OpenStackOperations.OpenStack Suite Teardown
329
330 Associate L3VPN To ROUTER
331     VpnOperations.Associate L3VPN To Network    networkid=${NET_ID}    vpnid=${VPN_INSTANCE_IDS}[0]
332     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
333     BuiltIn.Should Contain    ${resp}    ${NET_ID}
334     ${ROUTER_ID} =    OpenStackOperations.Get Router Id    ${ROUTER}
335     BuiltIn.Set Suite Variable    ${ROUTER_ID}
336     VpnOperations.Associate VPN to Router    routerid=${ROUTER_ID}    vpnid=${VPN_INSTANCE_IDS}[0]
337     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=${VPN_INSTANCE_IDS}[0]
338     BuiltIn.Should Contain    ${resp}    ${ROUTER_ID}
339
340 Verify Ping On Same Networks
341     [Documentation]    Verify ping among VM of same network
342     ${output} =    OpenStackOperations.Execute Command on VM Instance
343     ...    ${NETWORKS}[0]
344     ...    ${NET_1_VM_IPS}[0]
345     ...    ping -c 3 ${NET_1_VM_IPS}[1]
346     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
347     ${output} =    OpenStackOperations.Execute Command on VM Instance
348     ...    ${NETWORKS}[1]
349     ...    ${NET_2_VM_IPS}[0]
350     ...    ping -c 3 ${NET_2_VM_IPS}[1]
351     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
352     ${output} =    OpenStackOperations.Execute Command on VM Instance
353     ...    ${NETWORKS}[0]
354     ...    ${NET_1_VM_IPS}[1]
355     ...    ping -c 3 ${NET_1_VM_IPS}[0]
356     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
357     ${output} =    OpenStackOperations.Execute Command on VM Instance
358     ...    ${NETWORKS}[1]
359     ...    ${NET_2_VM_IPS}[1]
360     ...    ping -c 3 ${NET_2_VM_IPS}[0]
361     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
362     ${output} =    OpenStackOperations.Execute Command on VM Instance
363     ...    ${NETWORKS}[2]
364     ...    ${NET_3_VM_IPS}[0]
365     ...    ping -c 3 ${NET_3_VM_IPS}[1]
366     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
367
368 Verify Ping On Different Networks
369     [Documentation]    Verify ping among VMs of different network
370     ${output} =    OpenStackOperations.Execute Command on VM Instance
371     ...    ${NETWORKS}[0]
372     ...    ${NET_1_VM_IPS}[0]
373     ...    ping -c 3 ${NET_2_VM_IPS}[0]
374     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
375     ${output} =    OpenStackOperations.Execute Command on VM Instance
376     ...    ${NETWORKS}[1]
377     ...    ${NET_2_VM_IPS}[0]
378     ...    ping -c 3 ${NET_3_VM_IPS}[0]
379     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
380     ${output} =    OpenStackOperations.Execute Command on VM Instance
381     ...    ${NETWORKS}[0]
382     ...    ${NET_1_VM_IPS}[1]
383     ...    ping -c 3 ${NET_2_VM_IPS}[1]
384     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
385     ${output} =    OpenStackOperations.Execute Command on VM Instance
386     ...    ${NETWORKS}[1]
387     ...    ${NET_2_VM_IPS}[1]
388     ...    ping -c 3 ${NET_3_VM_IPS}[1]
389     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
390     ${output} =    OpenStackOperations.Execute Command on VM Instance
391     ...    ${NETWORKS}[2]
392     ...    ${NET_3_VM_IPS}[0]
393     ...    ping -c 3 ${NET_1_VM_IPS}[1]
394     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
395
396 Verify Flows Are Present
397     [Documentation]    Verify Flows Are Present
398     ...    Verify that Flows to support L3 Connectivity (like ELAN_SMAC_TABLE, FIB_TABLE)
399     ...    and a FIB entry to reach all the VMs in the network exist in the OVS pipeline.
400     [Arguments]    ${ip}
401     ${flow_output} =    Utils.Run Command On Remote System
402     ...    ${ip}
403     ...    sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
404     BuiltIn.Log    ${flow_output}
405     ${resp} =    BuiltIn.Should Contain    ${flow_output}    table=50
406     ${resp} =    BuiltIn.Should Contain    ${flow_output}    table=21,
407     @{vm_ips} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{NET_3_VM_IPS}
408     ${resp} =    Should Match regexp    ${flow_output}    table=0.*goto_table:36
409     ${resp} =    Should Match regexp    ${flow_output}    table=0.*goto_table:17
410     FOR    ${ip}    IN    @{vm_ips}
411         ${resp} =    Should Match regexp    ${flow_output}    table=21.*nw_dst=${ip}
412     END
413
414 Verify Flows Are Present On All Compute Nodes
415     [Documentation]    Verify Flows Are Present On All Compute Nodes
416     FOR    ${ip}    IN    @{OS_CMP_IPS}
417         BuiltIn.Wait Until Keyword Succeeds    10s    2s    Verify Flows Are Present    ${ip}
418     END
419
420 Verify Ping To Sub Interface
421     [Documentation]    Verify ping to the sub-interface
422     [Arguments]    ${sub_interface_ip}
423     ${output} =    OpenStackOperations.Execute Command on VM Instance
424     ...    ${NETWORKS}[0]
425     ...    ${NET_1_VM_IPS}[0]
426     ...    ping -c 3 ${sub_interface_ip}
427     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
428     ${output} =    OpenStackOperations.Execute Command on VM Instance
429     ...    ${NETWORKS}[1]
430     ...    ${NET_2_VM_IPS}[0]
431     ...    ping -c 3 ${sub_interface_ip}
432     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
433     ${output} =    OpenStackOperations.Execute Command on VM Instance
434     ...    ${NETWORKS}[2]
435     ...    ${NET_3_VM_IPS}[0]
436     ...    ping -c 3 ${sub_interface_ip}
437     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
438
439 Verify Learnt IP
440     [Documentation]    Check that sub interface ip has been learnt after ARP request
441     [Arguments]    ${ip}    ${session}
442     ${resp} =    RequestsLibrary.Get Request
443     ...    ${session}
444     ...    /restconf/operational/odl-l3vpn:learnt-vpn-vip-to-port-data/
445     BuiltIn.Log    ${resp.text}
446     BuiltIn.Should Contain    ${resp.text}    ${ip}
447
448 TODO
449     Fail    "Not implemented"