Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 1 | # 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. |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 14 | |
| 15 | *** Settings *** |
HungWei Chiu | 87edb1f | 2020-01-28 00:10:58 +0000 | [diff] [blame] | 16 | Documentation Test various failure scenarios |
HungWei Chiu | 1408fb9 | 2020-03-03 19:43:30 -0500 | [diff] [blame] | 17 | Suite Setup Setup Suite |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 18 | Test Setup Setup |
| 19 | Test Teardown Teardown |
| 20 | #Suite Teardown Teardown Suite |
| 21 | Library Collections |
| 22 | Library String |
| 23 | Library OperatingSystem |
| 24 | Library XML |
| 25 | Library RequestsLibrary |
| 26 | Library ../../libraries/DependencyLibrary.py |
| 27 | Resource ../../libraries/onos.robot |
| 28 | Resource ../../libraries/voltctl.robot |
| 29 | Resource ../../libraries/voltha.robot |
| 30 | Resource ../../libraries/utils.robot |
| 31 | Resource ../../libraries/k8s.robot |
| 32 | Resource ../../variables/variables.robot |
HungWei Chiu | 87edb1f | 2020-01-28 00:10:58 +0000 | [diff] [blame] | 33 | Resource ../../libraries/power_switch.robot |
Hardik Windlass | c082c42 | 2021-03-16 15:44:10 +0000 | [diff] [blame] | 34 | Resource ../../libraries/bbsim.robot |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 35 | |
| 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 |
Suchitra Vemuri | ca1c5d3 | 2020-04-09 18:45:29 -0700 | [diff] [blame] | 45 | ${DEFAULTSPACE} default |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 46 | # For below variable value, using deployment name as using grep for |
| 47 | # parsing radius pod name, we can also use full radius pod name |
| 48 | ${RESTART_POD_NAME} radius |
| 49 | ${timeout} 60s |
| 50 | ${of_id} 0 |
| 51 | ${logical_id} 0 |
Suchitra Vemuri | 109feb1 | 2020-01-23 16:25:02 -0800 | [diff] [blame] | 52 | ${has_dataplane} True |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 53 | ${teardown_device} False |
| 54 | ${scripts} ../../scripts |
| 55 | |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 56 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 57 | ${container_log_dir} ${None} |
| 58 | |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 59 | *** Test Cases *** |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 60 | Verify ONU after rebooting physically |
| 61 | [Documentation] Test the ONU functionality by physically turning on/off ONU. |
| 62 | ... Prerequisite : Subscriber are authenticated/DHCP/pingable state |
| 63 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 64 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
| 65 | ... VOL-2634 |
| 66 | [Tags] functional PowerSwitch |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 67 | [Setup] Start Logging ONUreboot_PowerSwitch |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 68 | [Teardown] Run Keywords Collect Logs |
Suchitra Vemuri | 9a6dd6d | 2020-02-28 17:46:26 -0800 | [diff] [blame] | 69 | ... AND Stop Logging ONUreboot_PowerSwitch |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 70 | ... AND Delete All Devices and Verify |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 71 | # Add OLT device |
| 72 | setup |
| 73 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 74 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 75 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 76 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 77 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 78 | ${src}= Set Variable ${hosts.src[${I}]} |
| 79 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 80 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 0560f80 | 2020-05-06 23:06:53 +0530 | [diff] [blame] | 81 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 82 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 83 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 84 | Disable Switch Outlet ${src['power_switch_port']} |
| 85 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 86 | ... Wait Until Keyword Succeeds 60s 2s |
| 87 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 88 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 89 | # Remove Subscriber Access (To replicate ATT workflow) |
| 90 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 91 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 92 | |
| 93 | Enable Switch Outlet ${src['power_switch_port']} |
| 94 | # Check ONU port is Enabled in ONOS |
| 95 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 96 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 97 | # Verify EAPOL flows are added for the ONU port |
| 98 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 99 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 100 | # Verify ONU state in voltha |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 101 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 102 | ... ENABLED ACTIVE REACHABLE |
| 103 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 104 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 105 | # Perform Authentication |
| 106 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 107 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 108 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 109 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 110 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 111 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 112 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 113 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 114 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 115 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 116 | # Verify that no pending flows exist for the ONU port |
| 117 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 118 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 119 | # Verify subscriber access flows are added for the ONU port |
| 120 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 121 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 122 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 123 | 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']} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 125 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 126 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 127 | ... ${dst['container_name']} |
| 128 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 129 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 130 | END |
Suchitra Vemuri | d709613 | 2020-02-21 14:50:47 -0800 | [diff] [blame] | 131 | # Deleting OLT after tests completes independently (as this test doesn't not run on each POD) |
Suchitra Vemuri | 0656bc2 | 2020-03-21 19:07:49 -0700 | [diff] [blame] | 132 | #Run Keyword If ${has_dataplane} Delete Device and Verify |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 133 | |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 134 | Verify OLT after rebooting physically |
| 135 | [Documentation] Test the physical reboot of the OLT |
| 136 | ... Prerequisite : Subscriber are authenticated/DHCP/pingable state |
| 137 | ... Test performs a physical reboot, performs "reboot" from the OLT CLI |
| 138 | ... VOL-1956 |
| 139 | [Tags] functional PhysicalOLTReboot |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 140 | [Setup] Start Logging PhysicalOLTReboot |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 141 | [Teardown] Run Keywords Collect Logs |
| 142 | ... AND Stop Logging PhysicalOLTReboot |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 143 | ... AND Delete All Devices and Verify |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 144 | # Add OLT device |
| 145 | setup |
| 146 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 147 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 148 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 149 | # Reboot the OLT from the OLT CLI |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 150 | FOR ${I} IN RANGE 0 ${olt_count} |
| 151 | ${olt_user}= Get From Dictionary ${list_olts}[${I}] user |
| 152 | ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass |
| 153 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 154 | ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn |
| 155 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 156 | Run Keyword If ${has_dataplane} Login And Run Command On Remote System |
Andrea Campanella | 5ef8814 | 2021-02-02 14:34:50 +0100 | [diff] [blame] | 157 | ... reboot ${olt_ssh_ip} ${olt_user} ${olt_pass} prompt=# |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 158 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 159 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 160 | ${src}= Set Variable ${hosts.src[${I}]} |
| 161 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 162 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 163 | ... Wait Until Keyword Succeeds 60s 2s |
| 164 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 165 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 166 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 167 | # Wait for the OLTs to come back up |
| 168 | FOR ${I} IN RANGE 0 ${olt_count} |
| 169 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 170 | ${olt_user}= Get From Dictionary ${list_olts}[${I}] user |
| 171 | ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass |
| 172 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 173 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 174 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s |
| 175 | ... Check Remote System Reachability True ${olt_ssh_ip} |
| 176 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 177 | ... Validate OLT Device ENABLED ACTIVE |
| 178 | ... REACHABLE ${olt_serial_number} |
| 179 | END |
Suchitra Vemuri | 64db965 | 2020-03-22 21:11:13 -0700 | [diff] [blame] | 180 | # Waiting extra time for the ONUs to come up |
| 181 | Sleep 60s |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 182 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 183 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 184 | # Deleting OLT after test completes |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 185 | #Run Keyword If ${has_dataplane} Delete All Devices and Verify |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 186 | |
Suchitra Vemuri | 05180cb | 2020-03-26 13:13:27 -0700 | [diff] [blame] | 187 | Verify restart openolt-adapter container after subscriber provisioning |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 188 | [Documentation] Restart openolt-adapter container after VOLTHA is operational. |
| 189 | ... Prerequisite : ONUs are authenticated and pingable. |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 190 | [Tags] functional VOL-1958 Restart-OpenOlt released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 191 | [Setup] Start Logging Restart-OpenOlt |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 192 | [Teardown] Run Keywords Collect Logs |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 193 | ... AND Stop Logging Restart-OpenOlt |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 194 | # Add OLT device |
| 195 | setup |
| 196 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 197 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 198 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 199 | ${waitforRestart} Set Variable 120s |
| 200 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 201 | Log ${podStatusOutput} |
| 202 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 203 | ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL} |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 204 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 205 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 206 | ... app ${podName} Running |
Suchitra Vemuri | 312bfe0 | 2020-03-16 16:11:34 -0700 | [diff] [blame] | 207 | # Wait for 1min after openolt adapter is restarted |
Hardik Windlass | 5e214b2 | 2021-02-26 10:37:14 +0000 | [diff] [blame] | 208 | # TBD: Need for this Sleep |
Suchitra Vemuri | 312bfe0 | 2020-03-16 16:11:34 -0700 | [diff] [blame] | 209 | Sleep 60s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 210 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 211 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 212 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 213 | Log ${podStatusOutput} |
| 214 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 215 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
| 216 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 217 | |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 218 | Check OLT/ONU Authentication After Radius Pod Restart |
| 219 | [Documentation] After radius restart, triggers reassociation, checks status and |
| 220 | ... authentication, validates dhcp and ping. Note : wpa reassociate works only when |
| 221 | ... wpa supplicant is running in background hence it is recommended to remove |
| 222 | ... teardown from previous test or uncomment 'Teardown None'. |
| 223 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 224 | [Tags] functional RadiusRestart released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 225 | [Setup] Start Logging RadiusRestart |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 226 | [Teardown] Run Keywords Collect Logs |
| 227 | ... AND Stop Logging RadiusRestart |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 228 | ${waitforRestart} Set Variable 120s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 229 | ${podName} Set Variable radius |
| 230 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${DEFAULTSPACE} app ${podName} |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 231 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pods Status By Label ${DEFAULTSPACE} |
| 232 | ... app ${podName} Running |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 233 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 234 | ${src}= Set Variable ${hosts.src[${I}]} |
| 235 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 236 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 237 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 238 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
| 239 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 240 | Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 241 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 242 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 243 | ... Validate Authentication After Reassociate True ${src['dp_iface_name']} |
| 244 | ... ${src['ip']} ${src['user']} ${src['pass']} |
| 245 | ... ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 246 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 247 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 248 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 249 | ... Validate DHCP and Ping True True ${src['dp_iface_name']} |
| 250 | ... ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 251 | ... ${src['ip']} ${src['user']} ${src['pass']} |
| 252 | ... ${src['container_type']} ${src['container_name']} |
| 253 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} |
| 254 | ... ${dst['pass']} ${dst['container_type']} ${dst['container_name']} |
| 255 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 256 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 257 | END |
| 258 | |
Suchitra Vemuri | 05180cb | 2020-03-26 13:13:27 -0700 | [diff] [blame] | 259 | Verify openolt adapter restart before subscriber provisioning |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 260 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 261 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 262 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 263 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 264 | ... complete the DHCP sequence. |
Hung-Wei Chiu | d357676 | 2020-03-25 18:06:26 -0700 | [diff] [blame] | 265 | [Tags] functional olt-adapter-restart |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 266 | [Setup] Start Logging OltAdapterRestart |
Suchitra Vemuri | a0c086f | 2020-03-29 19:14:13 -0700 | [diff] [blame] | 267 | #... AND Clear All Devices Then Create New Device |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 268 | [Teardown] Run Keywords Collect Logs |
| 269 | ... AND Stop Logging OltAdapterRestart |
Hung-Wei Chiu | d357676 | 2020-03-25 18:06:26 -0700 | [diff] [blame] | 270 | # Add OLT and perform sanity test |
Suchitra Vemuri | 59ad277 | 2020-03-26 22:27:27 -0700 | [diff] [blame] | 271 | #setup |
Suchitra Vemuri | 91537c8 | 2020-03-29 15:03:26 -0700 | [diff] [blame] | 272 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | 59ad277 | 2020-03-26 22:27:27 -0700 | [diff] [blame] | 273 | #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 274 | #Set Global Variable ${of_id} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 275 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 276 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 277 | ${src}= Set Variable ${hosts.src[${I}]} |
| 278 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 279 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 280 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 281 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 282 | ... ${of_id} |
| 283 | |
| 284 | # Bring up the device and verify it authenticates |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 285 | Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 286 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 287 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 288 | ... ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 289 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 290 | ... /tmp/wpa ${src['dp_iface_name']} log |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 291 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 292 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 293 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 294 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 295 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 296 | END |
| 297 | # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1 |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 298 | Scale K8s Deployment by Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 0 |
| 299 | Wait Until Keyword Succeeds ${timeout} 2s Pods Do Not Exist By Label ${NAMESPACE} app |
| 300 | ... ${OLT_ADAPTER_APP_LABEL} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 301 | # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 302 | Scale K8s Deployment by Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 1 |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 303 | Wait Until Keyword Succeeds ${timeout} 2s |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 304 | ... Check Expected Available Deployment Replicas By Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 1 |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 305 | |
| 306 | # Ensure the device is available in ONOS, this represents system connectivity being restored |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 307 | FOR ${I} IN RANGE 0 ${olt_count} |
| 308 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 309 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 310 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 311 | ... ${olt_serial_number} |
| 312 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
| 313 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
| 314 | END |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 315 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 316 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 317 | ${src}= Set Variable ${hosts.src[${I}]} |
| 318 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 319 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 320 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 321 | ... ${of_id} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 322 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 323 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 324 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 325 | # Verify subscriber access flows are added for the ONU port |
| 326 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 327 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 328 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 329 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 330 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 331 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 332 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 333 | ... ${dst['container_name']} |
| 334 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 335 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 336 | END |
| 337 | |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 338 | Verify restart ofagent container after subscriber is provisioned |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 339 | [Documentation] Restart ofagent container after VOLTHA is operational. |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 340 | ... Prerequisite : ONUs are authenticated and pingable. |
Hardik Windlass | 7a84666 | 2020-03-19 20:42:59 +0530 | [diff] [blame] | 341 | [Tags] functional VOL-2409 ofagentRestart |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 342 | [Setup] Start Logging ofagentRestart |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 343 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 344 | ... AND Stop Logging ofagentRestart |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 345 | ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1 |
Suchitra Vemuri | ceb002a | 2020-03-25 13:36:21 -0700 | [diff] [blame] | 346 | # set timeout value |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 347 | ${waitforRestart} Set Variable 120s |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 348 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 349 | Log ${podStatusOutput} |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 350 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 351 | ${podName} Set Variable ofagent |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 352 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 353 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 354 | ... app ${podName} Running |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 355 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 356 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 357 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 358 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 359 | Log ${podStatusOutput} |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 360 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 361 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 362 | # Scale Down the Of-Agent Deployment |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 363 | Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 0 |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 364 | Sleep 30s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 365 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 366 | ${src}= Set Variable ${hosts.src[${I}]} |
| 367 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 368 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 369 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 370 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 371 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 372 | # Verify ONU state in voltha |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 373 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 374 | ... ENABLED ACTIVE REACHABLE |
| 375 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 376 | # Check ONU port is Disabled in ONOS |
| 377 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 378 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 379 | # Verify EAPOL flows are present for the ONU port |
| 380 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 381 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 382 | # Verify ONU in AAA-Users |
| 383 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 384 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 385 | # Verify DHCP-Allocations |
| 386 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 387 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 388 | # Verify subscriber access flows are added for the ONU port |
| 389 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 390 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 391 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 392 | # Verify Ping |
| 393 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Check Ping True |
| 394 | ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']} |
| 395 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 396 | END |
| 397 | # Scale Up the Of-Agent Deployment |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 398 | Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1 |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 399 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE} |
| 400 | ... Running |
| 401 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 402 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 403 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 404 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 405 | |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 406 | Check ONU adapter crash not forcing authentication again |
| 407 | [Documentation] After ONU adapter restart, checks wpa log for 'authentication started' |
| 408 | ... message count to make sure auth not started again and validates EAP status and ping. |
| 409 | ... Assuming that test1 or sanity was executed where all the ONUs are authenticated/DHCP/pingable |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 410 | [Tags] functional ONUAdaptCrash |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 411 | [Setup] Start Logging ONUAdaptCrash |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 412 | [Teardown] Run Keywords Collect Logs |
| 413 | ... AND Stop Logging ONUAdaptCrash |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 414 | # Wait for adapter to resync |
Hardik Windlass | 5e214b2 | 2021-02-26 10:37:14 +0000 | [diff] [blame] | 415 | # TBD: Need for this Sleep |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 416 | Sleep 60s |
| 417 | # Restart the onu |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 418 | ${podName} Set Variable adapter-open-onu |
Hung-Wei Chiu | 2bee4d4 | 2020-04-24 11:31:50 -0700 | [diff] [blame] | 419 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 420 | # Validate ONU Ports |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 421 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 422 | ${src}= Set Variable ${hosts.src[${I}]} |
| 423 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 424 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 425 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 426 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 427 | ... ${of_id} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 428 | Run Keyword And Continue On Failure Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 429 | ... ${src['onu']} |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 430 | ${output}= Run Keyword If ${has_dataplane} Login And Run Command On Remote System |
| 431 | ... wpa_cli status | grep SUCCESS ${src['ip']} ${src['user']} ${src['pass']} |
| 432 | ... ${src['container_type']} ${src['container_name']} |
| 433 | Run Keyword If ${has_dataplane} Should Contain ${output} SUCCESS |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 434 | END |
Hung-Wei Chiu | 2bee4d4 | 2020-04-24 11:31:50 -0700 | [diff] [blame] | 435 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 436 | ... app ${podName} Running |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 437 | # Wait for adapter to resync |
Hardik Windlass | 5e214b2 | 2021-02-26 10:37:14 +0000 | [diff] [blame] | 438 | # TBD: Need for this Sleep |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 439 | Sleep 60s |
Andy Bavier | 8da0e13 | 2020-04-13 10:25:16 -0700 | [diff] [blame] | 440 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 441 | # Validate OLTs are active in ONOS |
| 442 | FOR ${I} IN RANGE 0 ${olt_count} |
| 443 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 444 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 445 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 446 | ... ${olt_serial_number} |
| 447 | END |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 448 | # Perform all steps in Sanity Test except the subscriber addition |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 449 | FOR ${I} IN RANGE 0 ${num_all_onus} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 450 | ${src}= Set Variable ${hosts.src[${I}]} |
| 451 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 452 | ${of_id}= Get ofID From OLT List ${src['olt']} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 453 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 454 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 455 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 456 | # Check ONU port is Enabled in ONOS |
| 457 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 458 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 459 | # Verify EAPOL flows are added for the ONU port |
| 460 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 461 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 462 | # Verify ONU state in voltha |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 463 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 464 | ... ENABLED ACTIVE REACHABLE |
| 465 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 466 | # Perform Authentication |
| 467 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 468 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 469 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 470 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 471 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 472 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 473 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 474 | # Verify that no pending flows exist for the ONU port |
| 475 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 476 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 477 | # Verify subscriber access flows are added for the ONU port |
| 478 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 479 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 480 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 481 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 482 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 483 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 484 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 485 | ... ${dst['container_name']} |
| 486 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 487 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 488 | END |
| 489 | |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 490 | Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart |
| 491 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 492 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 493 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 494 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 495 | ... complete the DHCP sequence. |
| 496 | [Tags] functional rwcore-restart |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 497 | [Setup] Run Keywords Start Logging RwCoreFailAndRestart |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 498 | ... AND Clear All Devices Then Create New Device |
| 499 | [Teardown] Run Keywords Collect Logs |
| 500 | ... AND Stop Logging RwCoreFailAndRestart |
Suchitra Vemuri | 5d3383f | 2020-04-03 11:02:26 -0700 | [diff] [blame] | 501 | #... AND Delete Device and Verify |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 502 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 503 | FOR ${I} IN RANGE 0 ${olt_count} |
| 504 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 505 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 506 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 507 | ... ${olt_serial_number} |
| 508 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 509 | ... Get NNI Port in ONOS ${of_id} |
| 510 | # Set Global Variable ${nni_port} |
| 511 | END |
| 512 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 513 | ${src}= Set Variable ${hosts.src[${I}]} |
| 514 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 515 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 516 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 517 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 518 | ... ${of_id} |
| 519 | # Bring up the device and verify it authenticates |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 520 | Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 521 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
| 522 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} |
| 523 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 524 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 525 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 526 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 527 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 528 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 529 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP} |
| 530 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 531 | END |
| 532 | |
| 533 | # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1 |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 534 | Scale K8s Deployment voltha voltha-voltha-rw-core 0 |
| 535 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-voltha-rw-core |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 536 | # Ensure the ofagent POD goes "not-ready" as expected |
| 537 | Wait Until keyword Succeeds ${timeout} 2s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 538 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 0 |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 539 | # Scale up the core deployment and make sure both it and the ofagent deployment are back |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 540 | Scale K8s Deployment voltha voltha-voltha-rw-core 1 |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 541 | Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 542 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-rw-core 1 |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 543 | Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 544 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 1 |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 545 | # For some reason scaling down and up the POD behind a service causes the port forward to stop working, |
| 546 | # so restart the port forwarding for the API service |
David Bainbridge | 07321ff | 2020-06-12 13:55:42 -0700 | [diff] [blame] | 547 | Restart VOLTHA Port Forward voltha-api |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 548 | # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this |
| 549 | # represents system connectivity being restored |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 550 | FOR ${I} IN RANGE 0 ${olt_count} |
| 551 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 552 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 553 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 554 | ... ${olt_serial_number} |
Girish Gowdra | e4de3b3 | 2021-03-23 22:20:00 -0700 | [diff] [blame] | 555 | Wait Until Keyword Succeeds 120s 2s Device Is Available In ONOS |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 556 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
| 557 | END |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 558 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 559 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | 5209462 | 2020-05-12 15:54:24 -0700 | [diff] [blame] | 560 | ${src}= Set Variable ${hosts.src[${I}]} |
| 561 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 562 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | 5209462 | 2020-05-12 15:54:24 -0700 | [diff] [blame] | 563 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 564 | ... ${of_id} |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 565 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 566 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 567 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 568 | # Verify subscriber access flows are added for the ONU port |
| 569 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 570 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 571 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 572 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 573 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 574 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 575 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 576 | ... ${dst['container_name']} |
| 577 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
| 578 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 579 | END |
| 580 | |
Suchitra Vemuri | 19e942f | 2020-08-11 18:04:28 -0700 | [diff] [blame] | 581 | Verify OLT Soft Reboot |
| 582 | [Documentation] Test soft reboot of the OLT using voltctl command |
| 583 | [Tags] VOL-2745 OLTSoftReboot functional |
| 584 | [Setup] Start Logging OLTSoftReboot |
| 585 | [Teardown] Run Keywords Collect Logs |
| 586 | ... AND Stop Logging OLTSoftReboot |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 587 | FOR ${I} IN RANGE 0 ${olt_count} |
| 588 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 589 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 590 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 591 | ... Validate OLT Device ENABLED ACTIVE |
| 592 | ... REACHABLE ${olt_serial_number} |
| 593 | # Reboot the OLT using "voltctl device reboot" command |
| 594 | Reboot Device ${olt_device_id} |
| 595 | END |
Suchitra Vemuri | 19e942f | 2020-08-11 18:04:28 -0700 | [diff] [blame] | 596 | #Verify that ping fails |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 597 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 19e942f | 2020-08-11 18:04:28 -0700 | [diff] [blame] | 598 | ${src}= Set Variable ${hosts.src[${I}]} |
| 599 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 600 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 601 | ... Wait Until Keyword Succeeds 60s 2s |
| 602 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 603 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 604 | END |
Suchitra Vemuri | 19e942f | 2020-08-11 18:04:28 -0700 | [diff] [blame] | 605 | # Check OLT states |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 606 | FOR ${I} IN RANGE 0 ${olt_count} |
| 607 | ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn |
| 608 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 609 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 610 | # Wait for the OLT to come back up |
| 611 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s |
| 612 | ... Check Remote System Reachability True ${olt_ssh_ip} |
| 613 | # Check OLT states |
| 614 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 615 | ... Validate OLT Device ENABLED ACTIVE |
| 616 | ... REACHABLE ${olt_serial_number} |
| 617 | END |
| 618 | # Waiting extra time for the ONUs to come up |
| 619 | Sleep 60s |
Suchitra Vemuri | 19e942f | 2020-08-11 18:04:28 -0700 | [diff] [blame] | 620 | #Check after reboot that ONUs are active, authenticated/DHCP/pingable |
| 621 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 622 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 623 | |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 624 | Verify restart ofagent container before subscriber is provisioned |
| 625 | [Documentation] Restart ofagent container before subscriber is provisioned. |
| 626 | [Tags] functional VOL-2962 ofagentRestart2 |
| 627 | [Setup] Start Logging ofagentRestart2 |
| 628 | [Teardown] Run Keywords Collect Logs |
Suchitra Vemuri | 8130be8 | 2020-09-15 16:47:58 -0700 | [diff] [blame] | 629 | ... AND Stop Logging ofagentRestart2 |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 630 | ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1 |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 631 | Delete All Devices And Verify |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 632 | setup |
| 633 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 634 | FOR ${I} IN RANGE 0 ${olt_count} |
| 635 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 636 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 637 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 638 | ... ${olt_serial_number} |
| 639 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
| 640 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
| 641 | END |
| 642 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 643 | ${src}= Set Variable ${hosts.src[${I}]} |
| 644 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 645 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 646 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 647 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 648 | ... ${of_id} |
| 649 | # Bring up the device and verify it authenticates |
| 650 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE |
| 651 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
| 652 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} |
| 653 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 654 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 655 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 656 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 657 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 658 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 659 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP} |
| 660 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 661 | END |
| 662 | # Restart POD ofagent |
| 663 | ${waitforRestart} Set Variable 120s |
| 664 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 665 | Log ${podStatusOutput} |
| 666 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 667 | ${podName} Set Variable ofagent |
| 668 | Restart Pod ${NAMESPACE} ${podName} |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 669 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE} |
| 670 | ... Running |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 671 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 672 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 673 | #Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 674 | #... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 675 | ${src}= Set Variable ${hosts.src[${I}]} |
| 676 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 677 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 678 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 679 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 680 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 681 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 682 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 683 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 684 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 685 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 686 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 687 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 688 | ... ${dst['container_name']} |
| 689 | # Verify DHCP-Allocations |
| 690 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 691 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 10e737e | 2020-08-14 14:59:10 -0700 | [diff] [blame] | 692 | END |
| 693 | |
Hardik Windlass | c082c42 | 2021-03-16 15:44:10 +0000 | [diff] [blame] | 694 | Verify OLT Grpc Disconnection |
| 695 | [Documentation] Restarts OLT Grpc Server and verifies everything works as before without any system disruption. |
| 696 | [Tags] functional VOL-3904 restartGrpcServer bbsim |
| 697 | [Setup] Start Logging restartGrpcServer |
| 698 | [Teardown] Run Keywords Collect Logs |
| 699 | ... AND Stop Logging restartGrpcServer |
| 700 | Delete All Devices And Verify |
| 701 | Setup |
| 702 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 703 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 704 | FOR ${J} IN RANGE 0 ${num_olts} |
| 705 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 706 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 707 | Restart Grpc Server ${NAMESPACE} ${bbsim_pod} 5 |
| 708 | END |
| 709 | # Repeat sanity test without subscriber changes |
| 710 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test True |
| 711 | # Additional Verification |
| 712 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 713 | Setup |
| 714 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 715 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 716 | |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 717 | Verify ONU Soft Reboot |
| 718 | [Documentation] Test soft reboot of the ONU using voltctl command |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 719 | [Tags] VOL-1957 ONUSoftReboot functional notready |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 720 | [Setup] Start Logging ONUSoftReboot |
| 721 | #... AND Setup |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 722 | [Teardown] Run Keywords Collect Logs |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 723 | ... AND Stop Logging ONUSoftReboot |
| 724 | #... AND Delete Device and Verify |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 725 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 726 | ${src}= Set Variable ${hosts.src[${I}]} |
| 727 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 728 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 729 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 730 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 731 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 732 | Reboot Device ${onu_device_id} |
| 733 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 734 | ... Wait Until Keyword Succeeds 60s 2s |
| 735 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 736 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 737 | # Remove Subscriber Access (To replicate ATT workflow) |
| 738 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 739 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 740 | Verify ping is succesful except for given device ${num_all_onus} ${onu_device_id} |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 741 | Sleep 40s |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 742 | # Check ONU port is Enabled in ONOS |
| 743 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 744 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 745 | # Verify EAPOL flows are added for the ONU port |
| 746 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 747 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 748 | # Verify ONU state in voltha |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 749 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 750 | ... ENABLED ACTIVE REACHABLE |
| 751 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 752 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 753 | # Perform Authentication |
| 754 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 755 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 756 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 757 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 758 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 759 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 760 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 761 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 762 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 763 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 764 | # Verify that no pending flows exist for the ONU port |
| 765 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 766 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 767 | # Verify subscriber access flows are added for the ONU port |
| 768 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 769 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 770 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 771 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 772 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 773 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hema | 123aff5 | 2020-05-26 15:41:47 +0530 | [diff] [blame] | 774 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 775 | ... ${dst['container_name']} |
| 776 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 777 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 778 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 779 | |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 780 | |
| 781 | *** Keywords *** |
| 782 | Setup Suite |
| 783 | [Documentation] Set up the test suite |
| 784 | Common Test Suite Setup |
HungWei Chiu | 1408fb9 | 2020-03-03 19:43:30 -0500 | [diff] [blame] | 785 | #power_switch.robot needs it to support different vendor's power switch |
Hung-Wei Chiu | fcc6d8e | 2020-03-10 12:05:11 -0700 | [diff] [blame] | 786 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 787 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 788 | |
| 789 | Clear All Devices Then Create New Device |
| 790 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 791 | # Remove all devices from voltha and nos |
| 792 | Delete All Devices and Verify |
| 793 | # Execute normal test Setup Keyword |
| 794 | Setup |