6a6833801344b4048356766f4a1a06f207222a6c
[integration/test.git] / csit / suites / netvirt / Netvirt_Vpnservice / 03_basic_ipv6_vpnservice.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       BuiltIn.Run Keywords    Get OvsDebugInfo
6 ...               AND    Basic Vpnservice Suite Setup
7 ...               AND    Get OvsDebugInfo
8 Suite Teardown    BuiltIn.Run Keywords    Basic Vpnservice Suite Teardown
9 ...               AND    Get OvsDebugInfo
10 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
11 Test Teardown     Get Test Teardown Debugs
12 Library           OperatingSystem
13 Library           RequestsLibrary
14 Resource          ../../../libraries/Utils.robot
15 Resource          ../../../libraries/OpenStackOperations.robot
16 Resource          ../../../libraries/DevstackUtils.robot
17 Resource          ../../../libraries/VpnOperations.robot
18 Resource          ../../../libraries/OVSDB.robot
19 Resource          ../../../libraries/SetupUtils.robot
20 Resource          ../../../libraries/Tcpdump.robot
21 Resource          ../../../variables/Variables.robot
22 Resource          ../../../variables/netvirt/Variables.robot
23
24 *** Variables ***
25 @{NETWORKS}       NET1_IPV6    NET2_IPV6
26 @{SUBNETS}        SUBNET1_IPV6    SUBNET2_IPV6
27 @{SUBNETS_CIDR}    2001:db8:0:2::/64    2001:db8:0:3::/64
28 @{PORT_LIST}      PORT11_IPV6    PORT21_IPV6    PORT12_IPV6    PORT22_IPV6
29 @{VM_INSTANCES_NET10}    VM11_IPV6    VM21_IPV6
30 @{VM_INSTANCES_NET20}    VM12_IPV6    VM22_IPV6
31 @{ROUTERS}        ROUTER_1_IPV6
32 @{EXTRA_NW_IP}    2001:db9:cafe:d::10    2001:db9:abcd:d::20
33 @{EXTRA_NW_SUBNET}    2001:db9:cafe:d::/64    2001:db9:abcd:d::/64
34 ${SECURITY_GROUP}    sg-ipv6-vpnservice
35 ${UPDATE_NETWORK}    UpdateNetwork
36 ${UPDATE_SUBNET}    UpdateSubnet
37 ${UPDATE_PORT}    UpdatePort
38
39 *** Test Cases ***
40 Create Neutron Networks
41     [Documentation]    Create two networks
42     Create Network    ${NETWORKS[0]}
43     Create Network    ${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}
48
49 Create Neutron Subnets
50     [Documentation]    Create two subnets for previously created networks
51     ${net1_additional_args}=    Catenate    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET1_IPV6_ADDR_POOL}
52     ${net2_additional_args}=    Catenate    --ip-version=6 --ipv6-address-mode=slaac --ipv6-ra-mode=slaac ${NET2_IPV6_ADDR_POOL}
53     Create SubNet    ${NETWORKS[0]}    ${SUBNETS[0]}    ${SUBNETS_CIDR[0]}    ${net1_additional_args}
54     Create SubNet    ${NETWORKS[1]}    ${SUBNETS[1]}    ${SUBNETS_CIDR[1]}    ${net2_additional_args}
55     Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
56     Update SubNet    ${SUBNETS[0]}    additional_args=--description ${UPDATE_SUBNET}
57     ${output} =    Show SubNet    ${SUBNETS[0]}
58     Should Contain    ${output}    ${UPDATE_SUBNET}
59
60 Create Routers
61     [Documentation]    Create Router
62     Create Router    ${ROUTERS[0]}
63     Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${ROUTER_URL}    ${ROUTERS}
64
65 Add Interfaces To Router
66     [Documentation]    Add Interfaces
67     : FOR    ${INTERFACE}    IN    @{SUBNETS}
68     \    Add Router Interface    ${ROUTERS[0]}    ${INTERFACE}
69     ${interface_output} =    Show Router Interface    ${ROUTERS[0]}
70     : FOR    ${INTERFACE}    IN    @{SUBNETS}
71     \    ${subnet_id} =    Get Subnet Id    ${INTERFACE}    ${devstack_conn_id}
72     \    Should Contain    ${interface_output}    ${subnet_id}
73     ${GWMAC_ADDRS}    ${GWIP_ADDRS} =    VpnOperations.Get Gateway MAC And IP Address    ${ROUTERS[0]}    ${IP6_REGEX}
74     Set Suite Variable    ${GWMAC_ADDRS}
75     Set Suite Variable    ${GWIP_ADDRS}
76
77 Add Ssh V6 Allow Rule
78     [Documentation]    Allow all TCP/UDP/ICMP6 packets for this suite
79     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP}    IPv6
80
81 Create Neutron Ports
82     [Documentation]    Create four ports under previously created subnets
83     ${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]}
84     Create Port    ${NETWORKS[0]}    ${PORT_LIST[0]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
85     Create Port    ${NETWORKS[0]}    ${PORT_LIST[1]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
86     Create Port    ${NETWORKS[1]}    ${PORT_LIST[2]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
87     Create Port    ${NETWORKS[1]}    ${PORT_LIST[3]}    sg=${SECURITY_GROUP}    additional_args=${allowed_address_pairs_args}
88     Wait Until Keyword Succeeds    3s    1s    Check For Elements At URI    ${PORT_URL}    ${PORT_LIST}
89     Update Port    ${PORT_LIST[0]}    additional_args=--name ${UPDATE_PORT}
90     ${output} =    Show Port    ${UPDATE_PORT}
91     Should Contain    ${output}    ${UPDATE_PORT}
92     Update Port    ${UPDATE_PORT}    additional_args=--name ${PORT_LIST[0]}
93
94 Create Nova VMs
95     [Documentation]    Create Vm instances on compute node with port
96     Create Vm Instance With Port On Compute Node    ${PORT_LIST[0]}    ${VM_INSTANCES_NET10[0]}    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
97     Create Vm Instance With Port On Compute Node    ${PORT_LIST[1]}    ${VM_INSTANCES_NET10[1]}    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
98     Create Vm Instance With Port On Compute Node    ${PORT_LIST[2]}    ${VM_INSTANCES_NET20[0]}    ${OS_COMPUTE_1_IP}    sg=${SECURITY_GROUP}
99     Create Vm Instance With Port On Compute Node    ${PORT_LIST[3]}    ${VM_INSTANCES_NET20[1]}    ${OS_COMPUTE_2_IP}    sg=${SECURITY_GROUP}
100     ${VM_INSTANCES}=    Create List    @{VM_INSTANCES_NET10}    @{VM_INSTANCES_NET20}
101     : FOR    ${VM}    IN    @{VM_INSTANCES}
102     \    Poll VM Is ACTIVE    ${VM}
103     Wait Until Keyword Succeeds    30s    10s    Wait For Routes To Propogate    ${NETWORKS}    ${SUBNETS_CIDR}
104     ${prefix_net10}=    Replace String    ${SUBNETS_CIDR[0]}    ::/64    (:[a-f0-9]{,4}){,4}
105     ${status}    ${message}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    3x    60s    Collect VM IPv6 SLAAC Addresses
106     ...    true    ${prefix_net10}    @{VM_INSTANCES_NET10}
107     ${prefix_net20}=    Replace String    ${SUBNETS_CIDR[1]}    ::/64    (:[a-f0-9]{,4}){,4}
108     ${status}    ${message}    Run Keyword And Ignore Error    Wait Until Keyword Succeeds    3x    60s    Collect VM IPv6 SLAAC Addresses
109     ...    true    ${prefix_net20}    @{VM_INSTANCES_NET20}
110     ${VM_IP_NET10}=    Collect VM IPv6 SLAAC Addresses    false    ${prefix_net10}    @{VM_INSTANCES_NET10}
111     ${VM_IP_NET20}=    Collect VM IPv6 SLAAC Addresses    false    ${prefix_net20}    @{VM_INSTANCES_NET20}
112     ${VM_INSTANCES}=    Collections.Combine Lists    ${VM_INSTANCES_NET10}    ${VM_INSTANCES_NET20}
113     ${VM_IPS}=    Collections.Combine Lists    ${VM_IP_NET10}    ${VM_IP_NET20}
114     ${LOOP_COUNT}    Get Length    ${VM_INSTANCES_NET10}
115     : FOR    ${index}    IN RANGE    0    ${LOOP_COUNT}
116     \    ${status}    ${message}    Run Keyword And Ignore Error    Should Not Contain    @{VM_IPS}[${index}]    None
117     \    Run Keyword If    '${status}' == 'FAIL'    Write Commands Until Prompt    openstack console log show @{VM_INSTANCES}[${index}]    30s
118     Set Suite Variable    ${VM_IP_NET10}
119     Set Suite Variable    ${VM_IP_NET20}
120     Should Not Contain    ${VM_IP_NET10}    None
121     Should Not Contain    ${VM_IP_NET20}    None
122     [Teardown]    Run Keywords    Show Debugs    @{VM_INSTANCES_NET10}    @{VM_INSTANCES_NET20}
123     ...    AND    Get Test Teardown Debugs
124
125 Check ELAN Datapath Traffic Within The Networks
126     [Documentation]    Checks datapath within the same network with different vlans.
127     ${output}=    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[0]}    ping6 -c 3 ${VM_IP_NET10[1]}
128     Should Contain    ${output}    64 bytes
129     ${output}=    Execute Command on VM Instance    @{NETWORKS}[1]    ${VM_IP_NET20[0]}    ping6 -c 3 ${VM_IP_NET20[1]}
130     Should Contain    ${output}    64 bytes
131
132 Check L3_Datapath Traffic Across Networks With Router
133     [Documentation]    Datapath test across the networks using router for L3.
134     Log    Verification of FIB Entries and Flow
135     ${cn1_conn_id} =    Start Packet Capture on Node    ${OS_COMPUTE_1_IP}    file_Name=tcpDumpCN1
136     ${cn2_conn_id} =    Start Packet Capture on Node    ${OS_COMPUTE_2_IP}    file_Name=tcpDumpCN2
137     ${os_conn_id} =    Start Packet Capture on Node    ${OS_CONTROL_NODE_IP}    file_Name=tcpDumpOS
138     ${vm_instances} =    Create List    @{VM_IP_NET10}    @{VM_IP_NET20}
139     Wait Until Keyword Succeeds    30s    10s    Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_instances}
140     Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For L3VPN    ${OS_COMPUTE_1_IP}    ${VM_IP_NET10}
141     Wait Until Keyword Succeeds    30s    10s    Verify Flows Are Present For L3VPN    ${OS_COMPUTE_1_IP}    ${VM_IP_NET20}
142     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
143     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Flow Entry On Flow Table    ${OS_COMPUTE_1_IP}
144     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Flow Entry On Flow Table    ${OS_COMPUTE_2_IP}
145     ${dst_ip_list} =    Create List    ${VM_IP_NET10[1]}    @{VM_IP_NET20}
146     Test Operations From Vm Instance    ${NETWORKS[0]}    ${VM_IP_NET10[0]}    ${dst_ip_list}
147     ${dst_ip_list} =    Create List    ${VM_IP_NET20[1]}    @{VM_IP_NET10}
148     Test Operations From Vm Instance    ${NETWORKS[1]}    ${VM_IP_NET20[0]}    ${dst_ip_list}
149     [Teardown]    VpnOperations.Test Teardown With Tcpdump Stop    ${cn1_conn_id}    ${cn2_conn_id}    ${os_conn_id}
150
151 Add Multiple Extra Routes And Check Datapath Before L3VPN Creation
152     [Documentation]    Add multiple extra routes and check data path before L3VPN creation
153     ${CONFIG_EXTRA_ROUTE_IP1} =    Catenate    sudo ip -6 addr add ${EXTRA_NW_IP[0]}/64 dev eth0
154     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[0]}    ${CONFIG_EXTRA_ROUTE_IP1}
155     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[0]}    ip -6 a
156     ${CONFIG_EXTRA_ROUTE_IP2} =    Catenate    sudo ip -6 addr add ${EXTRA_NW_IP[1]}/64 dev eth0
157     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[0]}    ${CONFIG_EXTRA_ROUTE_IP2}
158     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[0]}    ip -6 a
159     ${EXT_RT1} =    Set Variable    destination=${EXTRA_NW_SUBNET[0]},gateway=${VM_IP_NET10[0]}
160     ${EXT_RT2} =    Set Variable    destination=${EXTRA_NW_SUBNET[1]},gateway=${VM_IP_NET10[0]}
161     ${cmd} =    Catenate    ${RT_OPTIONS}    ${EXT_RT1}    ${RT_OPTIONS}    ${EXT_RT2}
162     Update Router    @{ROUTERS}[0]    ${cmd}
163     Show Router    @{ROUTERS}[0]    -D
164     ${vm_instances} =    Create List    @{EXTRA_NW_SUBNET}
165     Wait Until Keyword Succeeds    30s    10s    Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_instances}
166     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[1]}    ping6 -c 3 @{EXTRA_NW_IP}[1]
167     Should Contain    ${output}    64 bytes
168     ${output} =    Execute Command on VM Instance    @{NETWORKS}[1]    ${VM_IP_NET20[1]}    ping6 -c 3 @{EXTRA_NW_IP}[1]
169     Should Contain    ${output}    64 bytes
170     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[1]}    ping6 -c 3 @{EXTRA_NW_IP}[0]
171     Should Contain    ${output}    64 bytes
172
173 Delete Extra Route
174     [Documentation]    Delete the extra routes
175     Update Router    @{ROUTERS}[0]    ${RT_CLEAR}
176     Show Router    @{ROUTERS}[0]    -D
177
178 Delete And Recreate Extra Route
179     [Documentation]    Recreate multiple extra route and check data path before L3VPN creation
180     ${CONFIG_EXTRA_ROUTE_IP1} =    Catenate    sudo ip -6 addr add ${EXTRA_NW_IP[1]}/64 dev eth0
181     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[0]}    ${CONFIG_EXTRA_ROUTE_IP1}
182     ${EXT_RT1} =    Set Variable    destination=${EXTRA_NW_SUBNET[0]},gateway=${VM_IP_NET10[0]}
183     ${cmd} =    Catenate    ${RT_OPTIONS}    ${EXT_RT1}
184     Update Router    @{ROUTERS}[0]    ${cmd}
185     Show Router    @{ROUTERS}[0]    -D
186     ${output} =    Execute Command on VM Instance    @{NETWORKS}[0]    ${VM_IP_NET10[1]}    ping6 -c 3 @{EXTRA_NW_IP}[0]
187     Should Contain    ${output}    64 bytes
188     # clear off extra-routes before the next set of tests
189     [Teardown]    Run Keywords    Update Router    @{ROUTERS}[0]    ${RT_CLEAR}
190     ...    AND    Show Router    @{ROUTERS}[0]    -D
191     ...    AND    Get Test Teardown Debugs
192
193 Create L3VPN
194     [Documentation]    Creates L3VPN and verify the same
195     ${net_id} =    Get Net Id    @{NETWORKS}[0]    ${devstack_conn_id}
196     ${tenant_id} =    Get Tenant ID From Network    ${net_id}
197     VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[0]}    name=${VPN_NAME[0]}    rd=@{RDS}[0]    exportrt=@{RDS}[0]    importrt=@{RDS}[0]    tenantid=${tenant_id}
198     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
199     Should Contain    ${resp}    ${VPN_INSTANCE_ID[0]}
200
201 Associate L3VPN To Routers
202     [Documentation]    Associating router to L3VPN
203     ${router_id}=    Get Router Id    ${ROUTERS[0]}    ${devstack_conn_id}
204     Associate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_ID[0]}
205     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
206     Should Contain    ${resp}    ${router_id}
207
208 Verify L3VPN Datapath With Router Association
209     [Documentation]    Datapath test across the networks using L3VPN with router association.
210     Log    Verify VPN interfaces, FIB entries and Flow table
211     ${vm_instances} =    Create List    @{VM_IP_NET10}    @{VM_IP_NET20}
212     Wait Until Keyword Succeeds    30s    10s    Check For Elements At URI    ${VPN_IFACES_URL}    ${vm_instances}
213     ${RD} =    Strip String    ${RDS[0]}    characters="[]
214     Wait Until Keyword Succeeds    60s    15s    Check For Elements At URI    ${CONFIG_API}/odl-fib:fibEntries/vrfTables/${RD}/    ${vm_instances}
215     Wait Until Keyword Succeeds    60s    15s    Verify Flows Are Present For L3VPN    ${OS_COMPUTE_1_IP}    ${vm_instances}
216     Wait Until Keyword Succeeds    60s    15s    Verify Flows Are Present For L3VPN    ${OS_COMPUTE_2_IP}    ${vm_instances}
217     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Entry On ODL    ${GWMAC_ADDRS}
218     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Flow Entry On Flow Table    ${OS_COMPUTE_1_IP}
219     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Flow Entry On Flow Table    ${OS_COMPUTE_2_IP}
220     Log    Check datapath from network1 to network2
221     ${dst_ip_list} =    Create List    @{VM_IP_NET10}[1]    @{VM_IP_NET20}
222     Test Operations From Vm Instance    ${NETWORKS[0]}    @{VM_IP_NET10}[0]    ${dst_ip_list}
223     Log    Check datapath from network2 to network1
224     ${dst_ip_list} =    Create List    @{VM_IP_NET20}[1]    @{VM_IP_NET10}
225     Test Operations From Vm Instance    ${NETWORKS[1]}    @{VM_IP_NET20}[0]    ${dst_ip_list}
226
227 Dissociate L3VPN From Routers
228     [Documentation]    Dissociating router from L3VPN
229     ${router_id}=    Get Router Id    ${ROUTERS[0]}    ${devstack_conn_id}
230     Dissociate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_ID[0]}
231     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
232     Should Not Contain    ${resp}    ${router_id}
233
234 Delete Router And Router Interfaces With L3VPN
235     [Documentation]    Delete Router and Interface to the subnets with L3VPN associate
236     ${router_id}=    Get Router Id    ${ROUTERS[0]}    ${devstack_conn_id}
237     Associate VPN to Router    routerid=${router_id}    vpnid=${VPN_INSTANCE_ID[0]}
238     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
239     Should Contain    ${resp}    ${router_id}
240     : FOR    ${INTERFACE}    IN    @{SUBNETS}
241     \    Remove Interface    ${ROUTERS[0]}    ${INTERFACE}
242     ${interface_output} =    Show Router Interface    ${ROUTERS[0]}
243     : FOR    ${INTERFACE}    IN    @{SUBNETS}
244     \    ${subnet_id} =    Get Subnet Id    ${INTERFACE}    ${devstack_conn_id}
245     \    Should Not Contain    ${interface_output}    ${subnet_id}
246     Delete Router    ${ROUTERS[0]}
247     ${router_output} =    List Routers
248     Should Not Contain    ${router_output}    ${ROUTERS[0]}
249     ${router_list} =    Create List    ${ROUTERS[0]}
250     Wait Until Keyword Succeeds    3s    1s    Check For Elements Not At URI    ${ROUTER_URL}    ${router_list}
251     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
252     Should Not Contain    ${resp}    ${router_id}
253     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Flow Entry Removed From Flow Table    ${OS_COMPUTE_1_IP}
254     Wait Until Keyword Succeeds    30s    10s    Verify GWMAC Flow Entry Removed From Flow Table    ${OS_COMPUTE_2_IP}
255
256 Delete Router With NonExistentRouter Name
257     [Documentation]    Delete router with nonExistentRouter name
258     ${rc}    ${output}=    Run And Return Rc And Output    neutron router-delete nonExistentRouter
259     Should Match Regexp    ${output}    Unable to find router with name or id 'nonExistentRouter'|Unable to find router\\(s\\) with id\\(s\\) 'nonExistentRouter'
260
261 Associate L3VPN To Networks
262     [Documentation]    Associates L3VPN to networks and verify
263     ${network1_id} =    Get Net Id    ${NETWORKS[0]}    ${devstack_conn_id}
264     ${network2_id} =    Get Net Id    ${NETWORKS[1]}    ${devstack_conn_id}
265     Associate L3VPN To Network    networkid=${network1_id}    vpnid=${VPN_INSTANCE_ID[0]}
266     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
267     Should Contain    ${resp}    ${network1_id}
268     Associate L3VPN To Network    networkid=${network2_id}    vpnid=${VPN_INSTANCE_ID[0]}
269     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
270     Should Contain    ${resp}    ${network2_id}
271
272 Dissociate L3VPN From Networks
273     [Documentation]    Dissociate L3VPN from networks
274     ${network1_id} =    Get Net Id    ${NETWORKS[0]}    ${devstack_conn_id}
275     ${network2_id} =    Get Net Id    ${NETWORKS[1]}    ${devstack_conn_id}
276     Dissociate L3VPN From Networks    networkid=${network1_id}    vpnid=${VPN_INSTANCE_ID[0]}
277     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
278     Should Not Contain    ${resp}    ${network1_id}
279     Dissociate L3VPN From Networks    networkid=${network2_id}    vpnid=${VPN_INSTANCE_ID[0]}
280     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
281     Should Not Contain    ${resp}    ${network2_id}
282
283 Delete L3VPN
284     [Documentation]    Delete L3VPN
285     VPN Delete L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
286
287 Create Multiple L3VPN
288     [Documentation]    Creates three L3VPNs and then verify the same
289     ${net_id} =    Get Net Id    @{NETWORKS}[0]    ${devstack_conn_id}
290     ${tenant_id} =    Get Tenant ID From Network    ${net_id}
291     VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[0]}    name=${VPN_NAME[0]}    rd=${RDS[0]}    exportrt=${RDS[0]}    importrt=${RDS[0]}    tenantid=${tenant_id}
292     VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[1]}    name=${VPN_NAME[1]}    rd=${RDS[1]}    exportrt=${RDS[1]}    importrt=${RDS[1]}    tenantid=${tenant_id}
293     VPN Create L3VPN    vpnid=${VPN_INSTANCE_ID[2]}    name=${VPN_NAME[2]}    rd=${RDS[2]}    exportrt=${RDS[2]}    importrt=${RDS[2]}    tenantid=${tenant_id}
294     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
295     Should Contain    ${resp}    ${VPN_INSTANCE_ID[0]}
296     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[1]}
297     Should Contain    ${resp}    ${VPN_INSTANCE_ID[1]}
298     ${resp}=    VPN Get L3VPN    vpnid=${VPN_INSTANCE_ID[2]}
299     Should Contain    ${resp}    ${VPN_INSTANCE_ID[2]}
300
301 Delete Multiple L3VPN
302     [Documentation]    Delete three L3VPNs created using Multiple L3VPN Test
303     VPN Delete L3VPN    vpnid=${VPN_INSTANCE_ID[0]}
304     VPN Delete L3VPN    vpnid=${VPN_INSTANCE_ID[1]}
305     VPN Delete L3VPN    vpnid=${VPN_INSTANCE_ID[2]}