blob: c5840f5f8cd4ab8d18fa5be160ec8cad69801ddd [file] [log] [blame]
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +00001# Copyright 2017 - present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14# FIXME Can we use the same test against BBSim and Hardware?
15
16*** Settings ***
17Documentation Test various end-to-end scenarios
18Suite Setup Common Test Suite Setup
19Test Setup Setup
20Test Teardown Teardown
Suchitra Vemuri32dea012020-07-08 16:40:06 -070021Suite Teardown Teardown Suite
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +000022Library Collections
23Library String
24Library OperatingSystem
25Library XML
26Library RequestsLibrary
27Library ../../libraries/DependencyLibrary.py
28Resource ../../libraries/onos.robot
29Resource ../../libraries/voltctl.robot
30Resource ../../libraries/voltha.robot
31Resource ../../libraries/utils.robot
32Resource ../../libraries/k8s.robot
33Resource ../../variables/variables.robot
34
35*** Variables ***
36${POD_NAME} flex-ocp-cord
37${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
38${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
39#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
40${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
41${HELM_CHARTS_DIR} ~/helm-charts
42${VOLTHA_POD_NUM} 8
43${NAMESPACE} voltha
44# For below variable value, using deployment name as using grep for
45# parsing radius pod name, we can also use full radius pod name
46${RESTART_POD_NAME} radius
Suchitra Vemuricdc32d82020-07-17 12:24:46 -070047${timeout} 360s
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +000048${of_id} 0
49${logical_id} 0
Suchitra Vemuri2fa9bba2020-01-22 17:38:48 -080050${has_dataplane} True
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +000051${teardown_device} False
52${scripts} ../../scripts
Hardik Windlasscbcca312020-04-20 21:46:11 +053053${workflow} ATT
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +000054
Andy Bavierabeba262020-02-07 16:22:16 -070055# Per-test logging on failure is turned off by default; set this variable to enable
56${container_log_dir} ${None}
57
Gayathri.Selvanee4a91b2020-01-17 06:49:53 +000058*** Test Cases ***
59Adding the same OLT before and after enabling the device
60 [Documentation] Create OLT, Create the same OLT again and Check for the Error message
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -080061 ... VOL-2405 VOL-2406
62 [Tags] AddSameOLT functional released
Andy Baviere187eda2020-04-20 15:00:02 -070063 [Setup] Start Logging AddSameOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -070064 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -070065 ... AND Stop Logging AddSameOLT
Suchitra Vemurif7a033c2020-02-26 17:22:41 -080066 # Add OLT device
Suchitra Vemurie9c79bf2020-02-26 23:11:39 -080067 #setup
Andy Bavierc1904dc2020-03-20 11:39:15 -070068 Delete All Devices and Verify
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -080069 Run Keyword and Ignore Error Collect Logs
Suchitra Vemuri736d35f2020-08-06 16:28:35 -070070 # Wait for the OLT to be reachable
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080071 FOR ${I} IN RANGE 0 ${olt_count}
72 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
73 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
74 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
75 ${olt_ip}= Get From Dictionary ${list_olts}[${I}] ip
76 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
77 #${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
78 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
79 ... Check Remote System Reachability True ${olt_ssh_ip}
Andrea Campanella3dcce272021-01-15 16:04:47 +010080 ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}"
81 ... Create Device ${olt_ip} ${OLT_PORT}
82 ... ELSE Create Device ${olt_ip} ${OLT_PORT} ${list_olts}[${I}][type]
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080083 Set Suite Variable ${olt_device_id}
84 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN
85 ... ${olt_device_id}
86 ${rc} ${output}= Run and Return Rc and Output
Matteo Scandolo5899be12020-11-11 15:38:07 -080087 ... voltctl -c ${VOLTCTL_CONFIG} device create -t openolt -H ${olt_ip}:${OLT_PORT}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080088 Should Not Be Equal As Integers ${rc} 0
89 Should Contain ${output} device is already pre-provisioned ignore_case=True
90 #Enable the created OLT device
91 Enable Device ${olt_device_id}
92 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
93 ... ${olt_serial_number}
94 ${rc} ${output}= Run and Return Rc and Output
Matteo Scandolo5899be12020-11-11 15:38:07 -080095 ... voltctl -c ${VOLTCTL_CONFIG} device create -t openolt -H ${olt_ip}:${OLT_PORT}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080096 Should Not Be Equal As Integers ${rc} 0
97 Log ${output}
98 Should Contain ${output} device is already pre-provisioned ignore_case=True
99 Log "This OLT is added already and enabled"
100 END
Gayathri.Selvan3dfe6c22020-01-27 13:08:55 +0000101
Gayathri.Selvan967f5a52020-02-12 06:58:38 +0000102Test Disable or Enable different device id which is not in the device list
103 [Documentation] Disable or Enable a device id which is not listed in the voltctl device list
Gayathri.Selvan3dfe6c22020-01-27 13:08:55 +0000104 ... command and ensure that error message is shown.
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800105 ... VOL-2412-2413
106 [Tags] functional DisableEnableInvalidDevice released
Andy Baviere187eda2020-04-20 15:00:02 -0700107 [Setup] Start Logging DisableInvalidDevice
Andy Bavier4a8450e2020-02-04 08:58:37 -0700108 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700109 ... AND Stop Logging DisableInvalidDevice
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -0800110 Run Keyword and Ignore Error Collect Logs
Matteo Scandolo5899be12020-11-11 15:38:07 -0800111 ${rc} ${output}= Run and Return Rc and Output voltctl -c ${VOLTCTL_CONFIG} device list -o json
Gayathri.Selvan3dfe6c22020-01-27 13:08:55 +0000112 Should Be Equal As Integers ${rc} 0
113 ${jsondata}= To Json ${output}
114 Log ${jsondata}
115 ${length}= Get Length ${jsondata}
116 @{ids}= Create List
117 FOR ${INDEX} IN RANGE 0 ${length}
118 ${value}= Get From List ${jsondata} ${INDEX}
119 ${device_id}= Get From Dictionary ${value} id
120 Append To List ${ids} ${device_id}
121 END
122 #Create a new fake device id
123 ${fakeDeviceId} Replace String Using Regexp ${device_id} \\d\\d xx count=1
124 Log ${fakeDeviceId}
125 #Ensure that the new id created is not in the device id list
126 List Should Not Contain Value ${ids} ${fakeDeviceId}
127 #Disable fake device id
Matteo Scandolo5899be12020-11-11 15:38:07 -0800128 ${rc} ${output}= Run and Return Rc and Output voltctl -c ${VOLTCTL_CONFIG} device disable ${fakeDeviceId}
Suchitra Vemuria7e8ad22020-02-11 18:02:40 -0800129 Should Contain ${output} Error while disabling '${fakeDeviceId}'
Gayathri.Selvan967f5a52020-02-12 06:58:38 +0000130 #Disable device for VOL-2413
131 Disable Device ${device_id}
132 #Enable fake device id
Matteo Scandolo5899be12020-11-11 15:38:07 -0800133 ${rc} ${output}= Run and Return Rc and Output voltctl -c ${VOLTCTL_CONFIG} device enable ${fakeDeviceId}
Gayathri.Selvan967f5a52020-02-12 06:58:38 +0000134 Should Contain ${output} Error while enabling '${fakeDeviceId}'
suraj gourbaee2c62020-02-03 10:21:32 +0000135
136Check deletion of OLT/ONU before disabling
137 [Documentation] Try deleting OL/ONU before disabling and check error message
138 ... Assuming devices are already created, up and running fine; test1 or sanity was
139 ... executed where all the ONUs are authenticated/DHCP/pingable
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -0800140 ... VOL-2411
Hardik Windlasscbcca312020-04-20 21:46:11 +0530141 #TODO: If this TC gets updated in future, To add support for DT workflow as well (refer JIRA: VOL-2945)
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -0800142 [Tags] functional DeleteBeforeDisableCheck notready
Andy Baviere187eda2020-04-20 15:00:02 -0700143 [Setup] Start Logging DeleteBeforeDisableCheck
Andy Bavier4a8450e2020-02-04 08:58:37 -0700144 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700145 ... AND Stop Logging DeleteBeforeDisableCheck
suraj gourbaee2c62020-02-03 10:21:32 +0000146 #validate olt states
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -0800147 Run Keyword If ${has_dataplane} Clean Up Linux
148 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800149 FOR ${I} IN RANGE 0 ${olt_count}
150 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
151 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
152 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
153 ${olt_ip}= Get From Dictionary ${list_olts}[${I}] ip
154 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
155 #${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
156 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
157 ... REACHABLE ${olt_serial_number}
Matteo Scandolo5899be12020-11-11 15:38:07 -0800158 ${rc} ${output}= Run and Return Rc and Output voltctl -c ${VOLTCTL_CONFIG} device delete ${olt_device_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800159 Log ${output}
160 Should Contain ${output} expected-admin-state:DISABLED
161 Wait Until Keyword Succeeds ${timeout} 5s
162 ... Validate OLT Device ENABLED ACTIVE REACHABLE ${olt_serial_number}
163 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
164 ... ${olt_serial_number}
165 Set Global Variable ${of_id}
166 END
167 FOR ${I} IN RANGE 0 ${num_all_onus}
suraj gourbaee2c62020-02-03 10:21:32 +0000168 ${src}= Set Variable ${hosts.src[${I}]}
169 ${dst}= Set Variable ${hosts.dst[${I}]}
170 ${onu_device_id}= Get Device ID From SN ${src['onu']}
171 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
172 ... ENABLED ACTIVE REACHABLE
173 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Matteo Scandolo5899be12020-11-11 15:38:07 -0800174 ${rc} ${output}= Run and Return Rc and Output voltctl -c ${VOLTCTL_CONFIG} device delete ${onu_device_id}
suraj gourbaee2c62020-02-03 10:21:32 +0000175 Log ${output}
176 Should Contain ${output} expected-admin-state:DISABLED
177 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
178 ... ENABLED ACTIVE REACHABLE
179 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
180 END
suraj gourb3160412020-02-04 06:11:31 +0000181
182Check disabling of pre-provisioned OLT before enabling
183 [Documentation] Create OLT, disable same OLT, check error message and validates ONU
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -0800184 ... VOL-2414
185 [Tags] functional DisablePreprovisionedOLTCheck
Andy Baviere187eda2020-04-20 15:00:02 -0700186 [Setup] Run Keywords Start Logging DisablePreprovisionedOLTCheck
Andy Bavierde53a1f2020-03-25 14:53:56 -0700187 ... AND Delete All Devices and Verify
Andy Bavier4a8450e2020-02-04 08:58:37 -0700188 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700189 ... AND Stop Logging DisablePreprovisionedOLTCheck
Andy Bavierde53a1f2020-03-25 14:53:56 -0700190 Sleep 180s
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -0800191 Run Keyword and Ignore Error Collect Logs
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800192 FOR ${I} IN RANGE 0 ${olt_count}
193 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
194 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
195 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
196 ${olt_ip}= Get From Dictionary ${list_olts}[${I}] ip
197 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
198 #${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
199 #create/preprovision device
Andrea Campanella3dcce272021-01-15 16:04:47 +0100200 ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}"
201 ... Create Device ${olt_ip} ${OLT_PORT}
202 ... ELSE Create Device ${olt_ip} ${OLT_PORT} ${list_olts}[${I}][type]
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800203 Set Suite Variable ${olt_device_id}
204 #validate olt states
205 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED UNKNOWN
206 ... UNKNOWN ${olt_device_id}
207 #Try disabling pre-provisioned OLT
208 ${rc} ${output}= Run and Return Rc and Output
Matteo Scandolo5899be12020-11-11 15:38:07 -0800209 ... voltctl -c ${VOLTCTL_CONFIG} device disable ${olt_device_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800210 Should Not Be Equal As Integers ${rc} 0
211 Log ${output}
212 Should Contain ${output} invalid-admin-state:PREPROVISIONED
213 #Enable OLT
214 Enable Device ${olt_device_id}
215 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
216 ... ${olt_serial_number}
217 ${logical_id}= Get Logical Device ID From SN ${olt_serial_number}
218 Set Suite Variable ${logical_id}
219 END
Hardik Windlasscbcca312020-04-20 21:46:11 +0530220 ${onu_reason}= Set Variable If '${workflow}' == 'DT' initial-mib-downloaded omci-flows-pushed
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800221 FOR ${I} IN RANGE 0 ${num_all_onus}
suraj gourb3160412020-02-04 06:11:31 +0000222 ${src}= Set Variable ${hosts.src[${I}]}
223 ${dst}= Set Variable ${hosts.dst[${I}]}
224 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
225 ... ENABLED ACTIVE REACHABLE
Hardik Windlasscbcca312020-04-20 21:46:11 +0530226 ... ${src['onu']} onu=True onu_reason=${onu_reason}
suraj gourb3160412020-02-04 06:11:31 +0000227 END
Hema526eceb2020-02-04 13:11:40 +0530228
229Disable and Delete the logical device directly
230 [Documentation] Disable and delete the logical device directly is not possible
231 ... since it is allowed only through OLT device deletion.
Suchitra Vemuri5f66f422020-03-02 16:43:49 -0800232 ... VOL-2418
233 [Tags] functional DisableDelete_LogicalDevice
Andy Baviere187eda2020-04-20 15:00:02 -0700234 [Setup] Run Keywords Start Logging DisableDelete_LogicalDevice
Andy Bavierde53a1f2020-03-25 14:53:56 -0700235 ... AND Delete All Devices and Verify
Andy Bavier4a8450e2020-02-04 08:58:37 -0700236 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700237 ... AND Stop Logging DisableDelete_LogicalDevice
Hema526eceb2020-02-04 13:11:40 +0530238 Run Keyword If ${has_dataplane} Sleep 180s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800239 FOR ${I} IN RANGE 0 ${olt_count}
240 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
241 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
242 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
243 ${olt_ip}= Get From Dictionary ${list_olts}[${I}] ip
244 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
245 #${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
246 #create/preprovision OLT device
Andrea Campanella3dcce272021-01-15 16:04:47 +0100247 ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}"
248 ... Create Device ${olt_ip} ${OLT_PORT}
249 ... ELSE Create Device ${olt_ip} ${OLT_PORT} ${list_olts}[${I}][type]
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800250 Set Suite Variable ${olt_device_id}
251 #validate olt states
252 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED UNKNOWN
Suchitra Vemurif8462be2020-11-05 13:38:42 -0800253 ... UNKNOWN ${olt_device_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800254 #Enable the created OLT device
255 Enable Device ${olt_device_id}
256 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE
257 ... REACHABLE ${olt_serial_number}
258 #Check whether logical devices are also created
259 ${rc} ${output}= Run and Return Rc and Output
Matteo Scandolo5899be12020-11-11 15:38:07 -0800260 ... voltctl -c ${VOLTCTL_CONFIG} logicaldevice list
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800261 Should Be Equal As Integers ${rc} 0
262 Log ${output}
263 ${logical_id}= Get Logical Device ID From SN ${olt_serial_number}
264 Should Not Be Empty ${logical_id}
265 ${rc} ${output}= Run and Return Rc and Output
Matteo Scandolo5899be12020-11-11 15:38:07 -0800266 ... voltctl -c ${VOLTCTL_CONFIG} logicaldevice disable ${logical_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800267 Should Not Be Equal As Integers ${rc} 0
268 Log ${output}
269 Should Contain '${output}' Unknown command
270 ${rc} ${output1}= Run and Return Rc and Output
Matteo Scandolo5899be12020-11-11 15:38:07 -0800271 ... voltctl -c ${VOLTCTL_CONFIG} logicaldevice delete ${logical_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800272 Should Not Be Equal As Integers ${rc} 0
273 Log ${output1}
274 Should Contain '${output1}' Unknown command
275 END
suraj goura4166222020-02-03 12:09:11 +0000276
277Check logical device creation and deletion
278 [Documentation] Deletes all devices, checks logical device, creates devices again and checks
279 ... logical device, flows, ports
Suchitra Vemuri5f66f422020-03-02 16:43:49 -0800280 ... VOL-2416 VOL-2417
281 [Tags] functional LogicalDeviceCheck
Andy Baviere187eda2020-04-20 15:00:02 -0700282 [Setup] Start Logging LogicalDeviceCheck
Andy Bavier4a8450e2020-02-04 08:58:37 -0700283 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700284 ... AND Stop Logging LogicalDeviceCheck
Andy Bavierde53a1f2020-03-25 14:53:56 -0700285 Delete All Devices and Verify
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800286 FOR ${I} IN RANGE 0 ${olt_count}
287 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
288 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
289 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
290 ${olt_ip}= Get From Dictionary ${list_olts}[${I}] ip
291 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
292 #${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
293 ${logical_id}= Get Logical Device ID From SN ${olt_serial_number}
294 Should Be Empty ${logical_id}
295 Run Keyword If ${has_dataplane} Sleep 180s
296 ... ELSE Sleep 10s
Andrea Campanella3dcce272021-01-15 16:04:47 +0100297 ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}"
298 ... Create Device ${olt_ip} ${OLT_PORT}
299 ... ELSE Create Device ${olt_ip} ${OLT_PORT} ${list_olts}[${I}][type]
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800300 Set Suite Variable ${olt_device_id}
301 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED UNKNOWN
302 ... UNKNOWN ${olt_device_id}
303 Enable Device ${olt_device_id}
304 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
305 ... ${olt_serial_number}
306 ${logical_id}= Get Logical Device ID From SN ${olt_serial_number}
307 Should Not Be Empty ${logical_id}
308 ${rc} ${output}= Run and Return Rc and Output
Matteo Scandolo5899be12020-11-11 15:38:07 -0800309 ... voltctl -c ${VOLTCTL_CONFIG} logicaldevice list
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800310 Should Be Equal As Integers ${rc} 0
311 Log ${output}
312 Should Contain ${output} ${olt_device_id}
313 Set Suite Variable ${logical_id}
314 Wait Until Keyword Succeeds ${timeout} 5s Validate Logical Device Ports ${logical_id}
315 Wait Until Keyword Succeeds ${timeout} 5s Validate Logical Device Flows ${logical_id}
316 Run Keyword and Ignore Error Collect Logs
317 END
Suchitra Vemurie9c79bf2020-02-26 23:11:39 -0800318
319*** Keywords ***
320Setup Suite
321 [Documentation] Set up the test suite
322 Common Test Suite Setup
323
Suchitra Vemuri32dea012020-07-08 16:40:06 -0700324Teardown Suite
325 [Documentation] Teardown suite
326 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -0700327 #Restore all ONUs
328# Run Keyword If ${has_dataplane} RestoreONUs ${num_onus}