Re-create l3vpn and verify traffic
[integration/test.git] / csit / suites / netvirt / vpnservice / vpn_basic_dualstack_subnet_routing.robot
1 *** Settings ***
2 Documentation     Test suite to validate subnet routing functionality for hidden IPv4/IPv6 address in an Openstack
3 ...               integrated environment.
4 ...               The assumption of this suite is that the environment is already configured with the proper
5 ...               integration bridges and vxlan tunnels.
6 Suite Setup       Suite Setup
7 Suite Teardown    Suite Teardown
8 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
9 Test Teardown     OpenStackOperations.Get Test Teardown Debugs
10 Library           Collections
11 Library           OperatingSystem
12 Library           RequestsLibrary
13 Resource          ../../../libraries/DevstackUtils.robot
14 Resource          ../../../libraries/OpenStackOperations.robot
15 Resource          ../../../libraries/OVSDB.robot
16 Resource          ../../../libraries/SetupUtils.robot
17 Resource          ../../../libraries/Tcpdump.robot
18 Resource          ../../../libraries/Utils.robot
19 Resource          ../../../variables/Variables.robot
20 Resource          ../../../variables/netvirt/Variables.robot
21 Resource          ../../../libraries/VpnOperations.robot
22
23 *** Variables ***
24 ${SECURITY_GROUP}    vpndssr_sg
25 @{NETWORKS}       vpndssr_net_1    vpndssr_net_2
26 @{SUBNETS4}       vpndssr_ipv4_sub_1    vpndssr_ipv4_sub_2
27 @{SUBNETS6}       vpndssr_ipv6_sub_1    vpndssr_ipv6_sub_2
28 @{SUBNETS4_CIDR}    30.1.1.0/24    40.1.1.0/24
29 @{SUBNETS6_CIDR}    2001:db5:0:2::/64    2001:db5:0:3::/64
30 ${SUBNET_ADDITIONAL_ARGS}    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac
31 @{PORTS}          vpndssr_port_1    vpndssr_port_2    vpndssr_port_3    vpndssr_port_4
32 @{NET_1_VMS}      vpndssr_net_1_vm_1    vpndssr_net_1_vm_2
33 @{NET_2_VMS}      vpndssr_net_2_vm_1    vpndssr_net_2_vm_2
34 @{EXTRA_NW_IPV4}    30.1.1.209    30.1.1.210    40.1.1.209    40.1.1.210    40.1.1.211    30.1.1.211
35 @{EXTRA_NW_IPV6}    2001:db5:0:2::10    2001:db5:0:2::20    2001:db5:0:3::10    2001:db5:0:3::20    2001:db5:0:3::30    2001:db5:0:2::30
36 @{EXTRA_NW_SUBNET_IPv4}    30.1.1.0/24    40.1.1.0/24
37 @{EXTRA_NW_SUBNET_IPv6}    2001:db5:0:2::/64    2001:db5:0:3::/64
38 ${ROUTER}         vpn_router_dualstack_subnet
39 ${UPDATE_NETWORK}    update_network_dualstack_subnet
40 ${UPDATE_SUBNET}    update_subnet_dualstack_subnet
41 ${UPDATE_PORT}    update_port_dualstack_subnet
42 @{VPN_INSTANCE_ID}    1bc8cd92-48ca-49b5-94e1-b2921a261661    1bc8cd92-48ca-49b5-94e1-b2921a261662    1bc8cd92-48ca-49b5-94e1-b2921a261663
43 @{VPN_NAME}       vpn1_dualstack_subnet    vpn2_dualstack_subnet    vpn3_dualstack_subnet
44 @{RDS}            ["2506:2"]    ["2606:2"]    ["2706:2"]
45 ${LOOP_COUNT}     4
46 @{TABLE_NO_21}    21
47 ${DUMP_FLOWS}     sudo ovs-ofctl dump-flows br-int -O Openflow13
48
49 *** Test Cases ***
50 Check ELAN Datapath Traffic Within The Networks
51     [Documentation]    Checks datapath within the same network with different vlans.
52     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[0]    ping -I @{net_1_vm_ipv4}[0] -c 3 @{net_1_vm_ipv4}[1]
53     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
54     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[0]    ping6 -I @{net_1_vm_ipv6}[0] -c 3 @{net_1_vm_ipv6}[1]
55     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
56     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[0]    ping -I @{net_2_vm_ipv4}[0] -c 3 @{net_2_vm_ipv4}[1]
57     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
58     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[0]    ping6 -I @{net_2_vm_ipv6}[0] -c 3 @{net_2_vm_ipv6}[1]
59     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
60
61 Create L3VPN
62     [Documentation]    Create L3VPN
63     ${net_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[0]
64     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
65     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]    name=@{VPN_NAME}[0]    rd=@{RDS}[0]    exportrt=@{RDS}[0]    importrt=@{RDS}[0]    tenantid=${tenant_id}
66     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
67     BuiltIn.Should Contain    ${resp}    @{VPN_INSTANCE_ID}[0]
68
69 Associate L3VPN To Routers
70     [Documentation]    Associating router to L3VPN.
71     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
72     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=@{VPN_INSTANCE_ID}[0]
73     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
74     BuiltIn.Should Contain    ${resp}    ${router_id}
75
76 Configure Extra IPv4/IPv6 Addresss On Interface For Subnet Routing
77     [Documentation]    Extra IPv4/IPv6 Address configuration on Interfaces
78     ${VM_IPV6} =    BuiltIn.Create List    @{net_1_vm_ipv6}[0]    @{net_1_vm_ipv6}[1]    @{net_2_vm_ipv6}[0]    @{net_2_vm_ipv6}[1]
79     ${VM_IPV4} =    BuiltIn.Create List    @{net_1_vm_ipv4}[0]    @{net_1_vm_ipv4}[1]    @{net_2_vm_ipv4}[0]    @{net_2_vm_ipv4}[1]
80     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
81     \    OpenStackOperations.Execute Command on VM Instance    @{network_list}[${index}]    @{VM_IPV6}[${index}]    sudo ip -6 addr add @{EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
82     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
83     \    OpenStackOperations.Execute Command on VM Instance    @{network_list}[${index}]    @{VM_IPV4}[${index}]    sudo ifconfig eth0:1 @{EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
84     BuiltIn.Set Suite Variable    ${VM_IPV6}
85     BuiltIn.Set Suite Variable    ${VM_IPV4}
86     BuiltIn.Should Not Contain    ${VM_IPV6}    None
87     BuiltIn.Should Not Contain    ${VM_IPV4}    None
88
89 Verify Data Traffic On Configured Subnet Ipv4/IPv6 Address
90     [Documentation]    Check Dual Stack data path verifcation within and across network.
91     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data Traffic
92     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data Traffic
93
94 Dissociate L3VPN From Routers and verify traffic
95     [Documentation]    Dissociating router from L3VPN and check data path verification
96     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
97     VpnOperations.Dissociate VPN to Router    routerid=${router_id}    vpnid=@{VPN_INSTANCE_ID}[0]
98     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
99     BuiltIn.Should Not Contain    ${resp}    ${router_id}
100     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data No Traffic
101     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data No Traffic
102
103 Associate L3VPN Again To Routers and verify traffic
104     [Documentation]    Associating router to L3VPN and check data path verification
105     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
106     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=@{VPN_INSTANCE_ID}[0]
107     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
108     BuiltIn.Should Contain    ${resp}    ${router_id}
109     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data Traffic
110     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data Traffic
111
112 Delete the configured extra IPv4/IPv6 Addresss and verify traffic
113     [Documentation]    Delete IPv4/IPv6 Address configuration on Interfaces and verify traffic
114     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
115     \    OpenStackOperations.Execute Command on VM Instance    @{network_list}[${index}]    @{VM_IPV6}[${index}]    sudo ip -6 addr del @{EXTRA_NW_IPV6}[${index}]/64 dev eth0
116     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
117     \    OpenStackOperations.Execute Command on VM Instance    @{network_list}[${index}]    @{VM_IPV4}[${index}]    sudo ifconfig eth0:1 down
118     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data No Traffic
119     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data No Traffic
120     BuiltIn.Wait Until Keyword Succeeds    10x    40s    Verify Table 21 for No VPN Routes
121
122 Configure Again Extra IPv4/IPv6 Addresss On Interface For Subnet Routing
123     [Documentation]    Extra IPv4/IPv6 Address configuration on Interfaces
124     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
125     \    OpenStackOperations.Execute Command on VM Instance    @{network_list}[${index}]    @{VM_IPV6}[${index}]    sudo ip -6 addr add @{EXTRA_NW_IPV6}[${index}]/64 dev eth0; sudo ifconfig eth0 allmulti; ip -6 a
126     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
127     \    OpenStackOperations.Execute Command on VM Instance    @{network_list}[${index}]    @{VM_IPV4}[${index}]    sudo ifconfig eth0:1 @{EXTRA_NW_IPV4}[${index}] netmask 255.255.255.0 up; ip a
128     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data Traffic
129     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data Traffic
130
131 Remove Interface From Router And Verify Traffic
132     [Documentation]    Remove subnet from router and check data path verification
133     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
134     : FOR    ${interface}    IN    @{SUBNETS4}
135     \    OpenStackOperations.Remove Interface    ${ROUTER}    ${INTERFACE}
136     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
137     : FOR    ${interface}    IN    @{SUBNETS6}
138     \    OpenStackOperations.Remove Interface    ${ROUTER}    ${INTERFACE}
139     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
140     : FOR    ${interface}    IN    @{SUBNETS4}
141     \    ${subnet_id} =    OpenStackOperations.Get Subnet Id    ${INTERFACE}
142     \    BuiltIn.Should Not Contain    ${interface_output}    ${subnet_id}
143     : FOR    ${interface}    IN    @{SUBNETS6}
144     \    ${subnet_id} =    OpenStackOperations.Get Subnet Id    ${INTERFACE}
145     \    BuiltIn.Should Not Contain    ${interface_output}    ${subnet_id}
146     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data No Traffic
147
148 Add Interface To Router And Verify Traffic
149     [Documentation]    Add interface router to again and check data path verification
150     : FOR    ${interface}    IN    @{SUBNETS4}
151     \    OpenStackOperations.Add Router Interface    ${ROUTER}    ${interface}
152     : FOR    ${interface}    IN    @{SUBNETS6}
153     \    OpenStackOperations.Add Router Interface    ${ROUTER}    ${interface}
154     BuiltIn.Wait Until Keyword Succeeds    10x    60s    Verify Ipv4 Data Traffic
155     BuiltIn.Wait Until Keyword Succeeds    10x    60s    Verify Ipv6 Data Traffic
156
157 Delete L3VPN
158     [Documentation]    Delete L3VPN.
159     VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
160     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data No Traffic
161     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data No Traffic
162
163 ReCreate L3VPN and associate L3VPN To Routers and verify traffic
164     [Documentation]    Recreate L3VPN and associate L3VPN To Routers and verify ipv4/ipv6 traffic
165     ${net_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[0]
166     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
167     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]    name=@{VPN_NAME}[0]    rd=@{RDS}[0]    exportrt=@{RDS}[0]    importrt=@{RDS}[0]    tenantid=${tenant_id}
168     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
169     BuiltIn.Should Contain    ${resp}    @{VPN_INSTANCE_ID}[0]
170     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
171     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=@{VPN_INSTANCE_ID}[0]
172     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
173     BuiltIn.Should Contain    ${resp}    ${router_id}
174     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv4 Data Traffic
175     BuiltIn.Wait Until Keyword Succeeds    10x    30s    Verify Ipv6 Data Traffic
176
177 *** Keywords ***
178 Suite Setup
179     [Documentation]    Create basic setup for feature.Create two network,subnet,four ports and four VMs
180     VpnOperations.Basic Suite Setup
181     OpenStackOperations.Create Network    @{NETWORKS}[0]
182     OpenStackOperations.Create Network    @{NETWORKS}[1]
183     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
184     OpenStackOperations.Update Network    @{NETWORKS}[0]    additional_args=--description ${UPDATE_NETWORK}
185     ${output} =    OpenStackOperations.Show Network    @{NETWORKS}[0]
186     BuiltIn.Should Contain    ${output}    ${UPDATE_NETWORK}
187     OpenStackOperations.Create SubNet    @{NETWORKS}[0]    @{SUBNETS4}[0]    @{SUBNETS4_CIDR}[0]
188     OpenStackOperations.Create SubNet    @{NETWORKS}[0]    @{SUBNETS6}[0]    @{SUBNETS6_CIDR}[0]    ${SUBNET_ADDITIONAL_ARGS}
189     OpenStackOperations.Create SubNet    @{NETWORKS}[1]    @{SUBNETS4}[1]    @{SUBNETS4_CIDR}[1]
190     OpenStackOperations.Create SubNet    @{NETWORKS}[1]    @{SUBNETS6}[1]    @{SUBNETS6_CIDR}[1]    ${SUBNET_ADDITIONAL_ARGS}
191     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS4}
192     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS6}
193     OpenStackOperations.Update SubNet    @{SUBNETS4}[0]    additional_args=--description ${UPDATE_SUBNET}
194     ${output} =    OpenStackOperations.Show SubNet    @{SUBNETS4}[0]
195     BuiltIn.Should Contain    ${output}    ${UPDATE_SUBNET}
196     OpenStackOperations.Create Router    ${ROUTER}
197     @{router_list} =    BuiltIn.Create List    ${ROUTER}
198     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${ROUTER_URL}    ${router_list}
199     : FOR    ${port}    IN    @{SUBNETS4}
200     \    OpenStackOperations.Add Router Interface    ${ROUTER}    ${port}
201     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
202     : FOR    ${port}    IN    @{SUBNETS6}
203     \    OpenStackOperations.Add Router Interface    ${ROUTER}    ${port}
204     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
205     Create Allow All SecurityGroup    ${SECURITY_GROUP}    IPv4    True
206     ${allowed_address_pairs_args} =    BuiltIn.Set Variable    --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV4}[1] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET_IPV6}[1]
207     ${network_list} =    BuiltIn.Create List    @{NETWORKS}[0]    @{NETWORKS}[0]    @{NETWORKS}[1]    @{NETWORKS}[1]
208     BuiltIn.Set Suite Variable    ${network_list}
209     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
210     \    OpenStackOperations.Create Port    @{network_list}[${index}]    @{PORTS}[${index}]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
211     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${PORT_URL}    ${PORTS}
212     OpenStackOperations.Update Port    @{PORTS}[0]    additional_args=--name ${UPDATE_PORT}
213     ${output} =    Show Port    ${UPDATE_PORT}
214     BuiltIn.Should Contain    ${output}    ${UPDATE_PORT}
215     OpenStackOperations.Update Port    ${UPDATE_PORT}    additional_args=--name @{PORTS}[0]
216     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
217     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
218     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
219     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
220     BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${NETWORKS}    ${SUBNETS4_CIDR}
221     BuiltIn.Wait Until Keyword Succeeds    30s    10s    OpenStackOperations.Wait For Routes To Propogate    ${NETWORKS}    ${SUBNETS6_CIDR}
222     @{net_1_vm_ipv4}    ${net_1_dhcp_ipv4} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
223     @{net_2_vm_ipv4}    ${net_2_dhcp_ipv4} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
224     BuiltIn.Should Not Contain    ${net_1_vm_ipv4}    None
225     BuiltIn.Should Not Contain    ${net_2_vm_ipv4}    None
226     BuiltIn.Should Not Contain    ${net_1_dhcp_ipv4}    None
227     BuiltIn.Should Not Contain    ${net_2_dhcp_ipv4}    None
228     BuiltIn.Log    Collect VMs IPv6 addresses
229     ${prefix_net10} =    String.Replace String    @{SUBNETS6_CIDR}[0]    ${IP6_SUBNET_CIDR_SUFFIX}    ${IP6_ADDR_SUFFIX}
230     ${prefix_net20} =    String.Replace String    @{SUBNETS6_CIDR}[1]    ${IP6_SUBNET_CIDR_SUFFIX}    ${IP6_ADDR_SUFFIX}
231     ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
232     ...    true    ${NET_1_VMS}    @{NETWORKS}[0]    ${prefix_net10}
233     ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
234     ...    true    ${NET_2_VMS}    @{NETWORKS}[1]    ${prefix_net20}
235     ${net_1_vm_ipv6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    false    ${NET_1_VMS}    @{NETWORKS}[0]    ${prefix_net10}
236     ${net_2_vm_ipv6} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    false    ${NET_2_VMS}    @{NETWORKS}[1]    ${prefix_net20}
237     ${loop_count}    Get Length    ${NET_1_VMS}
238     : FOR    ${index}    IN RANGE    0    ${loop_count}
239     \    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${net_1_vm_ipv6}[${index}]    None
240     \    Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log @{NET_1_VMS}[${index}]    30s
241     \    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    ${net_2_vm_ipv6}[${index}]    None
242     \    Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    nova console-log @{NET_2_VMS}[${index}]    30s
243     BuiltIn.Set Suite Variable    ${net_1_vm_ipv4}
244     BuiltIn.Set Suite Variable    ${net_2_vm_ipv4}
245     BuiltIn.Set Suite Variable    ${net_1_vm_ipv6}
246     BuiltIn.Set Suite Variable    ${net_2_vm_ipv6}
247     OpenStackOperations.Show Debugs    @{NET_1_VMS}    @{NET_2_VMS}
248     OpenStackOperations.Get Suite Debugs
249
250 Verify Ipv4 Data Traffic
251     [Documentation]    Check Ipv4 data path verification within and across network
252     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[1]
253     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
254     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[3]
255     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
256     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[2]
257     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
258     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[0]
259     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
260     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[3]
261     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
262     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[2]
263     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
264     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[0]
265     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
266     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[1]
267     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
268     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[2]
269     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
270     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[0]
271     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
272     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[1]
273     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
274     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[3]
275     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
276
277 Verify Ipv4 Data No Traffic
278     [Documentation]    Check Ipv4 data path verification within and across network
279     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[3]
280     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
281     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[2]
282     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
283     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[3]
284     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
285     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[2]
286     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
287     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[0]
288     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
289     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[0]    ping -c 3 @{EXTRA_NW_IPV4}[1]
290     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
291     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[0]
292     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
293     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv4}[1]    ping -c 3 @{EXTRA_NW_IPV4}[1]
294     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
295
296 Verify Ipv6 Data Traffic
297     [Documentation]    Check Ipv6 data path verification within and across network
298     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[1]
299     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
300     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[3]
301     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
302     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[2]
303     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
304     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[0]
305     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
306     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[3]
307     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
308     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[2]
309     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
310     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[0]
311     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
312     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[1]
313     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
314     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[2]
315     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
316     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[0]
317     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
318     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[1]
319     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
320     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[3]
321     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
322
323 Verify Ipv6 Data No Traffic
324     [Documentation]    Check Ipv6 data path verification within and across network
325     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[3]
326     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
327     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[2]
328     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
329     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[3]
330     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
331     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{net_1_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[2]
332     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
333     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[0]
334     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
335     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[0]    ping6 -c 3 @{EXTRA_NW_IPV6}[1]
336     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
337     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[0]
338     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
339     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{net_2_vm_ipv6}[1]    ping6 -c 3 @{EXTRA_NW_IPV6}[1]
340     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
341
342 Verify Table 21 for VPN Routes
343     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
344     \    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    True    ${EMPTY}    ipv6_dst=@{EXTRA_NW_IPV6}[${index}]
345     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
346     \    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    True    ${EMPTY}    ipv6_dst=@{EXTRA_NW_IPV4}[${index}]
347
348 Verify Table 21 for No VPN Routes
349     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
350     \    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    False    ${EMPTY}    ipv6_dst=@{EXTRA_NW_IPV6}[${index}]
351     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
352     \    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${TABLE_NO_21}    False    ${EMPTY}    ipv6_dst=@{EXTRA_NW_IPV4}[${index}]
353
354 Suite Teardown
355     [Documentation]    Delete the setup
356     BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_ID}[0]
357     BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_ID}[1]
358     BuiltIn.Run Keyword And Ignore Error    VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_ID}[2]
359     OpenStackOperations.OpenStack Suite Teardown