2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup OpenStackOperations.OpenStack Suite Setup
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} cl2_sg
22 @{NETWORKS} cl2_net_1 cl2_net_2
23 @{SUBNETS} cl2_sub_1 cl2_sub_2
24 @{NET_1_VMS} cl2_net_1_vm_1 cl2_net_1_vm_2 cl2_net_1_vm_3
25 @{NET_2_VMS} cl2_net_2_vm_1 cl2_net_2_vm_2 cl2_net_2_vm_3
26 @{SUBNET_CIDRS} 26.0.0.0/24 27.0.0.0/24
27 @{CLUSTER_DOWN_LIST} ${1} ${2}
30 Create All Controller Sessions
31 [Documentation] Create sessions for all three contorllers.
32 ClusterManagement.ClusterManagement Setup
35 [Documentation] Create Network with neutron request.
36 OpenStackOperations.Create Network @{NETWORKS}[0]
38 Create Subnet For net_1
39 [Documentation] Create Sub Net for the Network with neutron request.
40 OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
43 [Documentation] Create Network with neutron request.
44 OpenStackOperations.Create Network @{NETWORKS}[1]
46 Create Subnet For net_2
47 [Documentation] Create Sub Net for the Network 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}
54 Create Bridge Manually and Verify Before Fail
55 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
56 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
58 Add Tap Device Manually and Verify Before Fail
59 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
60 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
62 Delete the Bridge Manually and Verify Before Fail
63 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
64 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
67 [Documentation] Kill the karaf in First Controller
68 ${new_cluster_list} = ClusterManagement.Kill Single Member 1
69 BuiltIn.Set Suite Variable ${new_cluster_list}
71 Create Bridge Manually and Verify After Fail
72 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
73 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
75 Add Tap Device Manually and Verify After Fail
76 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
77 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
79 Delete the Bridge Manually and Verify After Fail
80 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
81 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
84 [Documentation] Bring up ODL1 again
85 ClusterManagement.Start Single Member 1
87 Create Bridge Manually and Verify After Recover
88 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
89 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
91 Add Tap Device Manually and Verify After Recover
92 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
93 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
95 Delete the Bridge Manually and Verify After Recover
96 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
97 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
100 [Documentation] Kill the karaf in Second Controller
101 ClusterManagement.Kill Single Member 2
103 Create Vm Instances For net_1
104 [Documentation] Create Vm instances using flavor and image names for a network.
105 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
106 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[1] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
107 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
109 Create Vm Instances For net_2
110 [Documentation] Create Vm instances using flavor and image names for a network.
111 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
112 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
113 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
115 Check Vm Instances Have Ip Address
116 @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
117 @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
118 BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
119 BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
120 BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
121 BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
122 BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
123 BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
124 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
125 ... AND OpenStackOperations.Get Test Teardown Debugs
128 [Documentation] Bring up ODL2 again
129 ClusterManagement.Start Single Member 2
131 Ping Vm Instance1 In net_1
132 [Documentation] Check reachability of vm instances by pinging to them.
133 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
135 Ping Vm Instance2 In net_1
136 [Documentation] Check reachability of vm instances by pinging to them.
137 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[1]
139 Ping Vm Instance3 In net_1
140 [Documentation] Check reachability of vm instances by pinging to them.
141 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[2]
143 Ping Vm Instance1 In net_2
144 [Documentation] Check reachability of vm instances by pinging to them.
145 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[0]
147 Ping Vm Instance2 In net_2
148 [Documentation] Check reachability of vm instances by pinging to them.
149 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[1]
151 Ping Vm Instance3 In net_2
152 [Documentation] Check reachability of vm instances by pinging to them.
153 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[2]
156 [Documentation] Kill the karaf in Third Controller
157 ClusterManagement.Kill Single Member 3
159 Connectivity Tests From Vm Instance1 In net_1
160 [Documentation] Logging to the vm instance using generated key pair.
161 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
163 Connectivity Tests From Vm Instance2 In net_1
164 [Documentation] Logging to the vm instance using generated key pair.
165 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${NET_1_VM_IPS}
167 Connectivity Tests From Vm Instance3 In net_1
168 [Documentation] Logging to the vm instance using generated key pair.
169 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[2] ${NET_1_VM_IPS}
172 [Documentation] Bring up ODL3 again
173 ClusterManagement.Start Single Member 3
175 Take Down ODL1 and ODL2
176 [Documentation] Kill the karaf in First and Second Controller
177 ClusterManagement.Kill Members From List Or All ${CLUSTER_DOWN_LIST}
179 Connectivity Tests From Vm Instance1 In net_2
180 [Documentation] Logging to the vm instance using generated key pair.
181 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
183 Connectivity Tests From Vm Instance2 In net_2
184 [Documentation] Logging to the vm instance using generated key pair.
185 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
187 Connectivity Tests From Vm Instance3 In net_2
188 [Documentation] Logging to the vm instance using generated key pair.
189 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
191 Bring Up ODL1 and ODL2
192 [Documentation] Bring up ODL1 and ODL2 again.
193 ClusterManagement.Start Members From List Or All ${CLUSTER_DOWN_LIST}
196 [Documentation] Delete Vm instances using instance names.
197 OpenStackOperations.Delete Vm Instance @{NET_1_VMS}[0]
199 No Ping For Deleted Vm
200 [Documentation] Check non reachability of deleted vm instances by pinging to them.
201 ${output} = OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
203 Delete Vm Instances In net_1
204 [Documentation] Delete Vm instances using instance names in network_1.
205 : FOR ${vm} IN @{NET_1_VMS}
206 \ OpenStackOperations.Delete Vm Instance ${vm}
208 Delete Vm Instances In net_2
209 [Documentation] Delete Vm instances using instance names in network_2.
210 : FOR ${vm} IN @{NET_2_VMS}
211 \ OpenStackOperations.Delete Vm Instance ${vm}
213 Delete Sub Networks In net_1
214 [Documentation] Delete Sub Nets for the Networks with neutron request.
215 OpenStackOperations.Delete SubNet @{SUBNETS}[0]
217 Delete Sub Networks In net_2
218 [Documentation] Delete Sub Nets for the Networks with neutron request.
219 OpenStackOperations.Delete SubNet @{SUBNETS}[1]
222 [Documentation] Delete Networks with neutron request.
223 : FOR ${network} IN @{NETWORKS}
224 \ OpenStackOperations.Delete Network ${network}
226 Delete Security Group
227 [Documentation] Delete security groups with neutron request
228 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
231 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
232 DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes