2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup OpenStackOperations.OpenStack Suite Setup
4 Suite Teardown OpenStackOperations.OpenStack Suite Teardown
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 Resource ../../../variables/Variables.robot
19 Resource ../../../variables/netvirt/Variables.robot
22 ${SECURITY_GROUP} cl2_sg
23 @{NETWORKS} cl2_net_1 cl2_net_2
24 @{SUBNETS} cl2_sub_1 cl2_sub_2
25 @{NET_1_VMS} cl2_net_1_vm_1 cl2_net_1_vm_2 cl2_net_1_vm_3
26 @{NET_2_VMS} cl2_net_2_vm_1 cl2_net_2_vm_2 cl2_net_2_vm_3
27 @{SUBNET_CIDRS} 26.0.0.0/24 27.0.0.0/24
28 @{CLUSTER_DOWN_LIST} ${1} ${2}
31 Create All Controller Sessions
32 [Documentation] Create sessions for all three controllers.
33 ClusterManagement.ClusterManagement Setup
36 [Documentation] Create Network with neutron request.
37 OpenStackOperations.Create Network @{NETWORKS}[0]
39 Create Subnet For net_1
40 [Documentation] Create Sub Net for the Network with neutron request.
41 OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
44 [Documentation] Create Network with neutron request.
45 OpenStackOperations.Create Network @{NETWORKS}[1]
47 Create Subnet For net_2
48 [Documentation] Create Sub Net for the Network with neutron request.
49 OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1]
51 Add Ssh Allow All Rule
52 [Documentation] Allow all TCP/UDP/ICMP packets for this suite
53 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
55 Create Bridge Manually and Verify Before Fail
56 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
57 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP}
59 Add Tap Device Manually and Verify Before Fail
60 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
61 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP}
63 Delete the Bridge Manually and Verify Before Fail
64 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
65 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP}
68 [Documentation] Stop the karaf in First Controller
69 ${new_cluster_list} = ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none
70 BuiltIn.Set Suite Variable ${new_cluster_list}
72 Create Bridge Manually and Verify After Fail
73 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
74 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list}
76 Add Tap Device Manually and Verify After Fail
77 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
78 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP} ${new_cluster_list}
80 Delete the Bridge Manually and Verify After Fail
81 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
82 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP} ${new_cluster_list}
85 [Documentation] Bring up ODL1 again
86 ClusterManagement.Start Single Member 1 msg=up: ODL2, ODL3, down: ODL1
88 Create Bridge Manually and Verify After Recover
89 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
90 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CNTL_IP}
92 Add Tap Device Manually and Verify After Recover
93 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
94 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CNTL_IP}
96 Delete the Bridge Manually and Verify After Recover
97 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
98 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CNTL_IP}
101 [Documentation] Stop the karaf in Second Controller
102 ClusterManagement.Stop Single Member 2 msg=up: ODL1, ODL2, ODL3, down=none
104 Create Vm Instances For net_1
105 [Documentation] Create Vm instances using flavor and image names for a network.
106 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
107 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[1] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
108 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
110 Create Vm Instances For net_2
111 [Documentation] Create Vm instances using flavor and image names for a network.
112 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
113 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
114 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
116 Check Vm Instances Have Ip Address
117 @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
118 @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
119 BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
120 BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
121 BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
122 BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
123 BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
124 BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
125 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
126 ... AND OpenStackOperations.Get Test Teardown Debugs
129 [Documentation] Bring up ODL2 again
130 ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2
132 Ping Vm Instance1 In net_1
133 [Documentation] Check reachability of vm instances by pinging to them.
134 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
136 Ping Vm Instance2 In net_1
137 [Documentation] Check reachability of vm instances by pinging to them.
138 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[1]
140 Ping Vm Instance3 In net_1
141 [Documentation] Check reachability of vm instances by pinging to them.
142 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[2]
144 Ping Vm Instance1 In net_2
145 [Documentation] Check reachability of vm instances by pinging to them.
146 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[0]
148 Ping Vm Instance2 In net_2
149 [Documentation] Check reachability of vm instances by pinging to them.
150 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[1]
152 Ping Vm Instance3 In net_2
153 [Documentation] Check reachability of vm instances by pinging to them.
154 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[2]
157 [Documentation] Stop the karaf in Third Controller
158 ClusterManagement.Stop Single Member 3 msg=up: ODL1, ODL2, ODL3, down=none
160 Connectivity Tests From Vm Instance1 In net_1
161 [Documentation] Logging to the vm instance using generated key pair.
162 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
164 Connectivity Tests From Vm Instance2 In net_1
165 [Documentation] Logging to the vm instance using generated key pair.
166 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${NET_1_VM_IPS}
168 Connectivity Tests From Vm Instance3 In net_1
169 [Documentation] Logging to the vm instance using generated key pair.
170 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[2] ${NET_1_VM_IPS}
173 [Documentation] Bring up ODL3 again
174 ClusterManagement.Start Single Member 3 msg=up: ODL1, ODL2, down: ODL3
176 Connectivity Tests From Vm Instance1 In net_2 In Healthy Cluster
177 [Documentation] Logging to the vm instance using generated key pair.
178 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
180 Connectivity Tests From Vm Instance2 In net_2 In Healthy Cluster
181 [Documentation] Logging to the vm instance using generated key pair.
182 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
184 Connectivity Tests From Vm Instance3 In net_2 In Healthy Cluster
185 [Documentation] Logging to the vm instance using generated key pair.
186 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
188 Take Down ODL1 and ODL2
189 [Documentation] Stop the karaf in First and Second Controller
190 BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none
191 BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop Single Member 2 msg=up: ODL2, ODL3, down=ODL1
193 Connectivity Tests From Vm Instance1 In net_2 With Two ODLs Down
194 [Documentation] Logging to the vm instance using generated key pair.
195 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
197 Connectivity Tests From Vm Instance2 In net_2 With Two ODLs Down
198 [Documentation] Logging to the vm instance using generated key pair.
199 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
201 Connectivity Tests From Vm Instance3 In net_2 With Two ODLs Down
202 [Documentation] Logging to the vm instance using generated key pair.
203 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
205 Bring Up ODL1 and ODL2
206 [Documentation] Bring up ODL1 and ODL2 again. Do not check for cluster sync until all nodes are
207 ... up. akka will not let nodes join until they are all back up if two were down.
208 ClusterManagement.Start Single Member 1 msg=up: ODL3, down: ODL1, ODL2 wait_for_sync=False
209 ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2
212 [Documentation] Delete Vm instances using instance names. Also remove the VM from the
213 ... list so that later cleanup will not try to delete it.
214 OpenStackOperations.Delete Vm Instance @{NET_1_VMS}[0]
215 Remove From List ${NET_1_VMS} 0
217 No Ping For Deleted Vm
218 [Documentation] Check non reachability of deleted vm instances by pinging to them.
219 ${output} = OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
221 Delete Vm Instances In net_1
222 [Documentation] Delete Vm instances using instance names in network_1.
223 FOR ${vm} IN @{NET_1_VMS}
224 OpenStackOperations.Delete Vm Instance ${vm}
227 Delete Vm Instances In net_2
228 [Documentation] Delete Vm instances using instance names in network_2.
229 FOR ${vm} IN @{NET_2_VMS}
230 OpenStackOperations.Delete Vm Instance ${vm}
233 Delete Sub Networks In net_1
234 [Documentation] Delete Sub Nets for the Networks with neutron request.
235 OpenStackOperations.Delete SubNet @{SUBNETS}[0]
237 Delete Sub Networks In net_2
238 [Documentation] Delete Sub Nets for the Networks with neutron request.
239 OpenStackOperations.Delete SubNet @{SUBNETS}[1]
242 [Documentation] Delete Networks with neutron request.
243 FOR ${network} IN @{NETWORKS}
244 OpenStackOperations.Delete Network ${network}
247 Delete Security Group
248 [Documentation] Delete security groups with neutron request
249 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
252 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
253 DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes