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