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