blob: 12110a9acd7c090cdfbb392d4fae7076b717594f [file] [log] [blame]
Hardik Windlassb9bdd502020-04-17 14:46:21 +05301# 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 Setup Suite
19Test Setup Setup
20Test Teardown Teardown
21Suite Teardown Teardown Suite
22Library 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
Andrea Campanella15619c72020-04-30 09:48:04 +020034Resource ../../libraries/power_switch.robot
Hardik Windlassb9bdd502020-04-17 14:46:21 +053035
36*** Variables ***
37${POD_NAME} flex-ocp-cord
38${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
39${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
40#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
41${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
42${HELM_CHARTS_DIR} ~/helm-charts
43${VOLTHA_POD_NUM} 8
44${NAMESPACE} voltha
45# For below variable value, using deployment name as using grep for
46# parsing radius pod name, we can also use full radius pod name
47${RESTART_POD_NAME} radius
48${timeout} 60s
49${of_id} 0
50${logical_id} 0
51${has_dataplane} True
52${teardown_device} False
53${scripts} ../../scripts
54
55# Per-test logging on failure is turned off by default; set this variable to enable
56${container_log_dir} ${None}
57
Hardik Windlass43531332021-05-19 07:07:03 +000058# logging flag to enable Collect Logs, can be passed via the command line too
59# example: -v logging:False
60${logging} True
61
Hardik Windlass4ed54502021-05-14 07:34:15 +000062# Flag specific to Soak Jobs
63${SOAK_TEST} False
64
Hardik Windlassb9bdd502020-04-17 14:46:21 +053065*** Test Cases ***
66Verify ONU after Rebooting Physically for DT
67 [Documentation] Test the ONU functionality by physically turning on/off ONU.
68 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
69 ... Test case runs only on the PODs that are configured with PowerSwitch that
70 ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot)
71 [Tags] functionalDt PowerSwitchOnuRebootDt VOL-2819 PowerSwitch
Hardik Windlass9df139e2020-04-24 14:54:54 +053072 [Setup] Start Logging RebootOnu_PowerSwitch_Dt
Hardik Windlass43531332021-05-19 07:07:03 +000073 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlassb9bdd502020-04-17 14:46:21 +053074 ... AND Stop Logging RebootOnu_PowerSwitch_Dt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080075 ... AND Delete All Devices and Verify
Hardik Windlassb9bdd502020-04-17 14:46:21 +053076 # Add OLT device
77 Setup
78 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
79 Run Keyword If ${has_dataplane} Clean Up Linux
80 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
81 Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password}
Hardik Windlass2eb47182020-05-19 20:24:12 +053082 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080083 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlassb9bdd502020-04-17 14:46:21 +053084 ${src}= Set Variable ${hosts.src[${I}]}
85 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080086 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass0560f802020-05-06 23:06:53 +053087 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Hardik Windlassb9bdd502020-04-17 14:46:21 +053088 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
89 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
Hardik Windlass7c801e62020-05-04 19:33:21 +053090 # Disable Power Switch
Hardik Windlassb9bdd502020-04-17 14:46:21 +053091 Disable Switch Outlet ${src['power_switch_port']}
92 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
93 ... Wait Until Keyword Succeeds 60s 2s
94 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
95 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +053096 # Remove Subscriber Access (To replicate DT workflow)
TorstenThieme4e2168e2021-06-22 14:01:47 +000097 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hardik Windlass7c801e62020-05-04 19:33:21 +053098 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Girish Gowdrae0c711e2021-07-20 14:30:17 -070099 # Allow the remove subscriber command to clean up all the flows, schedulers and queues before deleting the device
100 Sleep 5s
Hardik Windlass7c801e62020-05-04 19:33:21 +0530101 # Delete ONU Device (To replicate DT workflow)
102 Delete Device ${onu_device_id}
103 Sleep 5s
104 # Enable Power Switch
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530105 Enable Switch Outlet ${src['power_switch_port']}
Hardik Windlass40ccffb2020-05-11 14:12:07 +0530106 # Waiting extra time for the ONU to come up
107 Sleep 60s
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530108 # Check ONU port is Enabled in ONOS
109 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
Hardik Windlass39015672021-07-05 05:48:08 +0000110 ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530111 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
TorstenThieme4e2168e2021-06-22 14:01:47 +0000112 ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530113 ... volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530114 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700115 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530116 ... ENABLED ACTIVE REACHABLE
Hardik Windlass7c801e62020-05-04 19:33:21 +0530117 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530118 # Verify subscriber access flows are added for the ONU port
119 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
120 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
121 ... ${onu_port} ${nni_port} ${src['s_tag']}
Hardik Windlass2eb47182020-05-19 20:24:12 +0530122 #Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass7c801e62020-05-04 19:33:21 +0530123 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
124 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530125 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530126 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
127 ... ${dst['container_name']}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530128 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800129 # Verify flows for all OLTs
130 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530131
132Verify OLT after Rebooting Physically for DT
133 [Documentation] Test the physical reboot of the OLT
134 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
135 ... Test performs a physical reboot, performs "reboot" from the OLT CLI
136 [Tags] functionalDt PhysicalOltRebootDt VOL-2817
Hardik Windlass9df139e2020-04-24 14:54:54 +0530137 [Setup] Start Logging RebootOlt_Physical_Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000138 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530139 ... AND Stop Logging RebootOlt_Physical_Dt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800140 ... AND Delete All Devices and Verify
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530141 # Add OLT device
142 Setup
143 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
144 Run Keyword If ${has_dataplane} Clean Up Linux
145 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
146 # Reboot the OLT from the OLT CLI
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800147 FOR ${I} IN RANGE 0 ${olt_count}
148 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
149 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
150 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
151 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
152 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
153 Run Keyword If ${has_dataplane} Login And Run Command On Remote System
Andrea Campanella5ef88142021-02-02 14:34:50 +0100154 ... reboot ${olt_ssh_ip} ${olt_user} ${olt_pass} prompt=#
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800155 END
156 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530157 ${src}= Set Variable ${hosts.src[${I}]}
158 ${dst}= Set Variable ${hosts.dst[${I}]}
159 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
160 ... Wait Until Keyword Succeeds 60s 2s
161 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
162 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
163 END
164 # Wait for the OLT to come back up
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800165 FOR ${I} IN RANGE 0 ${olt_count}
166 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
167 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
168 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
169 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
170 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
171 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
172 ... Check Remote System Reachability True ${olt_ssh_ip}
173 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
174 ... Validate OLT Device ENABLED ACTIVE
175 ... REACHABLE ${olt_serial_number}
176 END
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530177 # Waiting extra time for the ONUs to come up
178 Sleep 60s
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530179 Run Keyword If ${has_dataplane} Clean Up Linux
180 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
181
TorstenThiemeed3332f2021-02-02 10:30:48 +0000182Verify restart openonu-adapter container after subscriber provisioning for DT
183 [Documentation] Restart openonu-adapter container after VOLTHA is operational.
184 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlass43531332021-05-19 07:07:03 +0000185 [Tags] functionalDt Restart-OpenOnu-Dt soak
TorstenThiemeed3332f2021-02-02 10:30:48 +0000186 [Setup] Start Logging Restart-OpenOnu-Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000187 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
TorstenThiemeed3332f2021-02-02 10:30:48 +0000188 ... AND Stop Logging Restart-OpenOnu-Dt
TorstenThiemeed3332f2021-02-02 10:30:48 +0000189 # Add OLT device
Hardik Windlass3280f2d2021-05-20 07:38:31 +0000190 Run Keyword If '${SOAK_TEST}'=='False' Setup
TorstenThiemeed3332f2021-02-02 10:30:48 +0000191 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
192 Run Keyword If ${has_dataplane} Clean Up Linux
193 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
194 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
195 Log ${podStatusOutput}
196 ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
197 ${podName} Set Variable adapter-open-onu
198 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
TorstenThiemeed3332f2021-02-02 10:30:48 +0000199 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
200 ... app ${podName} Running
201 # Wait for 1 min after openonu adapter is restarted
202 Sleep 60s
203 Run Keyword If ${has_dataplane} Clean Up Linux
204 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
TorstenThiemeed3332f2021-02-02 10:30:48 +0000205 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
206 Log ${podStatusOutput}
207 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
208 Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart}
209 Log to console Pod ${podName} restarted and sanity checks passed successfully
Hardik Windlass3280f2d2021-05-20 07:38:31 +0000210 Run Keyword If '${SOAK_TEST}'=='False' Delete All Devices and Verify
TorstenThiemeed3332f2021-02-02 10:30:48 +0000211
Hardik Windlass9df139e2020-04-24 14:54:54 +0530212Verify restart openolt-adapter container after subscriber provisioning for DT
213 [Documentation] Restart openolt-adapter container after VOLTHA is operational.
214 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlass43531332021-05-19 07:07:03 +0000215 [Tags] functionalDt Restart-OpenOlt-Dt soak
Hardik Windlass9df139e2020-04-24 14:54:54 +0530216 [Setup] Start Logging Restart-OpenOlt-Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000217 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlass9df139e2020-04-24 14:54:54 +0530218 ... AND Stop Logging Restart-OpenOlt-Dt
219 # Add OLT device
Hardik Windlass3280f2d2021-05-20 07:38:31 +0000220 Run Keyword If '${SOAK_TEST}'=='False' setup
Hardik Windlass9df139e2020-04-24 14:54:54 +0530221 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
222 Run Keyword If ${has_dataplane} Clean Up Linux
223 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Hardik Windlass9df139e2020-04-24 14:54:54 +0530224 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
225 Log ${podStatusOutput}
226 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Andrea Campanella3dcce272021-01-15 16:04:47 +0100227 ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530228 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530229 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
230 ... app ${podName} Running
TorstenThiemeed3332f2021-02-02 10:30:48 +0000231 # Wait for 1 min after openolt adapter is restarted
Hardik Windlass9df139e2020-04-24 14:54:54 +0530232 Sleep 60s
233 Run Keyword If ${has_dataplane} Clean Up Linux
234 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Hardik Windlass9df139e2020-04-24 14:54:54 +0530235 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
236 Log ${podStatusOutput}
237 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
238 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
239 Log to console Pod ${podName} restarted and sanity checks passed successfully
240
241Verify openolt adapter restart before subscriber provisioning for DT
242 [Documentation] Deploys an device instance and waits for it to authenticate. After
243 ... authentication is successful the rw-core deployment is scaled to 0 instances to
244 ... simulate a POD crash. The test then scales the rw-core back to a single instance
245 ... and configures ONOS for access. The test succeeds if the device is able to
246 ... complete the DHCP sequence.
Hardik Windlass4ed54502021-05-14 07:34:15 +0000247 [Tags] functionalDt olt-adapter-restart-Dt soak
Hardik Windlass9df139e2020-04-24 14:54:54 +0530248 [Setup] Start Logging OltAdapterRestart-Dt
249 #... AND Clear All Devices Then Create New Device
Hardik Windlass43531332021-05-19 07:07:03 +0000250 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlass9df139e2020-04-24 14:54:54 +0530251 ... AND Stop Logging OltAdapterRestart-Dt
252 # Add OLT and perform sanity test
253 #setup
254 Run Keyword If ${has_dataplane} Clean Up Linux
255 #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
256 Set Global Variable ${of_id}
257
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800258 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530259 ${src}= Set Variable ${hosts.src[${I}]}
260 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800261 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530262 ${onu_device_id}= Get Device ID From SN ${src['onu']}
263 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
264 ... ${of_id}
265 # Bring up the device and verify it authenticates
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700266 Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE
Hardik Windlass8b446492021-06-10 06:25:23 +0000267 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed by_dev_id=True
Hardik Windlass9df139e2020-04-24 14:54:54 +0530268 END
269 # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1
Andrea Campanella3dcce272021-01-15 16:04:47 +0100270 Scale K8s Deployment by Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 0
271 Wait Until Keyword Succeeds ${timeout} 2s Pods Do Not Exist By Label ${NAMESPACE} app
272 ... ${OLT_ADAPTER_APP_LABEL}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530273 # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back
Andrea Campanella3dcce272021-01-15 16:04:47 +0100274 Scale K8s Deployment by Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530275 Wait Until Keyword Succeeds ${timeout} 2s
Andrea Campanella3dcce272021-01-15 16:04:47 +0100276 ... Check Expected Available Deployment Replicas By Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530277
278 # Ensure the device is available in ONOS, this represents system connectivity being restored
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800279 FOR ${I} IN RANGE 0 ${olt_count}
280 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
281 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
282 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
283 ... ${olt_serial_number}
284 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
285 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
286 END
Hardik Windlass9df139e2020-04-24 14:54:54 +0530287
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800288 FOR ${I} IN RANGE 0 ${num_all_onus}
289 ${src}= Set Variable ${hosts.src[${I}]}
290 ${dst}= Set Variable ${hosts.dst[${I}]}
291 ${of_id}= Get ofID From OLT List ${src['olt']}
292 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
293 ... ${of_id}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530294 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
TorstenThieme4e2168e2021-06-22 14:01:47 +0000295 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530296 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
297 # Verify subscriber access flows are added for the ONU port
298 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
299 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
300 ... ${onu_port} ${nni_port} ${src['s_tag']}
301 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
302 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
303 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
304 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
305 ... ${dst['container_name']}
306 END
307
308Verify restart ofagent container after subscriber is provisioned for DT
309 [Documentation] Restart ofagent container after VOLTHA is operational.
310 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlass4ed54502021-05-14 07:34:15 +0000311 [Tags] functionalDt ofagentRestart-Dt soak
Hardik Windlass9df139e2020-04-24 14:54:54 +0530312 [Setup] Start Logging ofagentRestart-Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000313 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlass9df139e2020-04-24 14:54:54 +0530314 ... AND Stop Logging ofagentRestart-Dt
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530315 ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530316 # set timeout value
317 ${waitforRestart} Set Variable 120s
318 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
319 Log ${podStatusOutput}
320 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
321 ${podName} Set Variable ofagent
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530322 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530323 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
324 ... app ${podName} Running
Hardik Windlass5e214b22021-02-26 10:37:14 +0000325 Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530326 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
327 Run Keyword If ${has_dataplane} Clean Up Linux
328 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
329 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
330 Log ${podStatusOutput}
331 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
332 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
333 # Scale Down the Of-Agent Deployment
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530334 Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 0
Hardik Windlass9df139e2020-04-24 14:54:54 +0530335 Sleep 30s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800336 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530337 ${src}= Set Variable ${hosts.src[${I}]}
338 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800339 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530340 ${onu_device_id}= Get Device ID From SN ${src['onu']}
341 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
342 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
343 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700344 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
Hardik Windlass9df139e2020-04-24 14:54:54 +0530345 ... ENABLED ACTIVE REACHABLE
346 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
347 # Check ONU port is Disabled in ONOS
348 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
Hardik Windlass39015672021-07-05 05:48:08 +0000349 ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530350 # Verify subscriber access flows are added for the ONU port
351 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
352 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
353 ... ${onu_port} ${nni_port} ${src['s_tag']}
354 # Verify Ping
355 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Check Ping True
356 ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']}
357 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530358 END
359 # Scale Up the Of-Agent Deployment
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530360 Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530361 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE}
362 ... Running
363 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
364 Run Keyword If ${has_dataplane} Clean Up Linux
365 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
366 Log to console Pod ${podName} restarted and sanity checks passed successfully
367
368Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart for DT
369 [Documentation] Deploys an device instance and waits for it to authenticate. After
370 ... authentication is successful the rw-core deployment is scaled to 0 instances to
371 ... simulate a POD crash. The test then scales the rw-core back to a single instance
372 ... and configures ONOS for access. The test succeeds if the device is able to
373 ... complete the DHCP sequence.
Hardik Windlass43531332021-05-19 07:07:03 +0000374 [Tags] functionalDt rwcore-restart-Dt
Hardik Windlass9df139e2020-04-24 14:54:54 +0530375 [Setup] Run Keywords Start Logging RwCoreFailAndRestart-Dt
376 ... AND Clear All Devices Then Create New Device
Hardik Windlass43531332021-05-19 07:07:03 +0000377 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlass9df139e2020-04-24 14:54:54 +0530378 ... AND Stop Logging RwCoreFailAndRestart-Dt
379 #... AND Delete Device and Verify
Hardik Windlass9df139e2020-04-24 14:54:54 +0530380 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800381 FOR ${I} IN RANGE 0 ${olt_count}
382 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
383 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
384 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
385 ... ${olt_serial_number}
386 ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
387 ... Get NNI Port in ONOS ${of_id}
388 # Set Global Variable ${nni_port}
389 END
390 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530391 ${src}= Set Variable ${hosts.src[${I}]}
392 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800393 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530394 ${onu_device_id}= Get Device ID From SN ${src['onu']}
395 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
396 ... ${of_id}
397 # Bring up the device and verify it authenticates
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700398 Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE
Hardik Windlass8b446492021-06-10 06:25:23 +0000399 ... ${onu_device_id} onu=True onu_reason=initial-mib-downloaded by_dev_id=True
Hardik Windlass9df139e2020-04-24 14:54:54 +0530400 END
401
402 # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530403 Scale K8s Deployment voltha voltha-voltha-rw-core 0
404 Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-voltha-rw-core
Hardik Windlass9df139e2020-04-24 14:54:54 +0530405 # Ensure the ofagent POD goes "not-ready" as expected
406 Wait Until keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530407 ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 0
Hardik Windlass9df139e2020-04-24 14:54:54 +0530408 # Scale up the core deployment and make sure both it and the ofagent deployment are back
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530409 Scale K8s Deployment voltha voltha-voltha-rw-core 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530410 Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530411 ... Check Expected Available Deployment Replicas voltha voltha-voltha-rw-core 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530412 Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530413 ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530414 # For some reason scaling down and up the POD behind a service causes the port forward to stop working,
415 # so restart the port forwarding for the API service
David Bainbridge07321ff2020-06-12 13:55:42 -0700416 Restart VOLTHA Port Forward voltha-api
Hardik Windlass9df139e2020-04-24 14:54:54 +0530417 # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this
418 # represents system connectivity being restored
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800419 FOR ${I} IN RANGE 0 ${olt_count}
420 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
421 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
422 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
423 ... ${olt_serial_number}
Girish Gowdrae4de3b32021-03-23 22:20:00 -0700424 Wait Until Keyword Succeeds 120s 2s Device Is Available In ONOS
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800425 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
426 END
Hardik Windlass9df139e2020-04-24 14:54:54 +0530427
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800428 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Bavier52094622020-05-12 15:54:24 -0700429 ${src}= Set Variable ${hosts.src[${I}]}
430 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800431 ${of_id}= Get ofID From OLT List ${src['olt']}
Andy Bavier52094622020-05-12 15:54:24 -0700432 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
433 ... ${of_id}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530434 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
TorstenThieme4e2168e2021-06-22 14:01:47 +0000435 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530436 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
437 # Verify subscriber access flows are added for the ONU port
438 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
439 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
440 ... ${onu_port} ${nni_port} ${src['s_tag']}
441 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
442 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
443 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
444 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
445 ... ${dst['container_name']}
446 END
447
Hemadf003682020-04-28 21:22:22 +0530448Verify OLT Soft Reboot for DT
449 [Documentation] Test soft reboot of the OLT using voltctl command
Hardik Windlass20a503d2021-06-21 11:58:08 +0000450 [Tags] VOL-2818 OLTSoftRebootDt functionalDt
Hemadf003682020-04-28 21:22:22 +0530451 [Setup] Start Logging OLTSoftRebootDt
Hardik Windlass20a503d2021-06-21 11:58:08 +0000452 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hemadf003682020-04-28 21:22:22 +0530453 ... AND Stop Logging OLTSoftRebootDt
Hardik Windlass20a503d2021-06-21 11:58:08 +0000454 FOR ${I} IN RANGE 0 ${olt_count}
455 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
456 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
457 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
458 ... Validate OLT Device ENABLED ACTIVE
459 ... REACHABLE ${olt_serial_number}
460 # Reboot the OLT using "voltctl device reboot" command
461 Reboot Device ${olt_device_id}
462 # Wait for the OLT to actually go down
463 Wait Until Keyword Succeeds 360s 5s Validate OLT Device ENABLED UNKNOWN UNREACHABLE
464 ... ${olt_serial_number}
465 END
Hemadf003682020-04-28 21:22:22 +0530466 #Verify that ping fails
Hardik Windlass20a503d2021-06-21 11:58:08 +0000467 FOR ${I} IN RANGE 0 ${num_all_onus}
Hemadf003682020-04-28 21:22:22 +0530468 ${src}= Set Variable ${hosts.src[${I}]}
469 ${dst}= Set Variable ${hosts.dst[${I}]}
470 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
471 ... Wait Until Keyword Succeeds 60s 2s
472 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
473 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
474 END
Hardik Windlass20a503d2021-06-21 11:58:08 +0000475 # Check OLT states
476 FOR ${I} IN RANGE 0 ${olt_count}
477 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
478 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
479 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
480 # Wait for the OLT to come back up
481 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
482 ... Check Remote System Reachability True ${olt_ssh_ip}
483 # Check OLT states
484 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
485 ... Validate OLT Device ENABLED ACTIVE
486 ... REACHABLE ${olt_serial_number}
487 END
Hemadf003682020-04-28 21:22:22 +0530488 # Waiting extra time for the ONUs to come up
489 Sleep 60s
Hardik Windlass20a503d2021-06-21 11:58:08 +0000490 #Check after reboot that ONUs are active, DHCP/pingable
Hemadf003682020-04-28 21:22:22 +0530491 Run Keyword If ${has_dataplane} Clean Up Linux
492 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
493
Hema8c1a0322020-05-26 16:02:32 +0530494Verify ONU Soft Reboot for DT
495 [Documentation] Test soft reboot of the ONU using voltctl command
496 [Tags] VOL-2820 ONUSoftRebootDt notready
497 [Setup] Start Logging ONUSoftRebootDt
498 #... AND Setup
499 [Teardown] Run Keywords Collect Logs
500 ... AND Stop Logging ONUSoftRebootDt
501 #... AND Delete Device and Verify
Hema8c1a0322020-05-26 16:02:32 +0530502 #Reboot the ONU and verify that ping fails
503 FOR ${I} IN RANGE 0 ${num_onus}
504 ${src}= Set Variable ${hosts.src[${I}]}
505 ${dst}= Set Variable ${hosts.dst[${I}]}
506 ${onu_device_id}= Get Device ID From SN ${src['onu']}
507 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
508 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
509 Reboot Device ${onu_device_id}
510 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
511 ... Wait Until Keyword Succeeds 60s 2s
512 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
513 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
514 Verify ping is succesful except for given device ${num_onus} ${onu_device_id}
515 # Remove Subscriber Access (To replicate DT workflow)
TorstenThieme4e2168e2021-06-22 14:01:47 +0000516 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hema8c1a0322020-05-26 16:02:32 +0530517 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
518 # Delete ONU Device (To replicate DT workflow)
519 Delete Device ${onu_device_id}
520 Sleep 40s
521 # Check ONU port is Enabled in ONOS
522 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
Hardik Windlass39015672021-07-05 05:48:08 +0000523 ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hema8c1a0322020-05-26 16:02:32 +0530524 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
TorstenThieme4e2168e2021-06-22 14:01:47 +0000525 ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Hema8c1a0322020-05-26 16:02:32 +0530526 ... volt-add-subscriber-access ${of_id} ${onu_port}
527 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700528 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
Hema8c1a0322020-05-26 16:02:32 +0530529 ... ENABLED ACTIVE REACHABLE
530 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
531 # Verify subscriber access flows are added for the ONU port
532 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
533 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
534 ... ${onu_port} ${nni_port} ${src['s_tag']}
535 #Run Keyword If ${has_dataplane} Clean Up Linux
536 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
537 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
538 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
539 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
540 ... ${dst['container_name']}
Hema8c1a0322020-05-26 16:02:32 +0530541 END
542 # Verify ONOS Flows
543 # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
544 ${onos_flows_count}= Evaluate 4 * ${num_onus}
545 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
546 ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
547 ... ${of_id} ${onos_flows_count}
548 # Verify VOLTHA Flows
549 # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
550 ${olt_flows}= Evaluate 2 * ${num_onus} + 1
551 # Number of per ONU Flows equals 2 (one each for downstream and upstream)
552 ${onu_flows}= Set Variable 2
553 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
554 ${List_ONU_Serial} Create List
555 Set Suite Variable ${List_ONU_Serial}
556 Build ONU SN List ${List_ONU_Serial}
557 Log ${List_ONU_Serial}
558 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
559 ... ${List_ONU_Serial} ${onu_flows}
Hemadf003682020-04-28 21:22:22 +0530560
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530561*** Keywords ***
562Setup Suite
563 [Documentation] Set up the test suite
564 Common Test Suite Setup
Andrea Campanella15619c72020-04-30 09:48:04 +0200565 #power_switch.robot needs it to support different vendor's power switch
566 ${switch_type}= Get Variable Value ${web_power_switch.type}
567 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
Hardik Windlass4ed54502021-05-14 07:34:15 +0000568 # Run Pre-test Setup for Soak Job
569 # Note: As soak requirement, it expects that the devices under test are already created and enabled
570 Run Keyword If '${SOAK_TEST}'=='True' Setup Soak
571
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530572
573Clear All Devices Then Create New Device
574 [Documentation] Remove any devices from VOLTHA and ONOS
575 # Remove all devices from voltha and nos
576 Delete All Devices and Verify
577 # Execute normal test Setup Keyword
578 Setup
579