Update remaining tests for combos
[integration/test.git] / csit / suites / netvirt / vpnservice / vpn_basic_ipv6.robot
1 *** Settings ***
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       VpnOperations.Basic Suite Setup
6 Suite Teardown    OpenStackOperations.OpenStack Suite Teardown
7 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
8 Test Teardown     OpenStackOperations.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
20
21 *** Variables ***
22 ${SECURITY_GROUP}    vpn6_sg
23 @{NETWORKS}       vpn6_net_1    vpn6_net_2
24 @{SUBNETS}        vpn6_sub_1    vpn6_sub_2
25 @{SUBNET_CIDRS}    2001:db8:0:2::/64    2001:db8:0:3::/64
26 @{PORTS}          vpn6_net_1_port_1    vpn6_net_1_port_2    vpn6_net_2_port_1    vpn6_net_2_port_2
27 @{NET_1_VMS}      vpn6_net_1_vm_1    vpn6_net_1_vm_2
28 @{NET_2_VMS}      vpn6_net_2_vm_1    vpn6_net_2_vm_2
29 ${ROUTER}         vpn6_router
30 @{EXTRA_NW_IP}    2001:db9:cafe:d::10    2001:db9:abcd:d::20
31 @{EXTRA_NW_SUBNET}    2001:db9:cafe:d::/64    2001:db9:abcd:d::/64
32 ${UPDATE_NETWORK}    UpdateNetworkV6
33 ${UPDATE_SUBNET}    UpdateSubnetV6
34 ${UPDATE_PORT}    UpdatePortV6
35 @{VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261661    4ae8cd92-48ca-49b5-94e1-b2921a261662    4ae8cd92-48ca-49b5-94e1-b2921a261663
36 @{VPN_NAMES}      vpn6_1    vpn6_2    vpn6_3
37 @{RDS}            ["2206:2"]    ["2306:2"]    ["2406:2"]
38
39 *** Test Cases ***
40 Create Neutron Networks
41     OpenStackOperations.Create Network    @{NETWORKS}[0]
42     OpenStackOperations.Create Network    @{NETWORKS}[1]
43     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
44     OpenStackOperations.Update Network    @{NETWORKS}[0]    additional_args=--description ${UPDATE_NETWORK}
45     ${output} =    OpenStackOperations.Show Network    @{NETWORKS}[0]
46     BuiltIn.Should Contain    ${output}    ${UPDATE_NETWORK}
47
48 Create Neutron Subnets
49     ${net1_additional_args}=    BuiltIn.Catenate    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET1_IPV6_ADDR_POOL}
50     ${net2_additional_args}=    BuiltIn.Catenate    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET2_IPV6_ADDR_POOL}
51     OpenStackOperations.Create SubNet    @{NETWORKS}[0]    @{SUBNETS}[0]    @{SUBNET_CIDRS}[0]    ${net1_additional_args}
52     OpenStackOperations.Create SubNet    @{NETWORKS}[1]    @{SUBNETS}[1]    @{SUBNET_CIDRS}[1]    ${net2_additional_args}
53     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
54     OpenStackOperations.Update SubNet    @{SUBNETS}[0]    additional_args=--description ${UPDATE_SUBNET}
55     ${output} =    OpenStackOperations.Show SubNet    @{SUBNETS}[0]
56     BuiltIn.Should Contain    ${output}    ${UPDATE_SUBNET}
57
58 Create Router
59     OpenStackOperations.Create Router    ${ROUTER}
60     ${router_list} =    BuiltIn.Create List    ${ROUTER}
61     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${ROUTER_URL}    ${router_list}
62
63 Add Interfaces To Router
64     : FOR    ${interface}    IN    @{SUBNETS}
65     \    OpenStackOperations.Add Router Interface    ${ROUTER}    ${interface}
66     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
67     : FOR    ${interface}    IN    @{SUBNETS}
68     \    ${subnet_id} =    OpenStackOperations.Get Subnet Id    ${interface}
69     \    BuiltIn.Should Contain    ${interface_output}    ${subnet_id}
70     ${GWMAC_ADDRS}    ${GWIP_ADDRS} =    VpnOperations.Get Gateway MAC And IP Address    ${ROUTER}    ${IP6_REGEX}
71     BuiltIn.Set Suite Variable    ${GWMAC_ADDRS}
72     BuiltIn.Set Suite Variable    ${GWIP_ADDRS}
73
74 Add Ssh V6 Allow All Rule
75     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}    IPv6
76
77 Create Neutron Ports
78     ${allowed_address_pairs_args} =    BuiltIn.Set Variable    --allowed-address ip-address=@{EXTRA_NW_SUBNET}[0] --allowed-address ip-address=@{EXTRA_NW_SUBNET}[1]
79     Create Port    @{NETWORKS}[0]    @{PORTS}[0]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
80     Create Port    @{NETWORKS}[0]    @{PORTS}[1]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
81     Create Port    @{NETWORKS}[1]    @{PORTS}[2]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
82     Create Port    @{NETWORKS}[1]    @{PORTS}[3]    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
83     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${PORT_URL}    ${PORTS}
84     OpenStackOperations.Update Port    @{PORTS}[0]    additional_args=--name ${UPDATE_PORT}
85     ${output} =    Show Port    ${UPDATE_PORT}
86     BuiltIn.Should Contain    ${output}    ${UPDATE_PORT}
87     OpenStackOperations.Update Port    ${UPDATE_PORT}    additional_args=--name @{PORTS}[0]
88
89 Create Nova VMs
90     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[0]    @{NET_1_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
91     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[1]    @{NET_1_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
92     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[2]    @{NET_2_VMS}[0]    ${OS_CMP1_HOSTNAME}    sg=${SECURITY_GROUP}
93     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS}[3]    @{NET_2_VMS}[1]    ${OS_CMP2_HOSTNAME}    sg=${SECURITY_GROUP}
94     ${vms}=    BuiltIn.Create List    @{NET_1_VMS}    @{NET_2_VMS}
95     : FOR    ${vm}    IN    @{vms}
96     \    OpenStackOperations.Poll VM Is ACTIVE    ${vm}
97     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Wait For Routes To Propogate    ${NETWORKS}    ${SUBNET_CIDRS}
98     ${prefix_net10} =    Replace String    @{SUBNET_CIDRS}[0]    ::/64    (:[a-f0-9]{,4}){,4}
99     ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
100     ...    fail_on_none=true    vm_list=${NET_1_VMS}    network=@{NETWORKS}[0]    subnet=${prefix_net10}
101     ${prefix_net20} =    Replace String    @{SUBNET_CIDRS}[1]    ::/64    (:[a-f0-9]{,4}){,4}
102     ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Wait Until Keyword Succeeds    3x    60s    OpenStackOperations.Collect VM IPv6 SLAAC Addresses
103     ...    fail_on_none=true    vm_list=${NET_2_VMS}    network=@{NETWORKS}[1]    subnet=${prefix_net20}
104     ${VM_IP_NET10} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${NET_1_VMS}    network=@{NETWORKS}[0]    subnet=${prefix_net10}
105     ${VM_IP_NET20} =    OpenStackOperations.Collect VM IPv6 SLAAC Addresses    fail_on_none=false    vm_list=${NET_2_VMS}    network=@{NETWORKS}[1]    subnet=${prefix_net20}
106     ${VM_INSTANCES} =    Collections.Combine Lists    ${NET_1_VMS}    ${NET_2_VMS}
107     ${VM_IPS}=    Collections.Combine Lists    ${VM_IP_NET10}    ${VM_IP_NET20}
108     ${LOOP_COUNT}    BuiltIn.Get Length    ${NET_1_VMS}
109     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
110     \    ${status}    ${message}    Run Keyword And Ignore Error    BuiltIn.Should Not Contain    @{VM_IPS}[${index}]    None
111     \    Run Keyword If    '${status}' == 'FAIL'    OpenStack CLI    openstack console log show @{VM_INSTANCES}[${index}]    30s
112     OpenStackOperations.Copy DHCP Files From Control Node
113     BuiltIn.Set Suite Variable    ${VM_IP_NET10}
114     BuiltIn.Set Suite Variable    ${VM_IP_NET20}
115     BuiltIn.Should Not Contain    ${VM_IP_NET10}    None
116     BuiltIn.Should Not Contain    ${VM_IP_NET20}    None
117     [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Show Debugs    @{NET_1_VMS}    @{NET_2_VMS}
118     ...    AND    OpenStackOperations.Get Test Teardown Debugs
119
120 Check ELAN Datapath Traffic Within The Networks
121     ${output}=    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ping6 -c 3 @{VM_IP_NET10}[1]
122     BuiltIn.Should Contain    ${output}    64 bytes
123     ${output}=    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{VM_IP_NET20}[0]    ping6 -c 3 @{VM_IP_NET20}[1]
124     BuiltIn.Should Contain    ${output}    64 bytes
125
126 Check L3_Datapath Traffic Across Networks With Router
127     BuiltIn.Log    Verification of FIB Entries and Flow
128     @{tcpdump_conn_ids} =    OpenStackOperations.Start Packet Capture On Nodes    tcpdump_vpn6    ${EMPTY}    @{OS_ALL_IPS}
129     ${vm_ips} =    BuiltIn.Create List    @{VM_IP_NET10}    @{VM_IP_NET20}
130     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ips}
131     BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${VM_IP_NET10}
132     BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${VM_IP_NET20}
133     BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
134     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes    ipv6
135     ${dst_ip_list} =    BuiltIn.Create List    @{VM_IP_NET10}[1]    @{VM_IP_NET20}
136     OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ${dst_ip_list}
137     ${dst_ip_list} =    BuiltIn.Create List    @{VM_IP_NET20}[1]    @{VM_IP_NET10}
138     OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS}[1]    @{VM_IP_NET20}[0]    ${dst_ip_list}
139     [Teardown]    VpnOperations.Test Teardown With Tcpdump Stop    ${tcpdump_conn_ids}
140
141 Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
142     ${CONFIG_EXTRA_ROUTE_IP1} =    BuiltIn.Catenate    sudo ip -6 addr add @{EXTRA_NW_IP}[0]/64 dev eth0
143     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ${CONFIG_EXTRA_ROUTE_IP1}
144     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ip -6 a
145     ${CONFIG_EXTRA_ROUTE_IP2} =    BuiltIn.Catenate    sudo ip -6 addr add @{EXTRA_NW_IP}[1]/64 dev eth0
146     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ${CONFIG_EXTRA_ROUTE_IP2}
147     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ip -6 a
148     ${EXT_RT1} =    Set Variable    destination=@{EXTRA_NW_SUBNET}[0],gateway=@{VM_IP_NET10}[0]
149     ${EXT_RT2} =    Set Variable    destination=@{EXTRA_NW_SUBNET}[1],gateway=@{VM_IP_NET10}[0]
150     ${cmd} =    BuiltIn.Catenate    ${RT_OPTIONS}    ${EXT_RT1}    ${RT_OPTIONS}    ${EXT_RT2}
151     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
152     OpenStackOperations.Show Router    ${ROUTER}    -D
153     ${vm_ips} =    BuiltIn.Create List    @{EXTRA_NW_SUBNET}
154     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ips}
155     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[1]    ping6 -c 3 @{EXTRA_NW_IP}[1]
156     BuiltIn.Should Contain    ${output}    64 bytes
157     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{VM_IP_NET20}[1]    ping6 -c 3 @{EXTRA_NW_IP}[1]
158     BuiltIn.Should Contain    ${output}    64 bytes
159     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[1]    ping6 -c 3 @{EXTRA_NW_IP}[0]
160     BuiltIn.Should Contain    ${output}    64 bytes
161
162 Delete Extra Route
163     OpenStackOperations.Update Router    ${ROUTER}    ${RT_CLEAR}
164     OpenStackOperations.Show Router    ${ROUTER}    -D
165
166 Delete And Recreate Extra Route
167     [Documentation]    Recreate multiple extra route and check data path before L3VPN creation
168     ${CONFIG_EXTRA_ROUTE_IP1} =    BuiltIn.Catenate    sudo ip -6 addr add @{EXTRA_NW_IP}[1]/64 dev eth0
169     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ${CONFIG_EXTRA_ROUTE_IP1}
170     ${EXT_RT1} =    Set Variable    destination=@{EXTRA_NW_SUBNET}[0],gateway=@{VM_IP_NET10}[0]
171     ${cmd} =    BuiltIn.Catenate    ${RT_OPTIONS}    ${EXT_RT1}
172     OpenStackOperations.Update Router    ${ROUTER}    ${cmd}
173     OpenStackOperations.Show Router    ${ROUTER}    -D
174     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[1]    ping6 -c 3 @{EXTRA_NW_IP}[0]
175     BuiltIn.Should Contain    ${output}    64 bytes
176     # clear off extra-routes before the next set of tests
177     [Teardown]    BuiltIn.Run Keywords    OpenStackOperations.Update Router    ${ROUTER}    ${RT_CLEAR}
178     ...    AND    OpenStackOperations.Show Router    ${ROUTER}    -D
179     ...    AND    OpenStackOperations.Get Test Teardown Debugs
180
181 Create L3VPN
182     ${net_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[0]
183     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
184     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]    name=@{VPN_NAMES}[0]    rd=@{RDS}[0]    exportrt=@{RDS}[0]    importrt=@{RDS}[0]    tenantid=${tenant_id}
185     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
186     BuiltIn.Should Contain    ${resp}    @{VPN_INSTANCE_IDS}[0]
187
188 Associate L3VPN To Routers
189     ${router_id} =    OpenStackOperations.Get Router Id    ${ROUTER}
190     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
191     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
192     BuiltIn.Should Contain    ${resp}    ${router_id}
193
194 Verify L3VPN Datapath With Router Association
195     BuiltIn.Log    Verify VPN interfaces, FIB entries and Flow table
196     ${vm_ips} =    BuiltIn.Create List    @{VM_IP_NET10}    @{VM_IP_NET20}
197     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${VPN_IFACES_URL}    ${vm_ips}
198     ${RD} =    Strip String    @{RDS}[0]    characters="[]
199     BuiltIn.Wait Until Keyword Succeeds    60s    15s    Utils.Check For Elements At URI    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/    ${vm_ips}
200     Verify Flows Are Present For L3VPN On All Compute Nodes    ${vm_ips}
201     BuiltIn.Wait Until Keyword Succeeds    30s    10s    VpnOperations.Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
202     Verify GWMAC Flow Entry On Flow Table On All Compute Nodes    ipv6
203     BuiltIn.Log    Check datapath from network1 to network2
204     ${dst_ip_list} =    BuiltIn.Create List    @{VM_IP_NET10}[1]    @{VM_IP_NET20}
205     OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS}[0]    @{VM_IP_NET10}[0]    ${dst_ip_list}
206     BuiltIn.Log    Check datapath from network2 to network1
207     ${dst_ip_list} =    BuiltIn.Create List    @{VM_IP_NET20}[1]    @{VM_IP_NET10}
208     OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS}[1]    @{VM_IP_NET20}[0]    ${dst_ip_list}
209
210 Dissociate L3VPN From Routers
211     ${router_id}=    OpenStackOperations.Get Router Id    ${ROUTER}
212     VpnOperations.Dissociate VPN to Router    routerid=${router_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
213     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
214     BuiltIn.Should Not Contain    ${resp}    ${router_id}
215
216 Delete Router And Router Interfaces With L3VPN
217     ${router_id}=    OpenStackOperations.Get Router Id    ${ROUTER}
218     VpnOperations.Associate VPN to Router    routerid=${router_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
219     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
220     BuiltIn.Should Contain    ${resp}    ${router_id}
221     : FOR    ${INTERFACE}    IN    @{SUBNETS}
222     \    OpenStackOperations.Remove Interface    ${ROUTER}    ${INTERFACE}
223     ${interface_output} =    OpenStackOperations.Show Router Interface    ${ROUTER}
224     : FOR    ${INTERFACE}    IN    @{SUBNETS}
225     \    ${subnet_id} =    OpenStackOperations.Get Subnet Id    ${INTERFACE}
226     \    BuiltIn.Should Not Contain    ${interface_output}    ${subnet_id}
227     OpenStackOperations.Delete Router    ${ROUTER}
228     ${router_output} =    OpenStackOperations.List Routers
229     BuiltIn.Should Not Contain    ${router_output}    ${ROUTER}
230     @{router_list} =    BuiltIn.Create List    ${ROUTER}
231     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements Not At URI    ${ROUTER_URL}    ${router_list}
232     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
233     BuiltIn.Should Not Contain    ${resp}    ${router_id}
234     Verify GWMAC Flow Entry Removed From Flow Table On All Compute Nodes
235
236 Delete Router With NonExistentRouter Name
237     ${rc}    ${output}=    Run And Return Rc And Output    neutron router-delete nonExistentRouter
238     BuiltIn.Should Match Regexp    ${output}    Unable to find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
239
240 Associate L3VPN To Networks
241     ${network1_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[0]
242     ${network2_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[1]
243     VpnOperations.Associate L3VPN To Network    networkid=${network1_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
244     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
245     BuiltIn.Should Contain    ${resp}    ${network1_id}
246     VpnOperations.Associate L3VPN To Network    networkid=${network2_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
247     ${resp} =    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
248     BuiltIn.Should Contain    ${resp}    ${network2_id}
249
250 Dissociate L3VPN From Networks
251     ${network1_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[0]
252     ${network2_id} =    OpenStackOperations.Get Net Id    @{NETWORKS}[1]
253     VpnOperations.Dissociate L3VPN From Networks    networkid=${network1_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
254     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
255     BuiltIn.Should Not Contain    ${resp}    ${network1_id}
256     VpnOperations.Dissociate L3VPN From Networks    networkid=${network2_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
257     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
258     BuiltIn.Should Not Contain    ${resp}    ${network2_id}
259
260 Delete L3VPN
261     VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
262
263 Create Multiple L3VPN
264     ${net_id} =    Get Net Id    @{NETWORKS}[0]
265     ${tenant_id} =    Get Tenant ID From Network    ${net_id}
266     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]    name=@{VPN_NAMES}[0]    rd=@{RDS}[0]    exportrt=@{RDS}[0]    importrt=@{RDS}[0]    tenantid=${tenant_id}
267     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[1]    name=@{VPN_NAMES}[1]    rd=@{RDS}[1]    exportrt=@{RDS}[1]    importrt=@{RDS}[1]    tenantid=${tenant_id}
268     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[2]    name=@{VPN_NAMES}[2]    rd=@{RDS}[2]    exportrt=@{RDS}[2]    importrt=@{RDS}[2]    tenantid=${tenant_id}
269     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
270     BuiltIn.Should Contain    ${resp}    @{VPN_INSTANCE_IDS}[0]
271     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[1]
272     BuiltIn.Should Contain    ${resp}    @{VPN_INSTANCE_IDS}[1]
273     ${resp}=    VpnOperations.VPN Get L3VPN    vpnid=@{VPN_INSTANCE_IDS}[2]
274     BuiltIn.Should Contain    ${resp}    @{VPN_INSTANCE_IDS}[2]
275
276 Delete Multiple L3VPN
277     VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]
278     VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_IDS}[1]
279     VpnOperations.VPN Delete L3VPN    vpnid=@{VPN_INSTANCE_IDS}[2]