2 Documentation Test suite to check connectivity in L3 using routers.
3 Suite Setup Devstack Suite Setup source_pwd=yes
4 Suite Teardown Close All Connections
5 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
6 Test Teardown OpenStackOperations.Get Test Teardown Debugs
8 Library OperatingSystem
9 Library RequestsLibrary
11 Resource ../../../libraries/Utils.robot
12 Resource ../../../libraries/OpenStackOperations.robot
13 Resource ../../../libraries/DevstackUtils.robot
14 Resource ../../../libraries/OVSDB.robot
15 Resource ../../../libraries/ClusterOvsdb.robot
16 Resource ../../../libraries/ClusterManagement.robot
17 Resource ../../../libraries/SetupUtils.robot
18 Variables ../../../variables/Variables.py
21 ${SECURITY_GROUP} cl3_sg
22 @{NETWORKS} cl3_net_1 cl3_net_2
23 @{SUBNETS} cl3_sub_1 cl3_sub_2
24 @{ROUTERS} cl3_router_1 cl3_router_2 cl3_router_3
25 @{NET_1_VMS} cl3_net_1_vm_1 cl3_net_1_vm_2 cl3_net_1_vm_3
26 @{NET_2_VMS} cl3_net_2_vm_1 cl3_net_2_vm_2 cl3_net_2_vm_3
27 @{SUBNET_CIDRS} 36.0.0.0/24 37.0.0.0/24
28 @{GATEWAY_IPS} 36.0.0.1 37.0.0.1
29 @{ODL_1_AND_2_DOWN} ${1} ${2}
30 @{ODL_2_AND_3_DOWN} ${2} ${3}
33 Create All Controller Sessions
34 [Documentation] Create sessions for all three contorllers.
35 ClusterManagement.ClusterManagement Setup
38 [Documentation] Create Network with neutron request.
39 : FOR ${NetworkElement} IN @{NETWORKS}
40 \ OpenStackOperations.Create Network ${NetworkElement}
42 Create Subnets For net_1
43 [Documentation] Create Sub Nets for the Networks with neutron request.
44 OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
46 Create Subnets For net_2
47 [Documentation] Create Sub Nets for the Networks with neutron request.
48 OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1]
50 Add Ssh Allow All Rule
51 [Documentation] Allow all TCP/UDP/ICMP packets for this suite
52 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
55 [Documentation] Kill the karaf in First Controller
56 ClusterManagement.Kill Single Member 1
58 Create Vm Instances For net_1
59 [Documentation] Create Vm instances using flavor and image names for a network.
60 OpenStackOperations.Create Vm Instances @{NETWORKS}[0] ${NET_1_VMS} sg=${SECURITY_GROUP}
63 [Documentation] Bring up ODL1 again
64 ClusterManagement.Start Single Member 1
67 [Documentation] Kill the karaf in Second Controller
68 ClusterManagement.Kill Single Member 2
70 Create Vm Instances For net_2
71 [Documentation] Create Vm instances using flavor and image names for a network.
72 OpenStackOperations.Create Vm Instances @{NETWORKS}[1] ${NET_2_VMS} sg=${SECURITY_GROUP}
74 Check Vm Instances Have Ip Address
75 @{NET_1_L3_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
76 @{NET_2_L3_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
77 BuiltIn.Set Suite Variable @{NET_1_L3_VM_IPS}
78 BuiltIn.Set Suite Variable @{NET_2_L3_VM_IPS}
79 BuiltIn.Should Not Contain ${NET_1_L3_VM_IPS} None
80 BuiltIn.Should Not Contain ${NET_2_L3_VM_IPS} None
81 BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
82 BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
83 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
84 ... AND OpenStackOperations.Get Test Teardown Debugs
87 [Documentation] Bring up ODL2 again
88 ClusterManagement.Start Single Member 2
91 [Documentation] Kill the karaf in Third Controller
92 ClusterManagement.Kill Single Member 3
94 Create Router router_2
95 [Documentation] Create Router and Add Interface to the subnets.
96 OpenStackOperations.Create Router @{ROUTERS}[1]
97 [Teardown] Report_Failure_Due_To_Bug 6117
99 Create Router router_3
100 [Documentation] Create Router and Add Interface to the subnets.
101 OpenStackOperations.Create Router @{ROUTERS}[2]
103 Add Interfaces To Router
104 [Documentation] Add Interfaces
105 : FOR ${interface} IN @{SUBNETS}
106 \ OpenStackOperations.Add Router Interface @{ROUTERS}[2] ${interface}
108 Verify Created Routers
109 [Documentation] Check created routers using northbound rest calls
110 ${data} Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API}
112 Should Contain ${data} @{ROUTERS}[2]
115 [Documentation] Bring up ODL3 again
116 ClusterManagement.Start Single Member 3
118 Ping Vm Instance1 In net_2 From net_1
119 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
120 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_2_L3_VM_IPS}[0]
122 Ping Vm Instance2 In net_2 From net_1
123 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
124 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_2_L3_VM_IPS}[1]
126 Ping Vm Instance3 In net_2 From net_1
127 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
128 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_2_L3_VM_IPS}[2]
130 Ping Vm Instance1 In net_1 From net_2
131 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
132 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_1_L3_VM_IPS}[0]
134 Ping Vm Instance2 In net_1 From net_2
135 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
136 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_1_L3_VM_IPS}[1]
138 Ping Vm Instance3 In net_1 From net_2
139 [Documentation] Check reachability of vm instances by pinging to them after creating routers.
140 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_1_L3_VM_IPS}[2]
142 Take Down ODL1 and ODL2
143 [Documentation] Kill the karaf in First and Second Controller
144 ClusterManagement.Kill Members From List Or All ${ODL_1_AND_2_DOWN}
145 [Teardown] OpenStackOperations.Get OvsDebugInfo
147 Connectivity Tests From Vm Instance1 In net_1
148 [Documentation] ssh to the VM instance and test operations.
149 ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS}
150 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_L3_VM_IPS}[0] ${dst_list}
151 [Teardown] OpenStackOperations.Get OvsDebugInfo
153 Connectivity Tests From Vm Instance2 In net_1
154 [Documentation] ssh to the VM instance and test operations.
155 ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS}
156 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_L3_VM_IPS}[1] ${dst_list}
157 [Teardown] OpenStackOperations.Get OvsDebugInfo
159 Connectivity Tests From Vm Instance3 In net_1
160 [Documentation] ssh to the VM instance and test operations.
161 ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS}
162 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_L3_VM_IPS}[2] ${dst_list}
163 [Teardown] OpenStackOperations.Get OvsDebugInfo
165 Bring Up ODL1 and ODL2
166 [Documentation] Bring up ODL1 and ODL2 again
167 ClusterManagement.Start Members From List Or All ${ODL_1_AND_2_DOWN}
169 Take Down ODL2 and ODL3
170 [Documentation] Kill the karaf in First and Second Controller
171 ClusterManagement.Kill Members From List Or All ${ODL_2_AND_3_DOWN}
172 [Teardown] OpenStackOperations.Get OvsDebugInfo
174 Connectivity Tests From Vm Instance1 In net_2
175 [Documentation] ssh to the VM instance and test operations.
176 ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS}
177 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_L3_VM_IPS}[0] ${dst_list}
178 [Teardown] OpenStackOperations.Get OvsDebugInfo
180 Connectivity Tests From Vm Instance2 In net_2
181 [Documentation] ssh to the VM instance and test operations.
182 ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS}
183 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_L3_VM_IPS}[1] ${dst_list}
184 [Teardown] OpenStackOperations.Get OvsDebugInfo
186 Connectivity Tests From Vm Instance3 In net_2
187 [Documentation] ssh to the VM instance and test operations.
188 ${dst_list} = BuiltIn.Create List @{NET_2_L3_VM_IPS} @{NET_1_L3_VM_IPS}
189 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_L3_VM_IPS}[2] ${dst_list}
190 [Teardown] OpenStackOperations.Get OvsDebugInfo
192 Bring Up ODL2 and ODL3
193 [Documentation] Bring up ODL2 and ODL3 again.
194 ClusterManagement.Start Members From List Or All ${ODL_2_AND_3_DOWN}
196 Delete Vm Instances In net_1
197 [Documentation] Delete Vm instances using instance names in net_1.
198 : FOR ${vm} IN @{NET_1_VMS}
199 \ OpenStackOperations.Delete Vm Instance ${vm}
201 Delete Vm Instances In net_2
202 [Documentation] Delete Vm instances using instance names in net_2.
203 : FOR ${vm} IN @{NET_2_VMS}
204 \ OpenStackOperations.Delete Vm Instance ${vm}
206 Delete Router Interfaces
207 [Documentation] Remove Interface to the subnets.
208 : FOR ${interface} IN @{SUBNETS}
209 \ OpenStackOperations.Remove Interface @{ROUTERS}[2] ${interface}
212 [Documentation] Delete Router and Interface to the subnets.
213 OpenStackOperations.Delete Router @{ROUTERS}[1]
214 OpenStackOperations.Delete Router @{ROUTERS}[2]
216 Verify Deleted Routers
217 [Documentation] Check deleted routers using northbound rest calls
218 ${data} = Utils.Get Data From URI 1 ${NEUTRON_ROUTERS_API}
220 BuiltIn.Should Not Contain ${data} @{ROUTERS}[2]
222 Delete Sub Network In net_1
223 [Documentation] Delete Sub Nets for the Networks with neutron request.
224 OpenStackOperations.Delete SubNet @{SUBNETS}[0]
226 Delete Sub Network In net_2
227 [Documentation] Delete Sub Nets for the Networks with neutron request.
228 OpenStackOperations.Delete SubNet @{SUBNETS}[1]
231 [Documentation] Delete Networks with neutron request.
232 : FOR ${network} IN @{NETWORKS}
233 \ OpenStackOperations.Delete Network ${network}
235 Delete Security Group
236 [Documentation] Delete security groups with neutron request
237 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
240 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
241 DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes