2 Documentation Test suite to verify packet flows between vm instances.
5 Library OperatingSystem
6 Library RequestsLibrary
8 Resource ../../../libraries/Utils.robot
9 Resource ../../../libraries/OpenStackOperations.robot
10 Resource ../../../libraries/DevstackUtils.robot
11 Resource ../../../libraries/OVSDB.robot
12 Resource ../../../libraries/ClusterOvsdb.robot
13 Resource ../../../libraries/ClusterManagement.robot
14 Resource ../../../libraries/SetupUtils.robot
15 Resource ../../../variables/Variables.robot
17 Suite Setup OpenStackOperations.OpenStack Suite Setup
18 Suite Teardown OpenStackOperations.OpenStack Suite Teardown
19 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
20 Test Teardown OpenStackOperations.Get Test Teardown Debugs
24 ${SECURITY_GROUP} cl2_sg
25 @{NETWORKS} cl2_net_1 cl2_net_2
26 @{SUBNETS} cl2_sub_1 cl2_sub_2
27 @{NET_1_VMS} cl2_net_1_vm_1 cl2_net_1_vm_2 cl2_net_1_vm_3
28 @{NET_2_VMS} cl2_net_2_vm_1 cl2_net_2_vm_2 cl2_net_2_vm_3
29 @{SUBNET_CIDRS} 26.0.0.0/24 27.0.0.0/24
30 @{CLUSTER_DOWN_LIST} ${1} ${2}
34 Create All Controller Sessions
35 [Documentation] Create sessions for all three controllers.
36 ClusterManagement.ClusterManagement Setup
39 [Documentation] Create Network with neutron request.
40 OpenStackOperations.Create Network ${NETWORKS}[0]
42 Create Subnet For net_1
43 [Documentation] Create Sub Net for the Network with neutron request.
44 OpenStackOperations.Create SubNet ${NETWORKS}[0] ${SUBNETS}[0] ${SUBNET_CIDRS}[0]
47 [Documentation] Create Network with neutron request.
48 OpenStackOperations.Create Network ${NETWORKS}[1]
50 Create Subnet For net_2
51 [Documentation] Create Sub Net for the Network with neutron request.
52 OpenStackOperations.Create SubNet ${NETWORKS}[1] ${SUBNETS}[1] ${SUBNET_CIDRS}[1]
54 Add Ssh Allow All Rule
55 [Documentation] Allow all TCP/UDP/ICMP packets for this suite
56 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
58 Create Bridge Manually and Verify Before Fail
59 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
60 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP}
62 Add Tap Device Manually and Verify Before Fail
63 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
64 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP}
66 Delete the Bridge Manually and Verify Before Fail
67 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
68 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP}
71 [Documentation] Stop the karaf in First Controller
72 ${new_cluster_list} = ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none
73 BuiltIn.Set Suite Variable ${new_cluster_list}
75 Create Bridge Manually and Verify After Fail
76 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
77 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list}
79 Add Tap Device Manually and Verify After Fail
80 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
81 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} ${new_cluster_list}
83 Delete the Bridge Manually and Verify After Fail
84 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
85 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list}
88 [Documentation] Bring up ODL1 again
89 ClusterManagement.Start Single Member 1 msg=up: ODL2, ODL3, down: ODL1
91 Create Bridge Manually and Verify After Recover
92 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
93 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP}
95 Add Tap Device Manually and Verify After Recover
96 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
97 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP}
99 Delete the Bridge Manually and Verify After Recover
100 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
101 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP}
104 [Documentation] Stop the karaf in Second Controller
105 ClusterManagement.Stop Single Member 2 msg=up: ODL1, ODL2, ODL3, down=none
107 Create Vm Instances For net_1
108 [Documentation] Create Vm instances using flavor and image names for a network.
109 OpenStackOperations.Create Vm Instance On Compute Node
112 ... ${OS_CMP1_HOSTNAME}
113 ... sg=${SECURITY_GROUP}
114 OpenStackOperations.Create Vm Instance On Compute Node
117 ... ${OS_CMP1_HOSTNAME}
118 ... sg=${SECURITY_GROUP}
119 OpenStackOperations.Create Vm Instance On Compute Node
122 ... ${OS_CMP2_HOSTNAME}
123 ... sg=${SECURITY_GROUP}
125 Create Vm Instances For net_2
126 [Documentation] Create Vm instances using flavor and image names for a network.
127 OpenStackOperations.Create Vm Instance On Compute Node
130 ... ${OS_CMP1_HOSTNAME}
131 ... sg=${SECURITY_GROUP}
132 OpenStackOperations.Create Vm Instance On Compute Node
135 ... ${OS_CMP2_HOSTNAME}
136 ... sg=${SECURITY_GROUP}
137 OpenStackOperations.Create Vm Instance On Compute Node
140 ... ${OS_CMP2_HOSTNAME}
141 ... sg=${SECURITY_GROUP}
143 Check Vm Instances Have Ip Address
144 @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
145 @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
146 BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
147 BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
148 BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
149 BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
150 BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
151 BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
152 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
153 ... AND OpenStackOperations.Get Test Teardown Debugs
156 [Documentation] Bring up ODL2 again
157 ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2
159 Ping Vm Instance1 In net_1
160 [Documentation] Check reachability of vm instances by pinging to them.
161 OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[0]
163 Ping Vm Instance2 In net_1
164 [Documentation] Check reachability of vm instances by pinging to them.
165 OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[1]
167 Ping Vm Instance3 In net_1
168 [Documentation] Check reachability of vm instances by pinging to them.
169 OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[0] ${NET_1_VM_IPS}[2]
171 Ping Vm Instance1 In net_2
172 [Documentation] Check reachability of vm instances by pinging to them.
173 OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[0]
175 Ping Vm Instance2 In net_2
176 [Documentation] Check reachability of vm instances by pinging to them.
177 OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[1]
179 Ping Vm Instance3 In net_2
180 [Documentation] Check reachability of vm instances by pinging to them.
181 OpenStackOperations.Ping Vm From DHCP Namespace ${NETWORKS}[1] ${NET_2_VM_IPS}[2]
184 [Documentation] Stop the karaf in Third Controller
185 ClusterManagement.Stop Single Member 3 msg=up: ODL1, ODL2, ODL3, down=none
187 Connectivity Tests From Vm Instance1 In net_1
188 [Documentation] Logging to the vm instance using generated key pair.
189 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
191 Connectivity Tests From Vm Instance2 In net_1
192 [Documentation] Logging to the vm instance using generated key pair.
193 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[1] ${NET_1_VM_IPS}
195 Connectivity Tests From Vm Instance3 In net_1
196 [Documentation] Logging to the vm instance using generated key pair.
197 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[0] ${NET_1_VM_IPS}[2] ${NET_1_VM_IPS}
200 [Documentation] Bring up ODL3 again
201 ClusterManagement.Start Single Member 3 msg=up: ODL1, ODL2, down: ODL3
203 Connectivity Tests From Vm Instance1 In net_2 In Healthy Cluster
204 [Documentation] Logging to the vm instance using generated key pair.
205 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
207 Connectivity Tests From Vm Instance2 In net_2 In Healthy Cluster
208 [Documentation] Logging to the vm instance using generated key pair.
209 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
211 Connectivity Tests From Vm Instance3 In net_2 In Healthy Cluster
212 [Documentation] Logging to the vm instance using generated key pair.
213 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
215 Take Down ODL1 and ODL2
216 [Documentation] Stop the karaf in First and Second Controller
217 BuiltIn.Run Keyword And Ignore Error
218 ... ClusterManagement.Stop Single Member
220 ... msg=up: ODL1, ODL2, ODL3, down=none
221 BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop Single Member 2 msg=up: ODL2, ODL3, down=ODL1
223 Connectivity Tests From Vm Instance1 In net_2 With Two ODLs Down
224 [Documentation] Logging to the vm instance using generated key pair.
225 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
227 Connectivity Tests From Vm Instance2 In net_2 With Two ODLs Down
228 [Documentation] Logging to the vm instance using generated key pair.
229 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
231 Connectivity Tests From Vm Instance3 In net_2 With Two ODLs Down
232 [Documentation] Logging to the vm instance using generated key pair.
233 OpenStackOperations.Test Operations From Vm Instance ${NETWORKS}[1] ${NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
235 Bring Up ODL1 and ODL2
236 [Documentation] Bring up ODL1 and ODL2 again. Do not check for cluster sync until all nodes are
237 ... up. akka will not let nodes join until they are all back up if two were down.
238 ClusterManagement.Start Single Member 1 msg=up: ODL3, down: ODL1, ODL2 wait_for_sync=False
239 ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2
242 [Documentation] Delete Vm instances using instance names. Also remove the VM from the
243 ... list so that later cleanup will not try to delete it.
244 OpenStackOperations.Delete Vm Instance ${NET_1_VMS}[0]
245 Remove From List ${NET_1_VMS} 0
247 No Ping For Deleted Vm
248 [Documentation] Check non reachability of deleted vm instances by pinging to them.
249 ${output} = OpenStackOperations.Ping From DHCP Should Not Succeed ${NETWORKS}[0] ${NET_1_VM_IPS}[0]
251 Delete Vm Instances In net_1
252 [Documentation] Delete Vm instances using instance names in network_1.
253 FOR ${vm} IN @{NET_1_VMS}
254 OpenStackOperations.Delete Vm Instance ${vm}
257 Delete Vm Instances In net_2
258 [Documentation] Delete Vm instances using instance names in network_2.
259 FOR ${vm} IN @{NET_2_VMS}
260 OpenStackOperations.Delete Vm Instance ${vm}
263 Delete Sub Networks In net_1
264 [Documentation] Delete Sub Nets for the Networks with neutron request.
265 OpenStackOperations.Delete SubNet ${SUBNETS}[0]
267 Delete Sub Networks In net_2
268 [Documentation] Delete Sub Nets for the Networks with neutron request.
269 OpenStackOperations.Delete SubNet ${SUBNETS}[1]
272 [Documentation] Delete Networks with neutron request.
273 FOR ${network} IN @{NETWORKS}
274 OpenStackOperations.Delete Network ${network}
277 Delete Security Group
278 [Documentation] Delete security groups with neutron request
279 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
282 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
283 DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes