blob: fcde3bc16cfd53c6aeb80f7585e7eaf7eb3ec3b0 [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
Hardik Windlass4288c6a2021-09-28 07:22:06 +000045${INFRA_NAMESPACE} default
Matteo Scandoloa4e59522021-08-31 14:56:24 -070046${STACK_NAME} voltha
Hardik Windlassb9bdd502020-04-17 14:46:21 +053047# For below variable value, using deployment name as using grep for
48# parsing radius pod name, we can also use full radius pod name
49${RESTART_POD_NAME} radius
50${timeout} 60s
51${of_id} 0
52${logical_id} 0
53${has_dataplane} True
54${teardown_device} False
55${scripts} ../../scripts
56
57# Per-test logging on failure is turned off by default; set this variable to enable
58${container_log_dir} ${None}
59
Hardik Windlass43531332021-05-19 07:07:03 +000060# logging flag to enable Collect Logs, can be passed via the command line too
61# example: -v logging:False
62${logging} True
63
Hardik Windlass4ed54502021-05-14 07:34:15 +000064# Flag specific to Soak Jobs
65${SOAK_TEST} False
66
Hardik Windlassb9bdd502020-04-17 14:46:21 +053067*** Test Cases ***
68Verify ONU after Rebooting Physically for DT
69 [Documentation] Test the ONU functionality by physically turning on/off ONU.
70 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
71 ... Test case runs only on the PODs that are configured with PowerSwitch that
72 ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot)
73 [Tags] functionalDt PowerSwitchOnuRebootDt VOL-2819 PowerSwitch
Hardik Windlass9df139e2020-04-24 14:54:54 +053074 [Setup] Start Logging RebootOnu_PowerSwitch_Dt
Hardik Windlass43531332021-05-19 07:07:03 +000075 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080076 ... AND Delete All Devices and Verify
Girish Gowdraf244d5b2021-09-01 17:16:16 -070077 ... AND Run Keyword If ${logging} Collect Logs
78 ... AND Stop Logging RebootOnu_PowerSwitch_Dt
Hardik Windlassb9bdd502020-04-17 14:46:21 +053079 # Add OLT device
80 Setup
81 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
82 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +000083 Perform Sanity Test DT
Hardik Windlassb9bdd502020-04-17 14:46:21 +053084 Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password}
Hardik Windlass2eb47182020-05-19 20:24:12 +053085 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080086 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlassb9bdd502020-04-17 14:46:21 +053087 ${src}= Set Variable ${hosts.src[${I}]}
88 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080089 ${of_id}= Get ofID From OLT List ${src['olt']}
TorstenThiemedda37652021-11-11 16:22:05 +000090 ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
Hardik Windlass0560f802020-05-06 23:06:53 +053091 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +000092 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s
Emrehan UZUNabef5182021-11-26 10:54:24 +000093 ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
Girish Gowdraa3a05c62022-02-16 13:54:37 -080094 # If the power switch port is not specified, continue
95 Continue For Loop If '${src["power_switch_port"]}' == '${None}'
Hardik Windlass7c801e62020-05-04 19:33:21 +053096 # Disable Power Switch
Hardik Windlassb9bdd502020-04-17 14:46:21 +053097 Disable Switch Outlet ${src['power_switch_port']}
98 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +000099 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530100 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
101 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530102 # Remove Subscriber Access (To replicate DT workflow)
TorstenThieme4e2168e2021-06-22 14:01:47 +0000103 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530104 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Girish Gowdrae0c711e2021-07-20 14:30:17 -0700105 # Allow the remove subscriber command to clean up all the flows, schedulers and queues before deleting the device
Girish Gowdrab6830612021-10-18 17:11:23 -0700106 Sleep 30s
Hardik Windlass7c801e62020-05-04 19:33:21 +0530107 # Delete ONU Device (To replicate DT workflow)
108 Delete Device ${onu_device_id}
109 Sleep 5s
110 # Enable Power Switch
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530111 Enable Switch Outlet ${src['power_switch_port']}
112 # Check ONU port is Enabled in ONOS
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000113 Wait Until Keyword Succeeds 120s 5s
Emrehan UZUNabef5182021-11-26 10:54:24 +0000114 ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000115 Wait Until Keyword Succeeds ${timeout} 2
TorstenThieme4e2168e2021-06-22 14:01:47 +0000116 ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530117 ... volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530118 # Verify ONU state in voltha
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000119 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530120 ... ENABLED ACTIVE REACHABLE
Hardik Windlass7c801e62020-05-04 19:33:21 +0530121 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530122 # Verify subscriber access flows are added for the ONU port
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000123 Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530124 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
125 ... ${onu_port} ${nni_port} ${src['s_tag']}
Hardik Windlass2eb47182020-05-19 20:24:12 +0530126 #Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass7c801e62020-05-04 19:33:21 +0530127 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
128 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530129 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530130 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
131 ... ${dst['container_name']}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530132 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800133 # Verify flows for all OLTs
134 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530135
136Verify OLT after Rebooting Physically for DT
137 [Documentation] Test the physical reboot of the OLT
138 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
139 ... Test performs a physical reboot, performs "reboot" from the OLT CLI
140 [Tags] functionalDt PhysicalOltRebootDt VOL-2817
Hardik Windlass9df139e2020-04-24 14:54:54 +0530141 [Setup] Start Logging RebootOlt_Physical_Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000142 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800143 ... AND Delete All Devices and Verify
Girish Gowdraf244d5b2021-09-01 17:16:16 -0700144 ... AND Run Keyword If ${logging} Collect Logs
145 ... AND Stop Logging RebootOlt_Physical_Dt
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530146 # Add OLT device
147 Setup
148 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
149 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000150 Perform Sanity Test DT
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530151 # Reboot the OLT from the OLT CLI
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800152 FOR ${I} IN RANGE 0 ${olt_count}
153 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
154 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
155 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
156 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
157 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
158 Run Keyword If ${has_dataplane} Login And Run Command On Remote System
Andrea Campanella5ef88142021-02-02 14:34:50 +0100159 ... reboot ${olt_ssh_ip} ${olt_user} ${olt_pass} prompt=#
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800160 END
161 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530162 ${src}= Set Variable ${hosts.src[${I}]}
163 ${dst}= Set Variable ${hosts.dst[${I}]}
164 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000165 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530166 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
167 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
168 END
169 # Wait for the OLT to come back up
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800170 FOR ${I} IN RANGE 0 ${olt_count}
171 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
172 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
173 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
174 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
175 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
176 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
177 ... Check Remote System Reachability True ${olt_ssh_ip}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000178 Wait Until Keyword Succeeds 360s 5s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800179 ... Validate OLT Device ENABLED ACTIVE
180 ... REACHABLE ${olt_serial_number}
181 END
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530182 # Waiting extra time for the ONUs to come up
183 Sleep 60s
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530184 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000185 Perform Sanity Test DT
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530186
TorstenThiemeed3332f2021-02-02 10:30:48 +0000187Verify restart openonu-adapter container after subscriber provisioning for DT
188 [Documentation] Restart openonu-adapter container after VOLTHA is operational.
189 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000190 [Tags] Restart-OpenOnu-Dt soak
TorstenThiemeed3332f2021-02-02 10:30:48 +0000191 [Setup] Start Logging Restart-OpenOnu-Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000192 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
TorstenThiemeed3332f2021-02-02 10:30:48 +0000193 ... AND Stop Logging Restart-OpenOnu-Dt
TorstenThiemeed3332f2021-02-02 10:30:48 +0000194 # Add OLT device
Hardik Windlass3280f2d2021-05-20 07:38:31 +0000195 Run Keyword If '${SOAK_TEST}'=='False' Setup
TorstenThiemeed3332f2021-02-02 10:30:48 +0000196 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
197 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000198 Perform Sanity Test DT
TorstenThiemeed3332f2021-02-02 10:30:48 +0000199 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
200 Log ${podStatusOutput}
201 ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
202 ${podName} Set Variable adapter-open-onu
203 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
TorstenThiemeed3332f2021-02-02 10:30:48 +0000204 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
205 ... app ${podName} Running
206 # Wait for 1 min after openonu adapter is restarted
207 Sleep 60s
208 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000209 Perform Sanity Test DT
TorstenThiemeed3332f2021-02-02 10:30:48 +0000210 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
211 Log ${podStatusOutput}
212 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
213 Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart}
214 Log to console Pod ${podName} restarted and sanity checks passed successfully
Hardik Windlass3280f2d2021-05-20 07:38:31 +0000215 Run Keyword If '${SOAK_TEST}'=='False' Delete All Devices and Verify
TorstenThiemeed3332f2021-02-02 10:30:48 +0000216
Hardik Windlass9df139e2020-04-24 14:54:54 +0530217Verify restart openolt-adapter container after subscriber provisioning for DT
218 [Documentation] Restart openolt-adapter container after VOLTHA is operational.
219 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000220 [Tags] Restart-OpenOlt-Dt soak
Hardik Windlass9df139e2020-04-24 14:54:54 +0530221 [Setup] Start Logging Restart-OpenOlt-Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000222 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlass9df139e2020-04-24 14:54:54 +0530223 ... AND Stop Logging Restart-OpenOlt-Dt
224 # Add OLT device
Hardik Windlass3280f2d2021-05-20 07:38:31 +0000225 Run Keyword If '${SOAK_TEST}'=='False' setup
Hardik Windlass9df139e2020-04-24 14:54:54 +0530226 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
227 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000228 Perform Sanity Test DT
Hardik Windlass9df139e2020-04-24 14:54:54 +0530229 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
230 Log ${podStatusOutput}
231 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Andrea Campanella3dcce272021-01-15 16:04:47 +0100232 ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530233 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530234 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
235 ... app ${podName} Running
TorstenThiemeed3332f2021-02-02 10:30:48 +0000236 # Wait for 1 min after openolt adapter is restarted
Hardik Windlass9df139e2020-04-24 14:54:54 +0530237 Sleep 60s
238 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000239 Perform Sanity Test DT
Hardik Windlass9df139e2020-04-24 14:54:54 +0530240 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
241 Log ${podStatusOutput}
242 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
243 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
244 Log to console Pod ${podName} restarted and sanity checks passed successfully
245
246Verify openolt adapter restart before subscriber provisioning for DT
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000247 [Documentation] Restart openolt-adapter container before adding the subscriber.
248 [Tags] functionalDt olt-adapter-restart-Dt
Hardik Windlass9df139e2020-04-24 14:54:54 +0530249 [Setup] Start Logging OltAdapterRestart-Dt
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
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000252 # Add OLT device
253 Clear All Devices Then Create New Device
Hardik Windlass9df139e2020-04-24 14:54:54 +0530254 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass9df139e2020-04-24 14:54:54 +0530255 Set Global Variable ${of_id}
256
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800257 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530258 ${src}= Set Variable ${hosts.src[${I}]}
259 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800260 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530261 ${onu_device_id}= Get Device ID From SN ${src['onu']}
262 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
Emrehan UZUNabef5182021-11-26 10:54:24 +0000263 ... ${of_id} ${src['uni_id']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000264 Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000265 ... Validate Device ENABLED ACTIVE REACHABLE
266 ... ${onu_device_id} onu=True onu_reason=initial-mib-downloaded by_dev_id=True
Hardik Windlass9df139e2020-04-24 14:54:54 +0530267 END
268 # 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 +0100269 Scale K8s Deployment by Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 0
270 Wait Until Keyword Succeeds ${timeout} 2s Pods Do Not Exist By Label ${NAMESPACE} app
271 ... ${OLT_ADAPTER_APP_LABEL}
Hardik Windlass713c0a62022-04-04 05:33:31 +0000272 Sleep 10s
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 Windlass713c0a62022-04-04 05:33:31 +0000277 Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530278
279 # Ensure the device is available in ONOS, this represents system connectivity being restored
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800280 FOR ${I} IN RANGE 0 ${olt_count}
281 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
282 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
283 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
284 ... ${olt_serial_number}
285 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
286 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
287 END
Hardik Windlass9df139e2020-04-24 14:54:54 +0530288
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800289 FOR ${I} IN RANGE 0 ${num_all_onus}
290 ${src}= Set Variable ${hosts.src[${I}]}
291 ${dst}= Set Variable ${hosts.dst[${I}]}
292 ${of_id}= Get ofID From OLT List ${src['olt']}
TorstenThiemedda37652021-11-11 16:22:05 +0000293 ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800294 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
Emrehan UZUNabef5182021-11-26 10:54:24 +0000295 ... ${of_id} ${src['uni_id']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530296 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
TorstenThieme4e2168e2021-06-22 14:01:47 +0000297 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530298 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlass713c0a62022-04-04 05:33:31 +0000299 # Verify Meters in ONOS
300 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
301 ... Verify Meters in ONOS Ietf ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530302 # Verify subscriber access flows are added for the ONU port
303 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
304 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
305 ... ${onu_port} ${nni_port} ${src['s_tag']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000306 Wait Until Keyword Succeeds ${timeout} 5s Validate Device
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000307 ... ENABLED ACTIVE REACHABLE
308 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlass9df139e2020-04-24 14:54:54 +0530309 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
310 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
311 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
312 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
313 ... ${dst['container_name']}
314 END
315
316Verify restart ofagent container after subscriber is provisioned for DT
317 [Documentation] Restart ofagent container after VOLTHA is operational.
318 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlass4ed54502021-05-14 07:34:15 +0000319 [Tags] functionalDt ofagentRestart-Dt soak
Hardik Windlass9df139e2020-04-24 14:54:54 +0530320 [Setup] Start Logging ofagentRestart-Dt
Hardik Windlass43531332021-05-19 07:07:03 +0000321 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlass9df139e2020-04-24 14:54:54 +0530322 ... AND Stop Logging ofagentRestart-Dt
Matteo Scandoloa4e59522021-08-31 14:56:24 -0700323 ... AND Scale K8s Deployment ${NAMESPACE} ${STACK_NAME}-voltha-ofagent 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530324 # set timeout value
325 ${waitforRestart} Set Variable 120s
326 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
327 Log ${podStatusOutput}
328 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
329 ${podName} Set Variable ofagent
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530330 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530331 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
332 ... app ${podName} Running
Hardik Windlass5e214b22021-02-26 10:37:14 +0000333 Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530334 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
335 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000336 Perform Sanity Test DT
Hardik Windlass9df139e2020-04-24 14:54:54 +0530337 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
338 Log ${podStatusOutput}
339 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
340 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
341 # Scale Down the Of-Agent Deployment
Matteo Scandoloa4e59522021-08-31 14:56:24 -0700342 Scale K8s Deployment ${NAMESPACE} ${STACK_NAME}-voltha-ofagent 0
Hardik Windlass9df139e2020-04-24 14:54:54 +0530343 Sleep 30s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800344 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530345 ${src}= Set Variable ${hosts.src[${I}]}
346 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800347 ${of_id}= Get ofID From OLT List ${src['olt']}
TorstenThiemedda37652021-11-11 16:22:05 +0000348 ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530349 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000350 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s
Emrehan UZUNabef5182021-11-26 10:54:24 +0000351 ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530352 # Verify ONU state in voltha
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000353 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
Hardik Windlass9df139e2020-04-24 14:54:54 +0530354 ... ENABLED ACTIVE REACHABLE
355 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
356 # Check ONU port is Disabled in ONOS
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000357 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
Emrehan UZUNabef5182021-11-26 10:54:24 +0000358 ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530359 # Verify subscriber access flows are added for the ONU port
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000360 Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlass9df139e2020-04-24 14:54:54 +0530361 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
362 ... ${onu_port} ${nni_port} ${src['s_tag']}
363 # Verify Ping
364 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Check Ping True
365 ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']}
366 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530367 END
368 # Scale Up the Of-Agent Deployment
Matteo Scandoloa4e59522021-08-31 14:56:24 -0700369 Scale K8s Deployment ${NAMESPACE} ${STACK_NAME}-voltha-ofagent 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530370 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE}
371 ... Running
372 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
373 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000374 Perform Sanity Test DT
Hardik Windlass9df139e2020-04-24 14:54:54 +0530375 Log to console Pod ${podName} restarted and sanity checks passed successfully
376
377Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart for DT
378 [Documentation] Deploys an device instance and waits for it to authenticate. After
379 ... authentication is successful the rw-core deployment is scaled to 0 instances to
380 ... simulate a POD crash. The test then scales the rw-core back to a single instance
381 ... and configures ONOS for access. The test succeeds if the device is able to
382 ... complete the DHCP sequence.
Hardik Windlass43531332021-05-19 07:07:03 +0000383 [Tags] functionalDt rwcore-restart-Dt
Hardik Windlass9df139e2020-04-24 14:54:54 +0530384 [Setup] Run Keywords Start Logging RwCoreFailAndRestart-Dt
385 ... AND Clear All Devices Then Create New Device
Hardik Windlass43531332021-05-19 07:07:03 +0000386 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hardik Windlass9df139e2020-04-24 14:54:54 +0530387 ... AND Stop Logging RwCoreFailAndRestart-Dt
388 #... AND Delete Device and Verify
Hardik Windlass9df139e2020-04-24 14:54:54 +0530389 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800390 FOR ${I} IN RANGE 0 ${olt_count}
391 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
392 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
393 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
394 ... ${olt_serial_number}
TorstenThiemedda37652021-11-11 16:22:05 +0000395 ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800396 END
397 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530398 ${src}= Set Variable ${hosts.src[${I}]}
399 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800400 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530401 ${onu_device_id}= Get Device ID From SN ${src['onu']}
402 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
Emrehan UZUNabef5182021-11-26 10:54:24 +0000403 ... ${of_id} ${src['uni_id']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530404 # Bring up the device and verify it authenticates
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700405 Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE
Hardik Windlass8b446492021-06-10 06:25:23 +0000406 ... ${onu_device_id} onu=True onu_reason=initial-mib-downloaded by_dev_id=True
Hardik Windlass9df139e2020-04-24 14:54:54 +0530407 END
408
409 # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530410 Scale K8s Deployment voltha voltha-voltha-rw-core 0
411 Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-voltha-rw-core
Hardik Windlass9df139e2020-04-24 14:54:54 +0530412 # Ensure the ofagent POD goes "not-ready" as expected
413 Wait Until keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530414 ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 0
Hardik Windlass9df139e2020-04-24 14:54:54 +0530415 # Scale up the core deployment and make sure both it and the ofagent deployment are back
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530416 Scale K8s Deployment voltha voltha-voltha-rw-core 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530417 Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530418 ... Check Expected Available Deployment Replicas voltha voltha-voltha-rw-core 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530419 Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530420 ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 1
Hardik Windlass9df139e2020-04-24 14:54:54 +0530421 # For some reason scaling down and up the POD behind a service causes the port forward to stop working,
422 # so restart the port forwarding for the API service
David Bainbridge07321ff2020-06-12 13:55:42 -0700423 Restart VOLTHA Port Forward voltha-api
Hardik Windlass9df139e2020-04-24 14:54:54 +0530424 # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this
425 # represents system connectivity being restored
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800426 FOR ${I} IN RANGE 0 ${olt_count}
427 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
428 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
429 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
430 ... ${olt_serial_number}
Girish Gowdrae4de3b32021-03-23 22:20:00 -0700431 Wait Until Keyword Succeeds 120s 2s Device Is Available In ONOS
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800432 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
433 END
Hardik Windlass9df139e2020-04-24 14:54:54 +0530434
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800435 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Bavier52094622020-05-12 15:54:24 -0700436 ${src}= Set Variable ${hosts.src[${I}]}
437 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800438 ${of_id}= Get ofID From OLT List ${src['olt']}
TorstenThiemedda37652021-11-11 16:22:05 +0000439 ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
Andy Bavier52094622020-05-12 15:54:24 -0700440 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
Emrehan UZUNabef5182021-11-26 10:54:24 +0000441 ... ${of_id} ${src['uni_id']}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530442 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
TorstenThieme4e2168e2021-06-22 14:01:47 +0000443 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hardik Windlass9df139e2020-04-24 14:54:54 +0530444 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
445 # Verify subscriber access flows are added for the ONU port
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000446 Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlass9df139e2020-04-24 14:54:54 +0530447 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
448 ... ${onu_port} ${nni_port} ${src['s_tag']}
449 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
450 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
451 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
452 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
453 ... ${dst['container_name']}
454 END
455
Hemadf003682020-04-28 21:22:22 +0530456Verify OLT Soft Reboot for DT
457 [Documentation] Test soft reboot of the OLT using voltctl command
Hardik Windlass20a503d2021-06-21 11:58:08 +0000458 [Tags] VOL-2818 OLTSoftRebootDt functionalDt
Hemadf003682020-04-28 21:22:22 +0530459 [Setup] Start Logging OLTSoftRebootDt
Hardik Windlass20a503d2021-06-21 11:58:08 +0000460 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
Hemadf003682020-04-28 21:22:22 +0530461 ... AND Stop Logging OLTSoftRebootDt
Hardik Windlass20a503d2021-06-21 11:58:08 +0000462 FOR ${I} IN RANGE 0 ${olt_count}
463 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
464 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
465 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
466 ... Validate OLT Device ENABLED ACTIVE
467 ... REACHABLE ${olt_serial_number}
468 # Reboot the OLT using "voltctl device reboot" command
469 Reboot Device ${olt_device_id}
470 # Wait for the OLT to actually go down
471 Wait Until Keyword Succeeds 360s 5s Validate OLT Device ENABLED UNKNOWN UNREACHABLE
472 ... ${olt_serial_number}
473 END
Hemadf003682020-04-28 21:22:22 +0530474 #Verify that ping fails
Hardik Windlass20a503d2021-06-21 11:58:08 +0000475 FOR ${I} IN RANGE 0 ${num_all_onus}
Hemadf003682020-04-28 21:22:22 +0530476 ${src}= Set Variable ${hosts.src[${I}]}
477 ${dst}= Set Variable ${hosts.dst[${I}]}
478 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000479 ... Wait Until Keyword Succeeds ${timeout} 2s
Hemadf003682020-04-28 21:22:22 +0530480 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
481 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
482 END
Hardik Windlass20a503d2021-06-21 11:58:08 +0000483 # Check OLT states
484 FOR ${I} IN RANGE 0 ${olt_count}
485 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
486 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
487 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
488 # Wait for the OLT to come back up
489 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
490 ... Check Remote System Reachability True ${olt_ssh_ip}
491 # Check OLT states
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000492 Wait Until Keyword Succeeds 360s 5s
Hardik Windlass20a503d2021-06-21 11:58:08 +0000493 ... Validate OLT Device ENABLED ACTIVE
494 ... REACHABLE ${olt_serial_number}
495 END
Hemadf003682020-04-28 21:22:22 +0530496 # Waiting extra time for the ONUs to come up
497 Sleep 60s
Hardik Windlass20a503d2021-06-21 11:58:08 +0000498 #Check after reboot that ONUs are active, DHCP/pingable
Hemadf003682020-04-28 21:22:22 +0530499 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000500 Perform Sanity Test DT
Hemadf003682020-04-28 21:22:22 +0530501
Hema8c1a0322020-05-26 16:02:32 +0530502Verify ONU Soft Reboot for DT
503 [Documentation] Test soft reboot of the ONU using voltctl command
504 [Tags] VOL-2820 ONUSoftRebootDt notready
505 [Setup] Start Logging ONUSoftRebootDt
506 #... AND Setup
507 [Teardown] Run Keywords Collect Logs
508 ... AND Stop Logging ONUSoftRebootDt
509 #... AND Delete Device and Verify
Hema8c1a0322020-05-26 16:02:32 +0530510 #Reboot the ONU and verify that ping fails
511 FOR ${I} IN RANGE 0 ${num_onus}
512 ${src}= Set Variable ${hosts.src[${I}]}
513 ${dst}= Set Variable ${hosts.dst[${I}]}
TorstenThiemedda37652021-11-11 16:22:05 +0000514 ${of_id}= Get ofID From OLT List ${src['olt']}
515 ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
Hema8c1a0322020-05-26 16:02:32 +0530516 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000517 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s
Emrehan UZUNabef5182021-11-26 10:54:24 +0000518 ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']}
Hema8c1a0322020-05-26 16:02:32 +0530519 Reboot Device ${onu_device_id}
520 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000521 ... Wait Until Keyword Succeeds ${timeout} 2s
Hema8c1a0322020-05-26 16:02:32 +0530522 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
523 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlassb75cf1b2021-01-18 06:59:09 +0000524 Verify ping is successful except for given device ${num_onus} ${src['onu']}
Hema8c1a0322020-05-26 16:02:32 +0530525 # Remove Subscriber Access (To replicate DT workflow)
TorstenThieme4e2168e2021-06-22 14:01:47 +0000526 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
Hema8c1a0322020-05-26 16:02:32 +0530527 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
528 # Delete ONU Device (To replicate DT workflow)
529 Delete Device ${onu_device_id}
530 Sleep 40s
531 # Check ONU port is Enabled in ONOS
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000532 Wait Until Keyword Succeeds ${timeout} 2s
Emrehan UZUNabef5182021-11-26 10:54:24 +0000533 ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000534 Wait Until Keyword Succeeds ${timeout} 2
TorstenThieme4e2168e2021-06-22 14:01:47 +0000535 ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Hema8c1a0322020-05-26 16:02:32 +0530536 ... volt-add-subscriber-access ${of_id} ${onu_port}
537 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700538 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
Hema8c1a0322020-05-26 16:02:32 +0530539 ... ENABLED ACTIVE REACHABLE
540 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
541 # Verify subscriber access flows are added for the ONU port
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000542 Wait Until Keyword Succeeds ${timeout} 5s
Hema8c1a0322020-05-26 16:02:32 +0530543 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
544 ... ${onu_port} ${nni_port} ${src['s_tag']}
545 #Run Keyword If ${has_dataplane} Clean Up Linux
546 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
547 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
548 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
549 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
550 ... ${dst['container_name']}
Hema8c1a0322020-05-26 16:02:32 +0530551 END
552 # Verify ONOS Flows
553 # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
554 ${onos_flows_count}= Evaluate 4 * ${num_onus}
555 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
556 ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
557 ... ${of_id} ${onos_flows_count}
558 # Verify VOLTHA Flows
559 # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
560 ${olt_flows}= Evaluate 2 * ${num_onus} + 1
561 # Number of per ONU Flows equals 2 (one each for downstream and upstream)
562 ${onu_flows}= Set Variable 2
563 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
564 ${List_ONU_Serial} Create List
565 Set Suite Variable ${List_ONU_Serial}
566 Build ONU SN List ${List_ONU_Serial}
567 Log ${List_ONU_Serial}
568 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
569 ... ${List_ONU_Serial} ${onu_flows}
Hemadf003682020-04-28 21:22:22 +0530570
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000571Verify restart openonu-adapter container for DT
Hardik Windlassd19af862021-08-12 11:40:20 +0000572 [Documentation] Restart openonu-adapter container after VOLTHA is operational.
573 ... Run the ping continuously in background during container restart,
574 ... and verify that there should be no affect on the dataplane.
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000575 ... Also, verify that the voltha control plane functionality is not affected.
576 [Tags] functionalDt RestartOpenOnuPingDt
Hardik Windlassd19af862021-08-12 11:40:20 +0000577 [Setup] Start Logging RestartOpenOnuPingDt
578 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
579 ... AND Stop Logging RestartOpenOnuPingDt
580 Clear All Devices Then Create New Device
581 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
582 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000583 Perform Sanity Test DT
Hardik Windlassd19af862021-08-12 11:40:20 +0000584 FOR ${I} IN RANGE 0 ${num_all_onus}
585 ${src}= Set Variable ${hosts.src[${I}]}
586 ${dst}= Set Variable ${hosts.dst[${I}]}
587 ${ping_output_file}= Set Variable /tmp/${src['onu']}_ping
588 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000589 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassd19af862021-08-12 11:40:20 +0000590 ... Run Ping In Background ${ping_output_file} ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
591 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
592 END
593 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
594 Log ${podStatusOutput}
595 ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
596 ${podName} Set Variable adapter-open-onu
597 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
598 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
599 ... app ${podName} Running
600 # Wait for 1 min after openonu adapter is restarted
601 Sleep 60s
602 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
603 Log ${podStatusOutput}
604 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
605 Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart}
606 FOR ${I} IN RANGE 0 ${num_all_onus}
607 ${src}= Set Variable ${hosts.src[${I}]}
608 ${dst}= Set Variable ${hosts.dst[${I}]}
Hardik Windlassd19af862021-08-12 11:40:20 +0000609 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000610 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassd19af862021-08-12 11:40:20 +0000611 ... Stop Ping Running In Background ${src['ip']} ${src['user']} ${src['pass']}
612 ... ${src['container_type']} ${src['container_name']}
Hardik Windlass6763ba52021-08-17 03:14:23 +0000613 END
614 FOR ${I} IN RANGE 0 ${num_all_onus}
615 ${src}= Set Variable ${hosts.src[${I}]}
616 ${dst}= Set Variable ${hosts.dst[${I}]}
617 ${ping_output_file}= Set Variable /tmp/${src['onu']}_ping
Hardik Windlassd19af862021-08-12 11:40:20 +0000618 ${ping_output}= Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000619 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassd19af862021-08-12 11:40:20 +0000620 ... Retrieve Remote File Contents ${ping_output_file} ${src['ip']} ${src['user']} ${src['pass']}
621 ... ${src['container_type']} ${src['container_name']}
Hardik Windlass0750bae2022-03-10 06:00:34 +0000622 Run Keyword If ${has_dataplane} Check Ping Result True ${ping_output}
Hardik Windlassd19af862021-08-12 11:40:20 +0000623 END
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000624 # Verify Control Plane Functionality by Deleting and Re-adding the Subscriber
625 Verify Control Plane After Pod Restart DT
Hardik Windlassd19af862021-08-12 11:40:20 +0000626
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000627Verify restart openolt-adapter container for DT
Hardik Windlassa04efa52021-08-13 08:17:24 +0000628 [Documentation] Restart openolt-adapter container after VOLTHA is operational.
629 ... Run the ping continuously in background during container restart,
630 ... and verify that there should be no affect on the dataplane.
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000631 ... Also, verify that the voltha control plane functionality is not affected.
632 [Tags] functionalDt RestartOpenOltPingDt
Hardik Windlassa04efa52021-08-13 08:17:24 +0000633 [Setup] Start Logging RestartOpenOltPingDt
634 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
635 ... AND Stop Logging RestartOpenOltPingDt
636 Clear All Devices Then Create New Device
637 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
638 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000639 Perform Sanity Test DT
Hardik Windlassa04efa52021-08-13 08:17:24 +0000640 FOR ${I} IN RANGE 0 ${num_all_onus}
641 ${src}= Set Variable ${hosts.src[${I}]}
642 ${dst}= Set Variable ${hosts.dst[${I}]}
643 ${ping_output_file}= Set Variable /tmp/${src['onu']}_ping
644 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000645 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassa04efa52021-08-13 08:17:24 +0000646 ... Run Ping In Background ${ping_output_file} ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
647 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
648 END
649 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
650 Log ${podStatusOutput}
651 ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
652 ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL}
653 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
654 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
655 ... app ${podName} Running
656 # Wait for 1 min after openolt adapter is restarted
657 Sleep 60s
658 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
659 Log ${podStatusOutput}
660 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
661 Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart}
662 FOR ${I} IN RANGE 0 ${num_all_onus}
663 ${src}= Set Variable ${hosts.src[${I}]}
664 ${dst}= Set Variable ${hosts.dst[${I}]}
Hardik Windlassa04efa52021-08-13 08:17:24 +0000665 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000666 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassa04efa52021-08-13 08:17:24 +0000667 ... Stop Ping Running In Background ${src['ip']} ${src['user']} ${src['pass']}
668 ... ${src['container_type']} ${src['container_name']}
Hardik Windlass6763ba52021-08-17 03:14:23 +0000669 END
670 FOR ${I} IN RANGE 0 ${num_all_onus}
671 ${src}= Set Variable ${hosts.src[${I}]}
672 ${dst}= Set Variable ${hosts.dst[${I}]}
673 ${ping_output_file}= Set Variable /tmp/${src['onu']}_ping
Hardik Windlassa04efa52021-08-13 08:17:24 +0000674 ${ping_output}= Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000675 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlassa04efa52021-08-13 08:17:24 +0000676 ... Retrieve Remote File Contents ${ping_output_file} ${src['ip']} ${src['user']} ${src['pass']}
677 ... ${src['container_type']} ${src['container_name']}
Hardik Windlass0750bae2022-03-10 06:00:34 +0000678 Run Keyword If ${has_dataplane} Check Ping Result True ${ping_output}
Hardik Windlassa04efa52021-08-13 08:17:24 +0000679 END
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000680 # Verify Control Plane Functionality by Deleting and Re-adding the Subscriber
681 Verify Control Plane After Pod Restart DT
682
683Verify restart rw-core container for DT
684 [Documentation] Restart rw-core container after VOLTHA is operational.
685 ... Run the ping continuously in background during container restart,
686 ... and verify that there should be no affect on the dataplane.
687 ... Also, verify that the voltha control plane functionality is not affected.
688 [Tags] functionalDt RestartRwCorePingDt
689 [Setup] Start Logging RestartRwCorePingDt
690 [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs
691 ... AND Stop Logging RestartRwCorePingDt
692 Clear All Devices Then Create New Device
693 # Performing Sanity Test to make sure subscribers are all DHCP and pingable
694 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000695 Perform Sanity Test DT
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000696 FOR ${I} IN RANGE 0 ${num_all_onus}
697 ${src}= Set Variable ${hosts.src[${I}]}
698 ${dst}= Set Variable ${hosts.dst[${I}]}
699 ${ping_output_file}= Set Variable /tmp/${src['onu']}_ping
700 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000701 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000702 ... Run Ping In Background ${ping_output_file} ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
703 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
704 END
705 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
706 Log ${podStatusOutput}
707 ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
708 ${podName} Set Variable rw-core
709 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
710 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
711 ... app ${podName} Running
712 # Wait for 1 min after rw-core is restarted
713 Sleep 60s
714 # For some reason scaling down and up the POD behind a service causes the port forward to stop working,
715 # so restart the port forwarding for the API service
716 Restart VOLTHA Port Forward voltha-api
717 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
718 Log ${podStatusOutput}
719 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
720 Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart}
721 FOR ${I} IN RANGE 0 ${num_all_onus}
722 ${src}= Set Variable ${hosts.src[${I}]}
723 ${dst}= Set Variable ${hosts.dst[${I}]}
724 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000725 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000726 ... Stop Ping Running In Background ${src['ip']} ${src['user']} ${src['pass']}
727 ... ${src['container_type']} ${src['container_name']}
728 END
729 FOR ${I} IN RANGE 0 ${num_all_onus}
730 ${src}= Set Variable ${hosts.src[${I}]}
731 ${dst}= Set Variable ${hosts.dst[${I}]}
732 ${ping_output_file}= Set Variable /tmp/${src['onu']}_ping
733 ${ping_output}= Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000734 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000735 ... Retrieve Remote File Contents ${ping_output_file} ${src['ip']} ${src['user']} ${src['pass']}
736 ... ${src['container_type']} ${src['container_name']}
Hardik Windlass0750bae2022-03-10 06:00:34 +0000737 Run Keyword If ${has_dataplane} Check Ping Result True ${ping_output}
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000738 END
739 # Verify Control Plane Functionality by Deleting and Re-adding the Subscriber
740 Verify Control Plane After Pod Restart DT
Hardik Windlassa04efa52021-08-13 08:17:24 +0000741
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530742*** Keywords ***
743Setup Suite
744 [Documentation] Set up the test suite
745 Common Test Suite Setup
Andrea Campanella15619c72020-04-30 09:48:04 +0200746 #power_switch.robot needs it to support different vendor's power switch
747 ${switch_type}= Get Variable Value ${web_power_switch.type}
748 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
Hardik Windlass4ed54502021-05-14 07:34:15 +0000749 # Run Pre-test Setup for Soak Job
750 # Note: As soak requirement, it expects that the devices under test are already created and enabled
751 Run Keyword If '${SOAK_TEST}'=='True' Setup Soak
752
Hardik Windlassb9bdd502020-04-17 14:46:21 +0530753
754Clear All Devices Then Create New Device
755 [Documentation] Remove any devices from VOLTHA and ONOS
756 # Remove all devices from voltha and nos
757 Delete All Devices and Verify
758 # Execute normal test Setup Keyword
759 Setup
760
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000761Verify Control Plane After Pod Restart DT
762 [Documentation] Verifies the control plane functionality after the voltha pod restart
763 ... by deleting and re-adding the subscriber
764 FOR ${I} IN RANGE 0 ${num_all_onus}
765 ${src}= Set Variable ${hosts.src[${I}]}
766 ${dst}= Set Variable ${hosts.dst[${I}]}
767 ${of_id}= Get ofID From OLT List ${src['olt']}
TorstenThiemedda37652021-11-11 16:22:05 +0000768 ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id}
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000769 ${onu_device_id}= Get Device ID From SN ${src['onu']}
770 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
Emrehan UZUNabef5182021-11-26 10:54:24 +0000771 ... ${of_id} ${src['uni_id']}
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000772 # Remove Subscriber Access
773 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
774 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
775 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000776 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000777 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
778 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
779 # Disable and Re-Enable the ONU (To replicate DT current workflow)
780 # TODO: Delete and Auto-Discovery Add of ONU (not yet supported)
781 Disable Device ${onu_device_id}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000782 Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000783 ... Validate Device DISABLED UNKNOWN
784 ... REACHABLE ${src['onu']}
785 Enable Device ${onu_device_id}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000786 Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000787 ... Validate Device ENABLED ACTIVE
788 ... REACHABLE ${src['onu']}
789 # Add Subscriber Access
790 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP}
791 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
792 # Verify subscriber access flows are added for the ONU port
793 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
794 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
795 ... ${onu_port} ${nni_port} ${src['s_tag']}
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000796 Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000797 ... Validate Device ENABLED ACTIVE
798 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
Girish Gowdra8fd96962021-12-14 16:20:04 +0530799 # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed.
800 Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed
801 # Workaround ends here for issue seen in VOL-4489.
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000802 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
Hardik Windlass5d537ad2021-11-16 06:01:54 +0000803 ... Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlasscf46ec42021-09-28 08:05:49 +0000804 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
805 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
806 END