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