Update Robot Framework format - step 11
[integration/test.git] / csit / suites / netvirt / subnet_routing / subnet_routing_and_multicast.robot
1 *** Settings ***
2 Documentation       Test suite to validate subnet routing and multicast 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
6 Resource            ../../../libraries/BgpOperations.robot
7 Resource            ../../../libraries/KarafKeywords.robot
8 Resource            ../../../libraries/OpenStackOperations.robot
9 Resource            ../../../libraries/Utils.robot
10 Resource            ../../../libraries/SetupUtils.robot
11 Resource            ../../../variables/Variables.robot
12 Resource            ../../../variables/netvirt/Variables.robot
13 Resource            ../../../libraries/VpnOperations.robot
14
15 Suite Setup         Suite Setup
16 Suite Teardown      Stop Suite
17 Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
18 Test Teardown       OpenStackOperations.Get Test Teardown Debugs
19
20
21 *** Variables ***
22 ${AS_ID}                        100
23 ${SECURITY_GROUP}               mc_sg
24 ${NUM_OF_PORTS_PER_NETWORK}     4
25 ${NUM_OF_INSTANCES}             20
26 ${VPN_INSTANCE_ID}              4ae8cd92-48ca-49b5-94e1-b2921a261111
27 ${VPN_NAME}                     mc_vpn1
28 ${LOOPBACK_IP}                  5.5.5.2
29 ${L3VPN_RD}                     2200:2
30 ${DCGW_SYSTEM_IP}               ${TOOLS_SYSTEM_1_IP}
31 ${RPING_MIP_IP}                 sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[0] ${EXTRA_NW_SUBNET}[0]
32 ${RPING_MIP_IP1}                sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[1] ${EXTRA_NW_SUBNET}[1]
33 ${RPING_MIP_IP2}                sudo arping -I eth0:1 -c 5 -b -s ${EXTRA_NW_SUBNET}[2] ${EXTRA_NW_SUBNET}[2]
34 ${RPING_MIP_IP3}                sudo arping -I eth0:1 -c 5 -b -s ${NEW_EXTRA_NW_SUBNET} ${NEW_EXTRA_NW_SUBNET}
35 @{INTERFACE_STATE}              up    down
36 @{NETWORKS}                     mc_net_1    mc_net_2    mc_net_3
37 @{NET_1_VMS}                    mc_net_1_vm_1    mc_net_1_vm_2    mc_net_1_vm_3    mc_net_1_vm_4
38 @{NET_2_VMS}                    mc_net_2_vm_1    mc_net_2_vm_2    mc_net_2_vm_3    mc_net_2_vm_4
39 @{NET_3_VMS}                    mc_net_3_vm_1    mc_net_3_vm_2    mc_net_3_vm_3    mc_net_3_vm_4
40 @{NET_1_PORTS}                  mc_net_1_port_1    mc_net_1_port_2    mc_net_1_port_3    mc_net_1_port_4
41 @{NET_2_PORTS}                  mc_net_2_port_1    mc_net_2_port_2    mc_net_2_port_3    mc_net_2_port_4
42 @{NET_3_PORTS}                  mc_net_3_port_1    mc_net_3_port_2    mc_net_3_port_3    mc_net_3_port_4
43 @{SUBNETS}                      mc_sub_1    mc_sub_2    mc_sub_3
44 @{SUBNET_CIDR}                  10.1.0.0/24    10.2.0.0/24    10.3.0.0/24
45 @{EXTRA_NW_SUBNET}              10.1.0.100    10.2.0.100    10.3.0.100
46 ${NEW_EXTRA_NW_SUBNET}          10.1.0.110
47 ${MASK}                         255.255.255.0
48
49
50 *** Test Cases ***
51 Verify The Subnet Route When Neutron Port Hosting Subnet Route Is Down/up On Single VSwitch Topology
52     [Documentation]    Verify the subnet route when enterprise host is down and up.
53     BuiltIn.Wait Until Keyword Succeeds
54     ...    30s
55     ...    5s
56     ...    OpenStackOperations.Configure_IP_On_Sub_Interface
57     ...    ${NETWORKS}[0]
58     ...    ${EXTRA_NW_SUBNET}[0]
59     ...    ${NET_1_VM_IPS}[0]
60     ...    ${MASK}
61     ...    ${INTERFACE_STATE}[1]
62     ${allowed_ip_list} =    BuiltIn.Create List    ${EXTRA_NW_SUBNET}[0]
63     BuiltIn.Wait Until Keyword Succeeds
64     ...    30s
65     ...    10s
66     ...    Utils.Check For Elements At URI
67     ...    ${FIB_ENTRY_URL}
68     ...    ${allowed_ip_list}
69     BuiltIn.Wait Until Keyword Succeeds
70     ...    30s
71     ...    5s
72     ...    OpenStackOperations.Configure_IP_On_Sub_Interface
73     ...    ${NETWORKS}[0]
74     ...    ${EXTRA_NW_SUBNET}[0]
75     ...    ${NET_1_VM_IPS}[0]
76     ...    ${MASK}
77     ...    ${INTERFACE_STATE}[0]
78     BuiltIn.Wait Until Keyword Succeeds
79     ...    30s
80     ...    5s
81     ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
82     ...    ${NETWORKS}[0]
83     ...    ${EXTRA_NW_SUBNET}[0]
84     ...    ${NET_1_VM_IPS}[0]
85     BuiltIn.Wait Until Keyword Succeeds
86     ...    30s
87     ...    10s
88     ...    Utils.Check For Elements At URI
89     ...    ${FIB_ENTRY_URL}
90     ...    ${allowed_ip_list}
91     Verify Ping between Inter Intra And Enterprise host
92
93 Verify Enterprise Hosts Reachability After VM Reboot
94     [Documentation]    Restart the VSwitch1 which is hosting the enterprise host and check the subnet route
95     OpenStackOperations.Get ControlNode Connection
96     @{NET_1_VM_IPS}    ${NET1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
97     OpenStackOperations.Reboot Nova VM    ${NET_1_VMS}[0]
98     @{NET_1_VM_IPS}    ${NET1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
99     BuiltIn.Wait Until Keyword Succeeds
100     ...    30s
101     ...    5s
102     ...    OpenStackOperations.Configure_IP_On_Sub_Interface
103     ...    ${NETWORKS}[0]
104     ...    ${EXTRA_NW_SUBNET}[0]
105     ...    ${NET_1_VM_IPS}[0]
106     ...    ${MASK}
107     ...    ${INTERFACE_STATE}[0]
108     BuiltIn.Wait Until Keyword Succeeds
109     ...    30s
110     ...    5s
111     ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
112     ...    ${NETWORKS}[0]
113     ...    ${EXTRA_NW_SUBNET}[0]
114     ...    ${NET_1_VM_IPS}[0]
115     Verify Ping between Inter Intra And Enterprise host
116
117 Verify The Subnet Route For Multiple Subnets On Multi VSwitch Topology When DC-GW Is Restarted
118     [Documentation]    Restart dcgw and check enterprise hosts reachability
119     BgpOperations.Restart BGP Processes On DCGW    ${DCGW_SYSTEM_IP}
120     Create BGP Config On DCGW
121     Verify Ping between Inter Intra And Enterprise host
122
123 Verify The Subnet Route For Multiple Subnets On Multi VSwitch Topology When Qbgp Is Restarted
124     [Documentation]    Restart qbgp and check enterprise hosts reachability
125     BgpOperations.Restart BGP Processes On ODL    ${ODL_SYSTEM_IP}
126     Verify Ping between Inter Intra And Enterprise host
127
128 Verify The Subnet Route When Vswitch Hosting Subnet Route Is Restarted On Single Vswitch Topology
129     [Documentation]    Restart single OVS node on which subnet route is configured and verify enterprise hosts reachability
130     OVSDB.Restart OVSDB    ${OS_COMPUTE_2_IP}
131     BuiltIn.Wait Until Keyword Succeeds    10s    20s    OVSDB.Verify Ovsdb State    ${OS_COMPUTE_2_IP}
132     VpnOperations.Verify Tunnel Status as UP
133     Verify Ping between Inter Intra And Enterprise host
134
135 Verify The Subnet Route When Vswitch Hosting Subnet Enterprise Host Is Restarted On Multiple Vswitch Topology
136     [Documentation]    Restart the OVS node on both compute nodes and verify the subnet route
137     OVSDB.Restart OVSDB    ${OS_COMPUTE_1_IP}
138     OVSDB.Restart OVSDB    ${OS_COMPUTE_2_IP}
139     BuiltIn.Wait Until Keyword Succeeds    10s    20s    OVSDB.Verify Ovsdb State    ${OS_COMPUTE_1_IP}
140     BuiltIn.Wait Until Keyword Succeeds    10s    20s    OVSDB.Verify Ovsdb State    ${OS_COMPUTE_2_IP}
141     VpnOperations.Verify Tunnel Status as UP
142     Verify Ping between Inter Intra And Enterprise host
143
144 Verify The Subnet Route For One Subnet On Single Vswitch
145     [Documentation]    Verify the subnet route for one subnet on a single VSwitch
146     ${output} =    OpenStackOperations.Execute Command on VM Instance
147     ...    ${NETWORKS}[2]
148     ...    ${NET_2_VM_IPS}[1]
149     ...    ping -c 3 ${EXTRA_NW_SUBNET}[1]
150     BuiltIn.Should Contain    ${output}    64 bytes
151     Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${EXTRA_NW_SUBNET}
152     Verify Ping between Inter Intra And Enterprise host
153
154 Verify The Subnet Route For Multiple Subnets On Multi Vswitch Topology
155     [Documentation]    Configure one more IP on sub interface and verify the subnet route for multiple subnets on multi VSwitch topology
156     BuiltIn.Log    Bring up enterprise host in another vswitch
157     Configure_IP_On_Sub_Interface    ${NETWORKS}[0]    ${NEW_EXTRA_NW_SUBNET}    ${NET_1_VM_IPS}[2]    ${MASK}
158     Verify_IP_Configured_On_Sub_Interface    ${NETWORKS}[0]    ${NEW_EXTRA_NW_SUBNET}    ${NET_1_VM_IPS}[2]
159     ${output} =    OpenStackOperations.Execute Command on VM Instance
160     ...    ${NETWORKS}[0]
161     ...    ${NET_1_VM_IPS}[2]
162     ...    ${RPING_MIP_IP3}
163     BuiltIn.Should Contain    ${output}    broadcast
164     BuiltIn.Should Contain    ${output}    Received 0 reply
165     ${output} =    OpenStackOperations.Execute Command on VM Instance
166     ...    ${NETWORKS}[2]
167     ...    ${NET_1_VM_IPS}[2]
168     ...    ping -c 3 ${NEW_EXTRA_NW_SUBNET}
169     BuiltIn.Should Contain    ${output}    64 bytes
170     Verify Ping between Inter Intra And Enterprise host
171
172 Verify The Subnet Route When The Network Is Removed From The Vpn
173     [Documentation]    Dissociate vpn from the network and verify the subnet route
174     FOR    ${network}    IN    @{NETWORKS}
175         ${network_id} =    OpenStackOperations.Get Net Id    ${network}
176         VpnOperations.Dissociate L3VPN From Networks    networkid=${network_id}    vpnid=${VPN_INSTANCE_ID}
177     END
178     ${vm_ip_list} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{NET_3_VM_IPS}
179     Utils.Check For Elements Not At URI    ${FIB_ENTRY_URL}    ${vm_ip_list}
180     FOR    ${network}    IN    @{NETWORKS}
181         ${network_id} =    OpenStackOperations.Get Net Id    ${network}
182         VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=${VPN_INSTANCE_ID}
183     END
184     Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${vm_ip_list}
185     Verify Ping between Inter Intra And Enterprise host
186
187
188 *** Keywords ***
189 Suite Setup
190     [Documentation]    Test Suite for Subnet_Routing_and_Multicast_Deployments.
191     VpnOperations.Basic Suite Setup
192     BgpOperations.Start Quagga Processes On ODL    ${ODL_SYSTEM_IP}
193     BgpOperations.Start Quagga Processes On DCGW    ${DCGW_SYSTEM_IP}
194     Create Setup
195
196 Stop Suite
197     [Documentation]    Test Teardown for Subnet_Routing_and_Multicast_Deployments.
198     BgpOperations.Delete BGP Configuration On ODL    session
199     BgpOperations.Delete BGP Config On Quagga    ${DCGW_SYSTEM_IP}    ${AS_ID}
200     BgpOperations.Stop BGP Processes On Node    ${ODL_SYSTEM_IP}
201     BgpOperations.Stop BGP Processes On Node    ${DCGW_SYSTEM_IP}
202     OpenStackOperations.OpenStack Suite Teardown
203
204 Create Setup
205     [Documentation]    Create basic topology
206     OpenStackOperations.OpenStack Suite Setup
207     ${id} =    OpenStackOperations.Get Project Id    ${ODL_RESTCONF_USER}
208     OpenStackOperations.Set Instance Quota For Project    ${NUM_OF_INSTANCES}    ${id}
209     Create Neutron Networks
210     Create Neutron Subnets    ${3}
211     OpenStackOperations.Create And Configure Security Group    ${SECURITY_GROUP}
212     Create Neutron Ports
213     Create Nova VMs
214     Create Sub Interfaces And Verify
215     Create L3VPN
216     FOR    ${network}    IN    @{NETWORKS}
217         ${network_id} =    OpenStackOperations.Get Net Id    ${network}
218         VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=${VPN_INSTANCE_ID}
219     END
220     Create BGP Config On ODL
221     Create BGP Config On DCGW
222     BuiltIn.Wait Until Keyword Succeeds    60s    10s    VpnOperations.Verify Tunnel Status as UP
223     ${output} =    OpenStackOperations.Execute Command on VM Instance
224     ...    ${NETWORKS}[0]
225     ...    ${NET_1_VM_IPS}[0]
226     ...    ${RPING_MIP_IP}
227     BuiltIn.Should Contain    ${output}    broadcast    Received 0 reply
228     ${output} =    OpenStackOperations.Execute Command on VM Instance
229     ...    ${NETWORKS}[1]
230     ...    ${NET_2_VM_IPS}[0]
231     ...    ${RPING_MIP_IP1}
232     BuiltIn.Should Contain    ${output}    broadcast    Received 0 reply
233     ${output} =    OpenStackOperations.Execute Command on VM Instance
234     ...    ${NETWORKS}[2]
235     ...    ${NET_3_VM_IPS}[0]
236     ...    ${RPING_MIP_IP2}
237     BuiltIn.Should Contain    ${output}    broadcast    Received 0 reply
238
239 Create Neutron Networks
240     [Documentation]    Create required number of networks
241     FOR    ${net}    IN    @{NETWORKS}
242         OpenStackOperations.Create Network    ${net}
243     END
244     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
245
246 Create Neutron Subnets
247     [Documentation]    Create required number of subnets for previously created networks
248     [Arguments]    ${num_of_network}    ${additional_args}=${EMPTY}    ${verbose}=TRUE
249     FOR    ${index}    IN RANGE    0    ${num_of_network}
250         OpenStackOperations.Create SubNet    ${NETWORKS}[${index}]    ${SUBNETS}[${index}]    ${SUBNET_CIDR}[${index}]
251     END
252     BuiltIn.Wait Until Keyword Succeeds
253     ...    3s
254     ...    1s
255     ...    Utils.Check For Elements At URI
256     ...    ${SUBNETWORK_URL}
257     ...    ${SUBNETS}
258
259 Create Neutron Ports
260     [Documentation]    Create required number of ports under previously created subnets
261     ${allowed_address_pairs_args1} =    BuiltIn.Set Variable
262     ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[0] --allowed-address ip-address=${EXTRA_NW_SUBNET}[1]
263     ${allowed_address_pairs_args2} =    BuiltIn.Set Variable
264     ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[1] --allowed-address ip-address=${EXTRA_NW_SUBNET}[2]
265     ${allowed_address_pairs_args3} =    BuiltIn.Set Variable
266     ...    --allowed-address ip-address=${EXTRA_NW_SUBNET}[2] --allowed-address ip-address=${EXTRA_NW_SUBNET}[0]
267     FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
268         OpenStackOperations.Create Port
269         ...    ${NETWORKS}[0]
270         ...    ${NET_1_PORTS}[${index}]
271         ...    sg=${SECURITY_GROUP}
272         ...    additional_args=${allowed_address_pairs_args1}
273     END
274     FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
275         OpenStackOperations.Create Port
276         ...    ${NETWORKS}[1]
277         ...    ${NET_2_PORTS}[${index}]
278         ...    sg=${SECURITY_GROUP}
279         ...    additional_args=${allowed_address_pairs_args2}
280     END
281     FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_NETWORK}
282         OpenStackOperations.Create Port
283         ...    ${NETWORKS}[2]
284         ...    ${NET_3_PORTS}[${index}]
285         ...    sg=${SECURITY_GROUP}
286         ...    additional_args=${allowed_address_pairs_args3}
287     END
288
289 Create Nova VMs
290     [Documentation]    Create Vm instances on compute nodes
291     FOR    ${index}    IN RANGE    0    2
292         OpenStackOperations.Create Vm Instance With Port On Compute Node
293         ...    ${NET_1_PORTS}[${index}]
294         ...    ${NET_1_VMS}[${index}]
295         ...    ${OS_CMP1_HOSTNAME}
296         ...    sg=${SECURITY_GROUP}
297         OpenStackOperations.Create Vm Instance With Port On Compute Node
298         ...    ${NET_1_PORTS}[${index+2}]
299         ...    ${NET_1_VMS}[${index+2}]
300         ...    ${OS_CMP2_HOSTNAME}
301         ...    sg=${SECURITY_GROUP}
302         OpenStackOperations.Create Vm Instance With Port On Compute Node
303         ...    ${NET_2_PORTS}[${index}]
304         ...    ${NET_2_VMS}[${index}]
305         ...    ${OS_CMP1_HOSTNAME}
306         ...    sg=${SECURITY_GROUP}
307         OpenStackOperations.Create Vm Instance With Port On Compute Node
308         ...    ${NET_2_PORTS}[${index+2}]
309         ...    ${NET_2_VMS}[${index+2}]
310         ...    ${OS_CMP2_HOSTNAME}
311         ...    sg=${SECURITY_GROUP}
312         OpenStackOperations.Create Vm Instance With Port On Compute Node
313         ...    ${NET_3_PORTS}[${index}]
314         ...    ${NET_3_VMS}[${index}]
315         ...    ${OS_CMP1_HOSTNAME}
316         ...    sg=${SECURITY_GROUP}
317         OpenStackOperations.Create Vm Instance With Port On Compute Node
318         ...    ${NET_3_PORTS}[${index+2}]
319         ...    ${NET_3_VMS}[${index+2}]
320         ...    ${OS_CMP2_HOSTNAME}
321         ...    sg=${SECURITY_GROUP}
322     END
323     @{NET_1_VM_IPS}    ${NET1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
324     @{NET_2_VM_IPS}    ${NET2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
325     @{NET_3_VM_IPS}    ${NET3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
326     BuiltIn.Set Suite Variable    @{NET_1_VM_IPS}
327     BuiltIn.Set Suite Variable    @{NET_2_VM_IPS}
328     BuiltIn.Set Suite Variable    @{NET_3_VM_IPS}
329     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
330     BuiltIn.Should Not Contain    ${NET_2_VM_IPS}    None
331     BuiltIn.Should Not Contain    ${NET_3_VM_IPS}    None
332     OpenStackOperations.Show Debugs    @{NET_1_VMS}    @{NET_2_VMS}    @{NET_3_VMS}
333
334 Create Sub Interfaces And Verify
335     [Documentation]    Create Sub Interface and verify for all VMs
336     BuiltIn.Wait Until Keyword Succeeds
337     ...    30s
338     ...    5s
339     ...    OpenStackOperations.Configure_IP_On_Sub_Interface
340     ...    ${NETWORKS}[0]
341     ...    ${EXTRA_NW_SUBNET}[0]
342     ...    ${NET_1_VM_IPS}[0]
343     ...    ${MASK}
344     ...    ${INTERFACE_STATE}[0]
345     BuiltIn.Wait Until Keyword Succeeds
346     ...    30s
347     ...    5s
348     ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
349     ...    ${NETWORKS}[0]
350     ...    ${EXTRA_NW_SUBNET}[0]
351     ...    ${NET_1_VM_IPS}[0]
352     BuiltIn.Wait Until Keyword Succeeds
353     ...    30s
354     ...    5s
355     ...    OpenStackOperations.Configure_IP_On_Sub_Interface
356     ...    ${NETWORKS}[1]
357     ...    ${EXTRA_NW_SUBNET}[1]
358     ...    ${NET_2_VM_IPS}[0]
359     ...    ${MASK}
360     ...    ${INTERFACE_STATE}[0]
361     BuiltIn.Wait Until Keyword Succeeds
362     ...    30s
363     ...    5s
364     ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
365     ...    ${NETWORKS}[1]
366     ...    ${EXTRA_NW_SUBNET}[1]
367     ...    ${NET_2_VM_IPS}[0]
368     BuiltIn.Wait Until Keyword Succeeds
369     ...    30s
370     ...    5s
371     ...    OpenStackOperations.Configure_IP_On_Sub_Interface
372     ...    ${NETWORKS}[2]
373     ...    ${EXTRA_NW_SUBNET}[2]
374     ...    ${NET_3_VM_IPS}[0]
375     ...    ${MASK}
376     ...    ${INTERFACE_STATE}[0]
377     BuiltIn.Wait Until Keyword Succeeds
378     ...    30s
379     ...    5s
380     ...    OpenStackOperations.Verify_IP_Configured_On_Sub_Interface
381     ...    ${NETWORKS}[2]
382     ...    ${EXTRA_NW_SUBNET}[2]
383     ...    ${NET_3_VM_IPS}[0]
384
385 Create L3VPN
386     [Documentation]    Create L3VPN and verify the same
387     ${net_id} =    OpenStackOperations.Get Net Id    ${NETWORKS}[0]
388     ${tenant_id} =    OpenStackOperations.Get Tenant ID From Network    ${net_id}
389     VpnOperations.VPN Create L3VPN
390     ...    vpnid=${VPN_INSTANCE_ID}
391     ...    name=${VPN_NAME}
392     ...    rd=["${L3VPN_RD}"]
393     ...    exportrt=["${L3VPN_RD}"]
394     ...    importrt=["${L3VPN_RD}"]
395     ...    tenantid=${tenant_id}
396     VpnOperations.Verify L3VPN On ODL    ${VPN_INSTANCE_ID}
397
398 Create BGP Config On ODL
399     [Documentation]    Configure BGP Config on ODL
400     KarafKeywords.Issue Command On Karaf Console    ${BGP_CONFIG_SERVER_CMD}
401     BgpOperations.Create BGP Configuration On ODL    localas=${AS_ID}    routerid=${ODL_SYSTEM_IP}
402     BgpOperations.AddNeighbor To BGP Configuration On ODL    remoteas=${AS_ID}    neighborAddr=${DCGW_SYSTEM_IP}
403     ${output} =    BgpOperations.Get BGP Configuration On ODL    session
404     BuiltIn.Should Contain    ${output}    ${DCGW_SYSTEM_IP}
405
406 Create BGP Config On DCGW
407     [Documentation]    Configure BGP on DCGW
408     BgpOperations.Configure BGP And Add Neighbor On DCGW
409     ...    ${DCGW_SYSTEM_IP}
410     ...    ${AS_ID}
411     ...    ${DCGW_SYSTEM_IP}
412     ...    ${ODL_SYSTEM_IP}
413     ...    ${VPN_NAME}
414     ...    ${L3VPN_RD}
415     ...    ${LOOPBACK_IP}
416     ${output} =    BgpOperations.Execute Show Command On Quagga    ${DCGW_SYSTEM_IP}    ${RUN_CONFIG}
417     BuiltIn.Should Contain    ${output}    ${ODL_SYSTEM_IP}
418     ${output} =    BuiltIn.Wait Until Keyword Succeeds
419     ...    180s
420     ...    10s
421     ...    BgpOperations.Verify BGP Neighbor Status On Quagga
422     ...    ${DCGW_SYSTEM_IP}
423     ...    ${ODL_SYSTEM_IP}
424
425 Verify Ping between Inter Intra And Enterprise host
426     [Documentation]    Ping Enterprise Host for Intra, Inter from different and same network
427     ${dst_ip_list} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{EXTRA_NW_SUBNET}
428     OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[0]    ${dst_ip_list}
429     OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[0]    ${dst_ip_list}
430     OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[0]    ${NET_1_VM_IPS}[2]    ${dst_ip_list}
431     OpenStackOperations.Test Operations From Vm Instance    ${NETWORKS}[1]    ${NET_2_VM_IPS}[2]    ${dst_ip_list}