2 Documentation Test suite for Ovsdb Southbound Cluster - Owner failover and recover
5 Library RequestsLibrary
6 Resource ../../../libraries/ClusterManagement.robot
7 Resource ../../../libraries/ClusterOvsdb.robot
8 Resource ../../../libraries/SetupUtils.robot
9 Resource ../../../variables/Variables.robot
11 Suite Setup Suite Setup
12 Suite Teardown Delete All Sessions
13 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
17 Check Shards Status Before Fail
18 [Documentation] Check Status for all shards in Ovsdb application.
19 ClusterOvsdb.Check Ovsdb Shards Status
21 Start OVS Multiple Connections
22 [Documentation] Connect OVS to all cluster instances.
23 ${ovsdb_uuid} = OVSDB.Add Multiple Managers to OVS
24 Set Suite Variable ${ovsdb_uuid}
26 Check Entity Owner Status And Find Owner and Candidate Before Fail
27 [Documentation] Check Entity Owner Status and identify owner and candidate.
28 ${original_owner} ${original_candidate_list} = ClusterOvsdb.Get Ovsdb Entity Owner Status For One Device
29 ... ovsdb://uuid/${ovsdb_uuid}
31 ${original_candidate} = Collections.Get From List ${original_candidate_list} 0
32 BuiltIn.Set Suite Variable ${original_owner}
33 BuiltIn.Set Suite Variable ${original_candidate_list}
34 BuiltIn.Set Suite Variable ${original_candidate}
36 Create Bridge Manually and Verify Before Fail
37 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
38 ClusterOvsdb.Create Sample Bridge Manually And Verify
40 Add Port Manually and Verify Before Fail
41 [Documentation] Add port with OVS command and verify it gets applied from all instances.
42 ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify
44 Create Tap Device Before Fail
45 [Documentation] Create tap devices to add to the bridge in ovs
46 ClusterOvsdb.Create Sample Tap Device
48 Add Tap Device Manually and Verify Before Fail
49 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
50 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify
52 Delete the Bridge Manually and Verify Before Fail
53 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
54 ClusterOvsdb.Delete Sample Bridge Manually And Verify
56 Create Bridge In Owner and Verify Before Fail
57 [Documentation] Create Bridge in Owner and verify it gets applied from all instances.
58 ClusterOvsdb.Create Sample Bridge And Verify ${original_owner}
60 Create Port In Owner and Verify Before Fail
61 [Documentation] Create Port in Owner and verify it gets applied from all instances.
62 ClusterOvsdb.Create Sample Port And Verify ${original_owner}
64 Modify the destination IP of Port In Owner Before Fail
65 [Documentation] Modify the dst ip of existing port in Owner.
66 ClusterOvsdb.Modify the destination IP of Sample Port ${original_owner}
68 Verify Port Is Modified Before Fail
69 [Documentation] Verify port is modified in all instances.
70 ClusterOvsdb.Verify Sample Port Is Modified
72 Delete Port In Owner Before Fail
73 [Documentation] Delete port in Owner and verify it gets deleted from all instances.
74 ClusterOvsdb.Delete Sample Port And Verify ${original_owner}
76 Delete Bridge In Owner And Verify Before Fail
77 [Documentation] Delete bridge in Owner and verify it gets deleted from all instances.
78 ClusterOvsdb.Delete Sample Bridge And Verify ${original_owner}
81 [Documentation] Kill Owner Instance and verify it is dead
82 ClusterManagement.Kill Single Member ${original_owner}
83 BuiltIn.Set Suite Variable ${new_cluster_list} ${original_candidate_list}
85 Check Shards Status After Fail
86 [Documentation] Create original cluster list and check Status for all shards in Ovsdb application.
87 ClusterOvsdb.Check Ovsdb Shards Status After Cluster Event ${new_cluster_list}
89 Check Entity Owner Status And Find Owner and Candidate After Fail
90 [Documentation] Check Entity Owner Status and identify owner and candidate.
91 ${new_owner} ${new_candidate_list} = ClusterOvsdb.Get Ovsdb Entity Owner Status For One Device
92 ... ovsdb://uuid/${ovsdb_uuid}
93 ... ${original_candidate}
94 ... ${new_cluster_list}
95 ${new_candidate} = Collections.Get From List ${new_candidate_list} 0
96 BuiltIn.Set Suite Variable ${new_owner}
97 BuiltIn.Set Suite Variable ${new_candidate}
99 Create Bridge Manually and Verify After Fail
100 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
101 ClusterOvsdb.Create Sample Bridge Manually And Verify controller_index_list=${new_cluster_list}
103 Add Port Manually and Verify After Fail
104 [Documentation] Add port with OVS command and verify it gets applied from all instances.
105 ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify controller_index_list=${new_cluster_list}
107 Create Tap Device After Fail
108 [Documentation] Create tap devices to add to the bridge in ovs
109 ClusterOvsdb.Create Sample Tap Device
111 Add Tap Device Manually and Verify After Fail
112 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
113 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify controller_index_list=${new_cluster_list}
115 Delete the Bridge Manually and Verify After Fail
116 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
117 ClusterOvsdb.Delete Sample Bridge Manually And Verify controller_index_list=${new_cluster_list}
119 Create Bridge In Owner and Verify After Fail
120 [Documentation] Create Bridge in Owner and verify it gets applied from all instances.
121 ClusterOvsdb.Create Sample Bridge And Verify ${new_owner} ${new_cluster_list}
123 Create Port In Owner and Verify After Fail
124 [Documentation] Create Port in Owner and verify it gets applied from all instances.
125 ClusterOvsdb.Create Sample Port And Verify ${new_owner} ${new_cluster_list}
127 Modify the destination IP of Port In Owner After Fail
128 [Documentation] Modify the dst ip of existing port in Owner.
129 ClusterOvsdb.Modify the destination IP of Sample Port ${new_owner} ${new_cluster_list}
131 Verify Port Is Modified After Fail
132 [Documentation] Verify port is modified in all instances.
133 ClusterOvsdb.Verify Sample Port Is Modified ${new_cluster_list}
135 Start Old Owner Instance
136 [Documentation] Start Owner Instance and verify it is active
137 ClusterManagement.Start Single Member ${original_owner}
139 Check Shards Status After Recover
140 [Documentation] Create original cluster list and check Status for all shards in Ovsdb application.
141 ClusterOvsdb.Check Ovsdb Shards Status After Cluster Event
143 Check Entity Owner Status After Recover
144 [Documentation] Check Entity Owner Status and identify owner and candidate.
145 ${new_owner} ${new_candidate_list} = ClusterOvsdb.Get Ovsdb Entity Owner Status For One Device
146 ... ovsdb://uuid/${ovsdb_uuid}
148 BuiltIn.Set Suite Variable ${new_owner}
150 Create Bridge Manually and Verify After Recover
151 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
152 ClusterOvsdb.Create Sample Bridge Manually And Verify
154 Add Port Manually and Verify After Recover
155 [Documentation] Add port with OVS command and verify it gets applied from all instances.
156 ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify
158 Create Tap Device After Recover
159 [Documentation] Create tap devices to add to the bridge in ovs
160 ClusterOvsdb.Create Sample Tap Device
162 Add Tap Device Manually and Verify After Recover
163 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
164 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify
166 Delete the Bridge Manually and Verify After Recover
167 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
168 ClusterOvsdb.Delete Sample Bridge Manually And Verify
170 Verify Modified Port After Recover
171 [Documentation] Verify modified port exists in all instances.
172 ClusterOvsdb.Verify Sample Port Is Modified
174 Delete Port In New Owner After Recover
175 [Documentation] Delete port in Owner and verify it gets deleted from all instances.
176 ClusterOvsdb.Delete Sample Port And Verify ${new_owner}
178 Delete Bridge In New Owner And Verify After Recover
179 [Documentation] Delete bridge in Owner and verify it gets deleted from all instances.
180 ClusterOvsdb.Delete Sample Bridge And Verify ${new_owner}
182 Create Bridge In Old Owner and Verify After Recover
183 [Documentation] Create Bridge in Owner and verify it gets applied from all instances.
184 ClusterOvsdb.Create Sample Bridge And Verify ${original_owner}
186 Create Port In Old Owner and Verify After Recover
187 [Documentation] Create Port in Owner and verify it gets applied from all instances.
188 ClusterOvsdb.Create Sample Port And Verify ${original_owner}
190 Modify the destination IP of Port In Old Owner After Recover
191 [Documentation] Modify the dst ip of existing port in Owner.
192 ClusterOvsdb.Modify the destination IP of Sample Port ${original_owner}
194 Verify Port Is Modified After Recover
195 [Documentation] Verify port is modified in all instances.
196 ClusterOvsdb.Verify Sample Port Is Modified
198 Delete Port In Old Owner After Recover
199 [Documentation] Delete port in Owner and verify it gets deleted from all instances.
200 ClusterOvsdb.Delete Sample Port And Verify ${original_owner}
202 Delete Bridge In Old Owner And Verify After Recover
203 [Documentation] Delete bridge in Owner and verify it gets deleted from all instances.
204 ClusterOvsdb.Delete Sample Bridge And Verify ${original_owner}
206 Cleans Up Test Environment For Next Suite
207 [Documentation] Cleans up test environment, close existing sessions in teardown.
208 ClusterOvsdb.Configure Exit OVSDB Connection
213 SetupUtils.Setup_Utils_For_Setup_And_Teardown
214 ClusterManagement.ClusterManagement Setup