2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup Devstack Suite Setup Tests source_pwd=yes
4 Suite Teardown Close All Connections
5 Test Setup Log Testcase Start To Controller Karaf
7 Library OperatingSystem
8 Library RequestsLibrary
10 Resource ../../../libraries/Utils.robot
11 Resource ../../../libraries/OpenStackOperations.robot
12 Resource ../../../libraries/DevstackUtils.robot
13 Resource ../../../libraries/OVSDB.robot
14 Resource ../../../libraries/ClusterOvsdb.robot
15 Resource ../../../libraries/ClusterManagement.robot
16 Variables ../../../variables/Variables.py
19 @{NETWORKS_NAME} l2_net_1 l2_net_2
20 @{SUBNETS_NAME} l2_sub_net_1 l2_sub_net_2
21 @{NET_1_VM_INSTANCES} VmInstance1_l2_net_1 VmInstance2_net_1 VmInstance3_net_1
22 @{NET_2_VM_INSTANCES} VmInstance1_l2_net_2 VmInstance2_net_2 VmInstance3_net_2
23 @{NET_1_VM_IPS} 70.0.0.3 70.0.0.4 70.0.0.5
24 @{NET_2_VM_IPS} 80.0.0.3 80.0.0.4 80.0.0.5
25 @{VM_IPS_NOT_DELETED} 70.0.0.4
26 @{GATEWAY_IPS} 70.0.0.1 80.0.0.1
27 @{DHCP_IPS} 70.0.0.2 80.0.0.2
28 @{cluster_down_list} ${1} ${2}
29 @{SUBNETS_RANGE} 70.0.0.0/24 80.0.0.0/24
32 Create All Controller Sessions
33 [Documentation] Create sessions for all three contorllers.
34 ClusterManagement.ClusterManagement Setup
36 Check OVS Manager Connection Status
37 [Documentation] This will verify if the OVS manager is connected
38 ${output}= Wait Until Keyword Succeeds 5s 1s Ovsdb.Verify OVS Reports Connected ${OS_CONTROL_NODE_IP}
40 Set Suite Variable ${status} is_connected: true
41 ${dictionary}= Create Dictionary ${status}=9
42 Utils.Check Item Occurrence ${output} ${dictionary}
45 [Documentation] Create Network with neutron request.
46 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
47 \ OpenStackOperations.Create Network ${NetworkElement}
49 Create Subnets For l2_net_1
50 [Documentation] Create Sub Nets for the Networks with neutron request.
51 OpenStackOperations.Create SubNet l2_net_1 l2_sub_net_1 @{SUBNETS_RANGE}[0]
53 Create Subnets For l2_net_2
54 [Documentation] Create Sub Nets for the Networks with neutron request.
55 OpenStackOperations.Create SubNet l2_net_2 l2_sub_net_2 @{SUBNETS_RANGE}[1]
57 Create Bridge Manually and Verify Before Fail
58 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
59 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
61 Add Tap Device Manually and Verify Before Fail
62 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
63 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
65 Delete the Bridge Manually and Verify Before Fail
66 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
67 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
70 [Documentation] Kill the karaf in First Controller
71 ${new_cluster_list} = ClusterManagement.Kill Single Member 1
72 Set Suite Variable ${new_cluster_list}
74 Create Bridge Manually and Verify After Fail
75 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
76 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
78 Add Tap Device Manually and Verify After Fail
79 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
80 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
82 Delete the Bridge Manually and Verify After Fail
83 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
84 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
86 Create Vm Instances For l2_net_1
87 [Documentation] Create Vm instances using flavor and image names for a network.
88 Log ${devstack_conn_id}
89 OpenStackOperations.Create Vm Instances l2_net_1 ${NET_1_VM_INSTANCES}
90 [Teardown] OpenStackOperations.Show Debugs ${NET_1_VM_INSTANCES}
93 [Documentation] Bring up ODL1 again
94 ClusterManagement.Start Single Member 1
96 Create Bridge Manually and Verify After Recover
97 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
98 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
100 Add Tap Device Manually and Verify After Recover
101 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
102 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
104 Delete the Bridge Manually and Verify After Recover
105 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
106 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
109 [Documentation] Kill the karaf in Second Controller
110 ClusterManagement.Kill Single Member 2
112 Create Vm Instances For l2_net_2
113 [Documentation] Create Vm instances using flavor and image names for a network.
114 OpenStackOperations.Create Vm Instances l2_net_2 ${NET_2_VM_INSTANCES}
115 [Teardown] OpenStackOperations.Show Debugs ${NET_2_VM_INSTANCES}
118 [Documentation] Bring up ODL2 again
119 ClusterManagement.Start Single Member 2
121 Ping Vm Instance1 In l2_net_1
122 [Documentation] Check reachability of vm instances by pinging to them.
123 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_1 @{NET_1_VM_IPS}[0]
125 Ping Vm Instance2 In l2_net_1
126 [Documentation] Check reachability of vm instances by pinging to them.
127 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_1 @{NET_1_VM_IPS}[1]
129 Ping Vm Instance3 In l2_net_1
130 [Documentation] Check reachability of vm instances by pinging to them.
131 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_1 @{NET_1_VM_IPS}[2]
133 Ping Vm Instance1 In l2_net_2
134 [Documentation] Check reachability of vm instances by pinging to them.
135 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_2 @{NET_2_VM_IPS}[0]
137 Ping Vm Instance2 In l2_net_2
138 [Documentation] Check reachability of vm instances by pinging to them.
139 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_2 @{NET_2_VM_IPS}[1]
141 Ping Vm Instance3 In l2_net_2
142 [Documentation] Check reachability of vm instances by pinging to them.
143 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_2 @{NET_2_VM_IPS}[2]
146 [Documentation] Kill the karaf in Third Controller
147 ClusterManagement.Kill Single Member 3
149 Connectivity Tests From Vm Instance1 In l2_net_1
150 [Documentation] Logging to the vm instance using generated key pair.
151 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[1] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
153 OpenStackOperations.Test Operations From Vm Instance l2_net_1 @{NET_1_VM_IPS}[0] ${dst_ip_list}
155 Connectivity Tests From Vm Instance2 In l2_net_1
156 [Documentation] Logging to the vm instance using generated key pair.
157 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
159 OpenStackOperations.Test Operations From Vm Instance l2_net_1 @{NET_1_VM_IPS}[1] ${dst_ip_list}
161 Connectivity Tests From Vm Instance3 In l2_net_1
162 [Documentation] Logging to the vm instance using generated key pair.
163 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1]
165 OpenStackOperations.Test Operations From Vm Instance l2_net_1 @{NET_1_VM_IPS}[2] ${dst_ip_list}
168 [Documentation] Bring up ODL3 again
169 ClusterManagement.Start Single Member 3
171 Take Down ODL1 and ODL2
172 [Documentation] Kill the karaf in First and Second Controller
173 ClusterManagement.Kill Members From List Or All ${cluster_down_list}
175 Connectivity Tests From Vm Instance1 In l2_net_2
176 [Documentation] Logging to the vm instance using generated key pair.
177 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[1] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
179 OpenStackOperations.Test Operations From Vm Instance l2_net_2 @{NET_2_VM_IPS}[0] ${dst_ip_list}
181 Connectivity Tests From Vm Instance2 In l2_net_2
182 [Documentation] Logging to the vm instance using generated key pair.
183 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
185 OpenStackOperations.Test Operations From Vm Instance l2_net_2 @{NET_2_VM_IPS}[1] ${dst_ip_list}
187 Connectivity Tests From Vm Instance3 In l2_net_2
188 [Documentation] Logging to the vm instance using generated key pair.
189 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1]
191 OpenStackOperations.Test Operations From Vm Instance l2_net_2 @{NET_2_VM_IPS}[2] ${dst_ip_list}
193 Bring Up ODL1 and ODL2
194 [Documentation] Bring up ODL1 and ODL2 again.
195 ClusterManagement.Start Members From List Or All ${cluster_down_list}
198 [Documentation] Delete Vm instances using instance names.
199 OpenStackOperations.Delete Vm Instance VmInstance1_l2_net_1
201 No Ping For Deleted Vm
202 [Documentation] Check non reachability of deleted vm instances by pinging to them.
203 ${output}= OpenStackOperations.Ping From DHCP Should Not Succeed l2_network_1 @{NET_1_VM_IPS}[0]
205 Delete Vm Instances In network_1
206 [Documentation] Delete Vm instances using instance names in network_1.
207 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
208 \ OpenStackOperations.Delete Vm Instance ${VmElement}
210 Delete Vm Instances In network_2
211 [Documentation] Delete Vm instances using instance names in network_2.
212 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
213 \ OpenStackOperations.Delete Vm Instance ${VmElement}
215 Delete Sub Networks In network_1
216 [Documentation] Delete Sub Nets for the Networks with neutron request.
217 OpenStackOperations.Delete SubNet l2_sub_net_1
219 Delete Sub Networks In network_2
220 [Documentation] Delete Sub Nets for the Networks with neutron request.
221 OpenStackOperations.Delete SubNet l2_sub_net_2
224 [Documentation] Delete Networks with neutron request.
225 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
226 \ OpenStackOperations.Delete Network ${NetworkElement}