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