Fix BGPCEP userfeatures
[integration/test.git] / csit / suites / netvirt / multibgpvpn / multi_vpn_bgp.robot
1 *** Settings ***
2 Documentation     Test suite to validate multiple 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       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/BgpOperations.robot
12 Resource          ../../../libraries/DevstackUtils.robot
13 Resource          ../../../libraries/OpenStackOperations.robot
14 Resource          ../../../libraries/OVSDB.robot
15 Resource          ../../../libraries/SetupUtils.robot
16 Resource          ../../../libraries/Tcpdump.robot
17 Resource          ../../../libraries/Utils.robot
18 Resource          ../../../libraries/VpnOperations.robot
19 Resource          ../../../variables/Variables.robot
20 Resource          ../../../variables/netvirt/Variables.robot
21
22 *** Variables ***
23 ${NUM_OF_PORTS_PER_HOST}    3
24 ${NUM_OF_VMS_PER_HOST}    3
25 ${NUM_OF_L3VPN}    3
26 ${AS_ID}          100
27 ${DCGW_SYSTEM_IP}    ${TOOLS_SYSTEM_1_IP}
28 ${NET}            mvpn_net_new
29 ${ROUTER}         mvpn_router
30 ${LOOPBACK_IP}    5.5.5.2/32
31 ${CREATE_RT}      ["2200:2","2300:2","2400:2"]
32 ${RT_LIST_1}      ["2200:2","2300:2"]
33 ${RT_LIST_2}      ["2200:2","2400:2"]
34 @{SECURITY_GROUP}    mvpn_sg    mvpn_custom_sg
35 @{REQ_PREFIXLENGTHS}    40.1.0.0/28    41.1.0.0/16
36 @{REQ_SUBNETS_PREFIX}    mvpn_subnet10    mvpn_subnet11
37 @{NETWORKS}       mvpn_net_1    mvpn_net_2    mvpn_net_3
38 @{SUBNETS}        mvpn_sub_1    mvpn_sub_2    mvpn_sub_3
39 @{SUBNET_CIDRS}    11.1.1.0/24    22.1.1.0/24    33.1.1.0/24
40 @{PORTS_HOST1}    mvpn_net_1_port_1    mvpn_net_2_port_1    mvpn_net_3_port_1    mvpn_net_1_port1_csg    mvpn_net_2_port1_csg
41 @{PORTS_HOST2}    mvpn_net_1_port_2    mvpn_net_2_port_2    mvpn_net_3_port_2    mvpn_net_2_port2_csg
42 @{VMS_HOST1}      mvpn_net_1_vm_1    mvpn_net_2_vm_1    mvpn_net_3_vm_1    mvpn_net_1_vm1_csg    mvpn_net_2_vm1_csg
43 @{VMS_HOST2}      mvpn_net_1_vm_2    mvpn_net_2_vm_2    mvpn_net_3_vm_2    mvpn_net_2_vm2_csg
44 @{NET_1_VMS}      mvpn_net_1_vm_1    mvpn_net_1_vm_2    mvpn_net_1_vm1_csg
45 @{NET_2_VMS}      mvpn_net_2_vm_1    mvpn_net_2_vm_2    mvpn_net_2_vm1_csg    mvpn_net_2_vm2_csg
46 @{NET_3_VMS}      mvpn_net_3_vm_1    mvpn_net_3_vm_2
47 @{VPN_INSTANCE_IDS}    4ae8cd92-48ca-49b5-94e1-b2921a261441    4ae8cd92-48ca-49b5-94e1-b2921a261442    4ae8cd92-48ca-49b5-94e1-b2921a261443
48 @{VPN_NAMES}      mvpn_1    mvpn_2    mvpn_3
49 @{RDS}            ["2200:2"]    ["2300:2"]    ["2400:2"]
50 @{DCGW_RD}        2200:2    2300:2    2400:2
51 @{LOOPBACK_IPS}    5.5.5.2    2.2.2.2    3.3.3.3
52 @{LOOPBACK_NAMES}    int1    int2    int3
53
54 *** Test Cases ***
55 Check Datapath Traffic Across Networks With L3VPN
56     [Documentation]    Datapath Test Across the networks with VPN.
57     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[0]    ping -c 20 @{NET_1_VM_IPS}[1]
58     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
59     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[0]    ping -c 20 @{NET_2_VM_IPS}[1]
60     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
61     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[0]    ping -c 20 @{NET_2_VM_IPS}[0]
62     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
63     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[2]    ping -c 20 @{NET_2_VM_IPS}[2]
64     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
65     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[2]    ping -c 20 @{NET_2_VM_IPS}[3]
66     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
67
68 Verify Route Update In Bgp For Routes With Default Route And Various Prefix Lengths
69     [Documentation]    Create network with different prefix lengths and check the route update in bgp.
70     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${SUBNET_CIDRS}
71     OpenStackOperations.Create Network    ${NET}
72     ${length} =    BuiltIn.Get Length    ${REQ_SUBNETS_PREFIX}
73     : FOR    ${idx}    IN RANGE    ${length}
74     \    OpenStackOperations.Create SubNet    ${NET}    @{REQ_SUBNETS_PREFIX}[${idx}]    @{REQ_PREFIXLENGTHS}[${idx}]
75     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${REQ_SUBNETS_PREFIX}
76     ${net_id} =    OpenStackOperations.Get Net Id    ${NET}
77     VpnOperations.Associate L3VPN To Network    networkid=${net_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
78     VpnOperations.Verify L3VPN On ODL    @{VPN_INSTANCE_IDS}[0]
79     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${REQ_PREFIXLENGTHS}
80     [Teardown]    BuiltIn.Run Keywords    VpnOperations.Dissociate L3VPN From Networks    networkid=${net_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
81     ...    AND    OpenStackOperations.Delete Network    ${NET}
82     ...    AND    Post Test Cleanup    @{VPN_INSTANCE_IDS}[0]
83
84 Verification Of Route Download With Three Vpns In SE And Qbgp With One-One Export Import Route Target
85     [Documentation]    Check the datapath traffic with one-one export import route target with three vpns.
86     Create Multiple L3VPN    @{NETWORKS}[0]    ${3}
87     : FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
88     \    BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    @{VPN_NAMES}[${index}]
89     \    ...    @{DCGW_RD}[${index}]    @{LOOPBACK_IPS}[${index}]
90     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${NETWORKS}
91     ${fib_values} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{NET_3_VM_IPS}    @{SUBNET_CIDRS}    @{LOOPBACK_IPS}
92     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
93     ${fib1_values} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{SUBNET_CIDRS}[0]    @{LOOPBACK_IPS}[0]
94     BuiltIn.Wait Until Keyword Succeeds    60s    15s    BgpOperations.Verify Routes On Quagga    ${DCGW_SYSTEM_IP}    @{DCGW_RD}[0]    ${fib1_values}
95     ${fib2_values} =    BuiltIn.Create List    @{NET_2_VM_IPS}    @{SUBNET_CIDRS}[1]    @{LOOPBACK_IPS}[1]
96     BuiltIn.Wait Until Keyword Succeeds    60s    15s    BgpOperations.Verify Routes On Quagga    ${DCGW_SYSTEM_IP}    @{DCGW_RD}[1]    ${fib2_values}
97     ${fib3_values} =    BuiltIn.Create List    @{NET_3_VM_IPS}    @{SUBNET_CIDRS}[2]    @{LOOPBACK_IPS}[2]
98     BuiltIn.Wait Until Keyword Succeeds    60s    15s    BgpOperations.Verify Routes On Quagga    ${DCGW_SYSTEM_IP}    @{DCGW_RD}[2]    ${fib3_values}
99     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
100     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
101     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[0]    ping -c 3 @{NET_1_VM_IPS}[1]
102     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
103     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[1]    @{NET_2_VM_IPS}[0]    ping -c 3 @{NET_2_VM_IPS}[1]
104     BuiltIn.Should Contain    ${output}    ${PING_REGEXP}
105     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[0]    ping -c 3 @{NET_2_VM_IPS}[0]
106     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
107     ${output} =    OpenStackOperations.Execute Command on VM Instance    @{NETWORKS}[0]    @{NET_1_VM_IPS}[0]    ping -c 3 @{NET_2_VM_IPS}[1]
108     BuiltIn.Should Contain    ${output}    ${NO_PING_REGEXP}
109     [Teardown]    Post Test Cleanup    @{VPN_INSTANCE_IDS}
110
111 Verification Of Route Download With Three Vpns In SE And Qbgp With One-Many Export Import Route Target
112     [Documentation]    Check the datapath traffic with one-many export import route target with three vpns.
113     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]    name=@{VPN_NAMES}[0]    rd=@{RDS}[0]    exportrt=${CREATE_RT}    importrt=@{RDS}[0]
114     : FOR    ${index}    IN RANGE    1    ${NUM_OF_L3VPN}
115     \    VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[${index}]    name=@{VPN_NAMES}[${index}]    rd=@{RDS}[${index}]    exportrt=@{RDS}[${index}]    importrt=${RT_LIST_${index}}
116     : FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
117     \    BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    @{VPN_NAMES}[${index}]
118     \    ...    @{DCGW_RD}[${index}]    @{LOOPBACK_IPS}[${index}]
119     ${networks} =    BuiltIn.Create List    @{NETWORKS}[0]    @{NETWORKS}[1]
120     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${networks}
121     ${fib_values} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{SUBNET_CIDRS}[0]    @{SUBNET_CIDRS}[1]
122     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
123     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
124     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
125     [Teardown]    Post Test Cleanup    @{VPN_INSTANCE_IDS}
126
127 Verification Of Route Download With Three Vpns In SE And Qbgp With Many-One Export Import Route Target
128     [Documentation]    Check the datapath traffic with many-one export import route target with three vpns.
129     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]    name=@{VPN_NAMES}[0]    rd=@{RDS}[0]    exportrt=@{RDS}[0]    importrt=${CREATE_RT}
130     : FOR    ${index}    IN RANGE    1    ${NUM_OF_L3VPN}
131     \    VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[${index}]    name=@{VPN_NAMES}[${index}]    rd=@{RDS}[${index}]    exportrt=${RT_LIST_${index}}    importrt=@{RDS}[${index}]
132     : FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
133     \    BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    @{VPN_NAMES}[${index}]
134     \    ...    @{DCGW_RD}[${index}]    @{LOOPBACK_IPS}[${index}]
135     ${networks} =    BuiltIn.Create List    @{NETWORKS}[0]    @{NETWORKS}[1]
136     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${networks}
137     ${fib_values} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{SUBNET_CIDRS}[0]    @{SUBNET_CIDRS}[1]
138     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
139     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
140     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
141     [Teardown]    Post Test Cleanup    @{VPN_INSTANCE_IDS}
142
143 Verification Of Route Download With Three Vpns In SE And Qbgp With Many-Many Export Import Route Target
144     [Documentation]    Check the datapath traffic with many-many export import route target with three vpns.
145     : FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
146     \    VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[${index}]    name=@{VPN_NAMES}[${index}]    rd=@{RDS}[${index}]    exportrt=${CREATE_RT}    importrt=${CREATE_RT}
147     : FOR    ${index}    IN RANGE    0    ${NUM_OF_L3VPN}
148     \    BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    @{VPN_NAMES}[${index}]
149     \    ...    @{DCGW_RD}[${index}]    @{LOOPBACK_IPS}[${index}]
150     ${networks} =    BuiltIn.Create List    @{NETWORKS}[0]    @{NETWORKS}[1]
151     VpnOperations.Associate L3VPNs To Networks    ${VPN_INSTANCE_IDS}    ${networks}
152     ${fib_values} =    BuiltIn.Create List    @{NET_1_VM_IPS}    @{NET_2_VM_IPS}    @{SUBNET_CIDRS}[0]    @{SUBNET_CIDRS}[1]
153     BuiltIn.Wait Until Keyword Succeeds    30s    10s    Utils.Check For Elements At URI    ${FIB_ENTRY_URL}    ${fib_values}
154     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_1_VM_IPS}
155     VpnOperations.Verify Flows Are Present For L3VPN    ${OS_CMP1_IP}    ${NET_2_VM_IPS}
156
157 *** Keywords ***
158 Suite Setup
159     [Documentation]    Basic setup.
160     VpnOperations.Basic Suite Setup
161     BgpOperations.Start Quagga Processes On ODL    ${ODL_SYSTEM_IP}
162     BgpOperations.Start Quagga Processes On DCGW    ${DCGW_SYSTEM_IP}
163     Create Setup
164     OpenStackOperations.Show Debugs    @{NET_1_VMS}    @{NET_2_VMS}    @{NET_3_VMS}
165     OpenStackOperations.Get Suite Debugs
166
167 Create Setup
168     [Documentation]    Create basic topology
169     Create Neutron Networks
170     Create Neutron Subnets
171     OpenStackOperations.Create Allow All SecurityGroup    ${SECURITY_GROUP[0]}
172     Security Group Rule with Remote SG    ${SECURITY_GROUP[1]}
173     Create Neutron Ports
174     Create Nova VMs
175     VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[0]    name=@{VPN_NAMES}[0]    rd=@{RDS}[0]    exportrt=@{RDS}[0]    importrt=@{RDS}[0]
176     VpnOperations.Verify L3VPN On ODL    @{VPN_INSTANCE_IDS}[0]
177     : FOR    ${network}    IN    @{NETWORKS}
178     \    ${network_id} =    OpenStackOperations.Get Net Id    ${network}
179     \    VpnOperations.Associate L3VPN To Network    networkid=${network_id}    vpnid=@{VPN_INSTANCE_IDS}[0]
180     Create BGP Config On ODL
181     Create BGP Config On DCGW
182     Create External Tunnel Endpoint
183
184 Create Neutron Networks
185     [Documentation]    Create required number of networks
186     : FOR    ${NET}    IN    @{NETWORKS}
187     \    OpenStackOperations.Create Network    ${NET}
188     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
189
190 Create Neutron Subnets
191     [Documentation]    Create required number of subnets for previously created networks
192     ${num_of_networks} =    BuiltIn.Get Length    ${NETWORKS}
193     : FOR    ${index}    IN RANGE    0    ${num_of_networks}
194     \    OpenStackOperations.Create SubNet    @{NETWORKS}[${index}]    @{SUBNETS}[${index}]    @{SUBNET_CIDRS}[${index}]
195     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
196
197 Create Neutron Ports
198     [Documentation]    Create required number of ports under previously created subnets
199     : FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_HOST}
200     \    OpenStackOperations.Create Port    @{NETWORKS}[${index}]    @{PORTS_HOST1}[${index}]    sg=@{SECURITY_GROUP}[0]
201     : FOR    ${index}    IN RANGE    0    ${NUM_OF_PORTS_PER_HOST}
202     \    OpenStackOperations.Create Port    @{NETWORKS}[${index}]    @{PORTS_HOST2}[${index}]    sg=@{SECURITY_GROUP}[0]
203     OpenStackOperations.Create Port    @{NETWORKS}[0]    @{PORTS_HOST1}[3]    @{SECURITY_GROUP}[1]
204     OpenStackOperations.Create Port    @{NETWORKS}[1]    @{PORTS_HOST1}[4]    @{SECURITY_GROUP}[1]
205     OpenStackOperations.Create Port    @{NETWORKS}[1]    @{PORTS_HOST2}[3]    @{SECURITY_GROUP}[1]
206     ${PORTS} =    BuiltIn.Create List    @{PORTS_HOST1}    @{PORTS_HOST2}
207     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${CONFIG_API}/neutron:neutron/ports/    ${PORTS}
208
209 Create Nova VMs
210     [Documentation]    Create Vm instances on compute nodes
211     : FOR    ${index}    IN RANGE    0    ${NUM_OF_VMS_PER_HOST}
212     \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS_HOST1}[${index}]    @{VMS_HOST1}[${index}]    ${OS_CMP1_HOSTNAME}    sg=@{SECURITY_GROUP}[0]
213     : FOR    ${index}    IN RANGE    0    ${NUM_OF_VMS_PER_HOST}
214     \    OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS_HOST2}[${index}]    @{VMS_HOST2}[${index}]    ${OS_CMP2_HOSTNAME}    sg=@{SECURITY_GROUP}[0]
215     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS_HOST1}[3]    @{VMS_HOST1}[3]    ${OS_CMP1_HOSTNAME}    sg=@{SECURITY_GROUP}[1]
216     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS_HOST1}[4]    @{VMS_HOST1}[4]    ${OS_CMP1_HOSTNAME}    sg=@{SECURITY_GROUP}[1]
217     OpenStackOperations.Create Vm Instance With Port On Compute Node    @{PORTS_HOST2}[3]    @{VMS_HOST2}[3]    ${OS_CMP2_HOSTNAME}    sg=@{SECURITY_GROUP}[1]
218     @{NET_1_VM_IPS}    ${NET_1_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_1_VMS}
219     @{NET_2_VM_IPS}    ${NET_2_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_2_VMS}
220     @{NET_3_VM_IPS}    ${NET_3_DHCP_IP} =    OpenStackOperations.Get VM IPs    @{NET_3_VMS}
221     BuiltIn.Set Suite Variable    @{NET_1_VM_IPS}
222     BuiltIn.Set Suite Variable    @{NET_2_VM_IPS}
223     BuiltIn.Set Suite Variable    @{NET_3_VM_IPS}
224     BuiltIn.Should Not Contain    ${NET_1_VM_IPS}    None
225     BuiltIn.Should Not Contain    ${NET_2_VM_IPS}    None
226     BuiltIn.Should Not Contain    ${NET_3_VM_IPS}    None
227     BuiltIn.Should Not Contain    ${NET_1_DHCP_IP}    None
228     BuiltIn.Should Not Contain    ${NET_2_DHCP_IP}    None
229     BuiltIn.Should Not Contain    ${NET_3_DHCP_IP}    None
230
231 Create External Tunnel Endpoint
232     [Documentation]    Create and verify external tunnel endpoint between ODL and GWIP
233     BgpOperations.Create External Tunnel Endpoint Configuration    destIp=${DCGW_SYSTEM_IP}
234     ${output} =    BgpOperations.Get External Tunnel Endpoint Configuration    ${DCGW_SYSTEM_IP}
235     BuiltIn.Should Contain    ${output}    ${DCGW_SYSTEM_IP}
236
237 Create BGP Config On ODL
238     [Documentation]    Configure BGP Config on ODL
239     KarafKeywords.Issue Command On Karaf Console    ${BGP_CONFIG_SERVER_CMD}
240     BgpOperations.Create BGP Configuration On ODL    localas=${AS_ID}    routerid=${ODL_SYSTEM_IP}
241     BgpOperations.AddNeighbor To BGP Configuration On ODL    remoteas=${AS_ID}    neighborAddr=${DCGW_SYSTEM_IP}
242     ${output} =    BgpOperations.Get BGP Configuration On ODL    session
243     BuiltIn.Should Contain    ${output}    ${DCGW_SYSTEM_IP}
244
245 Create BGP Config On DCGW
246     [Documentation]    Configure BGP on DCGW
247     BgpOperations.Configure BGP And Add Neighbor On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}    @{VPN_NAMES}[0]    @{DCGW_RD}[0]
248     ...    @{LOOPBACK_IPS}[0]
249     ${output} =    BgpOperations.Execute Show Command On Quagga    ${DCGW_SYSTEM_IP}    ${RUN_CONFIG}
250     BuiltIn.Should Contain    ${output}    ${ODL_SYSTEM_IP}
251     ${output} =    BuiltIn.Wait Until Keyword Succeeds    180s    10s    BgpOperations.Verify BGP Neighbor Status On Quagga    ${DCGW_SYSTEM_IP}    ${ODL_SYSTEM_IP}
252
253 Create Multiple L3VPN
254     [Arguments]    ${network}    ${num_of_l3vpns}
255     [Documentation]    Creates multiple L3VPNs and then verify the same
256     : FOR    ${index}    IN RANGE    0    ${num_of_l3vpns}
257     \    BuiltIn.Wait Until Keyword Succeeds    40s    10s    VpnOperations.VPN Create L3VPN    vpnid=@{VPN_INSTANCE_IDS}[${index}]    name=@{VPN_NAMES}[${index}]
258     \    ...    rd=@{RDS}[${index}]    exportrt=@{RDS}[${index}]    importrt=@{RDS}[${index}]
259     \    VpnOperations.Verify L3VPN On ODL    @{VPN_INSTANCE_IDS}[${index}]
260
261 Security Group Rule with Remote SG
262     [Arguments]    ${sec_grp}
263     [Documentation]    Allow all TCP/UDP/ICMP packets for this suite
264     OpenStackOperations.Neutron Security Group Create    ${sec_grp}
265     OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=ingress    port_range_max=65535    port_range_min=1    protocol=tcp    remote-group-id=${sec_grp}
266     OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=egress    port_range_max=65535    port_range_min=1    protocol=tcp    remote-group-id=${sec_grp}
267     OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=ingress    protocol=icmp    remote-group-id=${sec_grp}
268     OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=egress    protocol=icmp    remote-group-id=${sec_grp}
269     OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=ingress    port_range_max=65535    port_range_min=1    protocol=udp    remote_group_id=${sec_grp}
270     OpenStackOperations.Neutron Security Group Rule Create    ${sec_grp}    direction=egress    port_range_max=65535    port_range_min=1    protocol=udp    remote-group-id=${sec_grp}
271
272 Post Test Cleanup
273     [Arguments]    @{vpn_ids}
274     [Documentation]    Test Case Cleanup.
275     VpnOperations.Delete Multiple L3VPNs    @{vpn_ids}
276     BgpOperations.Delete BGP Config On Quagga    ${DCGW_SYSTEM_IP}    ${AS_ID}