2 Documentation Test suite for Cluster HA - Device Owner Stop and Start
4 Library RequestsLibrary
5 Resource ../../../libraries/SetupUtils.robot
6 Resource ../../../libraries/ClusterOpenFlow.robot
7 Resource ../../../libraries/MininetKeywords.robot
8 Resource ../../../libraries/ClusterManagement.robot
9 Variables ../../../variables/Variables.py
11 Suite Setup SetupUtils.Setup_Utils_For_Setup_And_Teardown
12 Suite Teardown Delete All Sessions
16 Check Shards Status Before Stop
17 [Documentation] Check Status for all shards in OpenFlow application.
18 ClusterOpenFlow.Check OpenFlow Shards Status
20 Start Mininet Multiple Connections
21 [Documentation] Start mininet tree,2 with connection to all cluster instances.
22 ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers
23 ... ${TOOLS_SYSTEM_IP}
24 ... ${ClusterManagement__member_index_list}
26 BuiltIn.Set Suite Variable ${mininet_conn_id}
27 BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 9
29 Check Entity Owner Status And Find Owner and Successor Before Stop
30 [Documentation] Check Entity Owner Status and identify owner and successor for first switch s1.
31 ${original_owner} ${original_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device
34 ${original_successor}= Collections.Get From List ${original_successor_list} 0
35 BuiltIn.Set Suite Variable ${original_owner}
36 BuiltIn.Set Suite Variable ${original_successor_list}
37 BuiltIn.Set Suite Variable ${original_successor}
39 Reconnect Extra Switches To Successors And Check OVS Connections
40 [Documentation] Connect switches s2 and s3 to successor instances.
41 ${controller_opt}= BuiltIn.Set Variable
42 FOR ${index} IN @{original_successor_list}
43 ${controller_opt}= BuiltIn.Catenate
45 ... ${SPACE}tcp:${ODL_SYSTEM_${index}_IP}:${ODL_OF_PORT}
48 OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s2 ${controller_opt}
49 OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s3 ${controller_opt}
50 BuiltIn.Wait Until Keyword Succeeds 10s 1s OVSDB.Check OVS OpenFlow Connections ${TOOLS_SYSTEM_IP} 7
52 Check Network Operational Information Before Stop
53 [Documentation] Check devices in operational inventory and topology in all cluster instances.
54 ClusterOpenFlow.Check OpenFlow Network Operational Information For Sample Topology
56 Add Configuration In Owner and Verify Before Stop
57 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
58 ClusterOpenFlow.Add Sample Flow and Verify ${original_owner}
60 Modify Configuration In Owner and Verify Before Stop
61 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
62 ClusterOpenFlow.Modify Sample Flow and Verify ${original_owner}
64 Delete Configuration In Owner and Verify Before Stop
65 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
66 ClusterOpenFlow.Delete Sample Flow and Verify ${original_owner}
68 Add Configuration In Successor and Verify Before Stop
69 [Documentation] Add Flow in Successor and verify it gets applied from all instances.
70 ClusterOpenFlow.Add Sample Flow and Verify ${original_successor}
72 Modify Configuration In Successor and Verify Before Stop
73 [Documentation] Modify Flow in successor and verify it gets applied from all instances.
74 ClusterOpenFlow.Modify Sample Flow and Verify ${original_successor}
76 Delete Configuration In Successor and Verify Before Stop
77 [Documentation] Delete Flow in Successor and verify it gets removed from all instances.
78 ClusterOpenFlow.Delete Sample Flow and Verify ${original_successor}
80 Send RPC Add to Owner and Verify Before Stop
81 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
82 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${original_owner}
84 Send RPC Delete to Owner and Verify Before Stop
85 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
86 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${original_owner}
88 Send RPC Add to Successor and Verify Before Stop
89 [Documentation] Add Flow in Successor and verify it gets applied from all instances.
90 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${original_successor}
92 Send RPC Delete to Successor and Verify Before Stop
93 [Documentation] Delete Flow in Successor and verify it gets removed from all instances.
94 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${original_successor}
96 Modify Network And Verify Before Stop
97 [Documentation] Take a link down and verify port status in all instances.
98 ClusterOpenFlow.Take OpenFlow Device Link Down and Verify
100 Restore Network And Verify Before Stop
101 [Documentation] Take the link up and verify port status in all instances.
102 ClusterOpenFlow.Take OpenFlow Device Link Up and Verify
105 [Documentation] Stop Owner Instance and verify it is dead
106 ClusterManagement.Stop Single Member ${original_owner}
107 BuiltIn.Set Suite Variable ${new_cluster_list} ${original_successor_list}
109 Check Shards Status After Stop
110 [Documentation] Create original cluster list and check Status for all shards in OpenFlow application.
111 ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event ${new_cluster_list}
113 Check Entity Owner Status And Find Owner and Successor After Stop
114 [Documentation] Check Entity Owner Status and identify owner and successor.
115 ${new_owner} ${new_successor_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device
117 ... ${original_successor}
118 ... ${new_cluster_list}
120 ${new_successor}= Collections.Get From List ${new_successor_list} 0
121 BuiltIn.Set Suite Variable ${new_owner}
122 BuiltIn.Set Suite Variable ${new_successor}
124 Check Network Operational Information After Stop
125 [Documentation] Check devices in operational inventory and topology in all cluster instances.
126 ClusterOpenFlow.Check OpenFlow Network Operational Information For Sample Topology ${new_cluster_list}
128 Add Configuration In Owner and Verify After Stop
129 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
130 ClusterOpenFlow.Add Sample Flow and Verify ${new_owner} ${new_cluster_list}
132 Modify Configuration In Owner and Verify After Stop
133 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
134 ClusterOpenFlow.Modify Sample Flow and Verify ${new_owner} ${new_cluster_list}
136 Delete Configuration In Owner and Verify After Stop
137 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
138 ClusterOpenFlow.Delete Sample Flow and Verify ${new_owner} ${new_cluster_list}
140 Add Configuration In Successor and Verify After Stop
141 [Documentation] Add Flow in Successor and verify it gets applied from all instances.
142 ClusterOpenFlow.Add Sample Flow and Verify ${new_successor} ${new_cluster_list}
144 Modify Configuration In Successor and Verify After Stop
145 [Documentation] Modify Flow in Successor and verify it gets applied from all instances.
146 ClusterOpenFlow.Modify Sample Flow and Verify ${new_successor} ${new_cluster_list}
148 Delete Configuration In Successor and Verify After Stop
149 [Documentation] Delete Flow in Successor and verify it gets applied from all instances.
150 ClusterOpenFlow.Delete Sample Flow and Verify ${new_successor} ${new_cluster_list}
152 Send RPC Add to Owner and Verify After Stop
153 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
154 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${new_owner} ${new_cluster_list}
156 Send RPC Delete to Owner and Verify After Stop
157 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
158 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${new_owner} ${new_cluster_list}
160 Send RPC Add to Successor and Verify After Stop
161 [Documentation] Add Flow in Successor and verify it gets applied from all instances.
162 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${new_successor} ${new_cluster_list}
164 Send RPC Delete to Successor and Verify After Stop
165 [Documentation] Delete Flow in Successor and verify it gets removed from all instances.
166 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${new_successor} ${new_cluster_list}
168 Modify Network and Verify After Stop
169 [Documentation] Take a link down and verify port status in all instances.
170 ClusterOpenFlow.Take OpenFlow Device Link Down and Verify ${new_cluster_list}
172 Restore Network and Verify After Stop
173 [Documentation] Take the link up and verify port status in all instances.
174 ClusterOpenFlow.Take OpenFlow Device Link Up and Verify ${new_cluster_list}
176 Start Old Owner Instance
177 [Documentation] Start old Owner Instance and verify it is up
178 ClusterManagement.Start Single Member ${original_owner}
180 Check Shards Status After Start
181 [Documentation] Create original cluster list and check Status for all shards in OpenFlow application.
182 ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event
184 Check Entity Owner Status After Start
185 [Documentation] Check Entity Owner Status and identify owner and successor.
186 ${new_owner} ${new_successors_list}= ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device
189 BuiltIn.Set Suite Variable ${new_owner}
191 Check Network Operational Information After Start
192 [Documentation] Check devices in operational inventory and topology in all cluster instances.
193 ClusterOpenFlow.Check OpenFlow Network Operational Information For Sample Topology
195 Add Configuration In Owner and Verify After Start
196 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
197 ClusterOpenFlow.Add Sample Flow and Verify ${new_owner}
199 Modify Configuration In Owner and Verify After Start
200 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
201 ClusterOpenFlow.Modify Sample Flow and Verify ${new_owner}
203 Delete Configuration In Owner and Verify After Start
204 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
205 ClusterOpenFlow.Delete Sample Flow and Verify ${new_owner}
207 Add Configuration In Old Owner and Verify After Start
208 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
209 ClusterOpenFlow.Add Sample Flow and Verify ${original_owner}
211 Modify Configuration In Old Owner and Verify After Start
212 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
213 ClusterOpenFlow.Modify Sample Flow and Verify ${original_owner}
215 Delete Configuration In Old Owner and Verify After Start
216 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
217 ClusterOpenFlow.Delete Sample Flow and Verify ${original_owner}
219 Send RPC Add to Owner and Verify After Start
220 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
221 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${new_owner}
223 Send RPC Delete to Owner and Verify After Start
224 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
225 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${new_owner}
227 Send RPC Add to Old Owner and Verify After Start
228 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
229 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${original_owner}
231 Send RPC Delete to Old Owner and Verify After Start
232 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
233 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${original_owner}
235 Modify Network and Verify After Start
236 [Documentation] Take a link down and verify port status in all instances.
237 ClusterOpenFlow.Take OpenFlow Device Link Down and Verify
239 Restore Network and Verify After Start
240 [Documentation] Take the link up and verify port status in all instances.
241 ClusterOpenFlow.Take OpenFlow Device Link Up and Verify
243 Stop Mininet and Exit
244 [Documentation] Stop mininet and exit connection.
245 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
246 Utils.Clean Mininet System
248 Check No Network Operational Information
249 [Documentation] Check device is not in operational inventory or topology in all cluster instances.
250 ClusterOpenFlow.Check No OpenFlow Network Operational Information