Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 1 | # Copyright 2017 - present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 14 | |
| 15 | *** Settings *** |
HungWei Chiu | 87edb1f | 2020-01-28 00:10:58 +0000 | [diff] [blame] | 16 | Documentation Test various failure scenarios |
HungWei Chiu | 1408fb9 | 2020-03-03 19:43:30 -0500 | [diff] [blame] | 17 | Suite Setup Setup Suite |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 18 | Test Setup Setup |
| 19 | Test Teardown Teardown |
| 20 | #Suite Teardown Teardown Suite |
| 21 | Library Collections |
| 22 | Library String |
| 23 | Library OperatingSystem |
| 24 | Library XML |
| 25 | Library RequestsLibrary |
| 26 | Library ../../libraries/DependencyLibrary.py |
| 27 | Resource ../../libraries/onos.robot |
| 28 | Resource ../../libraries/voltctl.robot |
| 29 | Resource ../../libraries/voltha.robot |
| 30 | Resource ../../libraries/utils.robot |
| 31 | Resource ../../libraries/k8s.robot |
| 32 | Resource ../../variables/variables.robot |
HungWei Chiu | 87edb1f | 2020-01-28 00:10:58 +0000 | [diff] [blame] | 33 | Resource ../../libraries/power_switch.robot |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 34 | |
| 35 | *** Variables *** |
| 36 | ${POD_NAME} flex-ocp-cord |
| 37 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 38 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 39 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 40 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 41 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 42 | ${VOLTHA_POD_NUM} 8 |
| 43 | ${NAMESPACE} voltha |
Suchitra Vemuri | ca1c5d3 | 2020-04-09 18:45:29 -0700 | [diff] [blame] | 44 | ${DEFAULTSPACE} default |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 45 | # For below variable value, using deployment name as using grep for |
| 46 | # parsing radius pod name, we can also use full radius pod name |
| 47 | ${RESTART_POD_NAME} radius |
| 48 | ${timeout} 60s |
| 49 | ${of_id} 0 |
| 50 | ${logical_id} 0 |
Suchitra Vemuri | 109feb1 | 2020-01-23 16:25:02 -0800 | [diff] [blame] | 51 | ${has_dataplane} True |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 52 | ${teardown_device} False |
| 53 | ${scripts} ../../scripts |
| 54 | |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 55 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 56 | ${container_log_dir} ${None} |
| 57 | |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 58 | *** Test Cases *** |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 59 | Verify ONU after rebooting physically |
| 60 | [Documentation] Test the ONU functionality by physically turning on/off ONU. |
| 61 | ... Prerequisite : Subscriber are authenticated/DHCP/pingable state |
| 62 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 63 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
| 64 | ... VOL-2634 |
| 65 | [Tags] functional PowerSwitch |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 66 | [Setup] Start Logging ONUreboot_PowerSwitch |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 67 | [Teardown] Run Keywords Collect Logs |
Suchitra Vemuri | 9a6dd6d | 2020-02-28 17:46:26 -0800 | [diff] [blame] | 68 | ... AND Stop Logging ONUreboot_PowerSwitch |
Suchitra Vemuri | 0656bc2 | 2020-03-21 19:07:49 -0700 | [diff] [blame] | 69 | ... AND Delete Device and Verify |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 70 | # Add OLT device |
| 71 | setup |
| 72 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 73 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 74 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 75 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
| 76 | FOR ${I} IN RANGE 0 ${num_onus} |
| 77 | ${src}= Set Variable ${hosts.src[${I}]} |
| 78 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 79 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 80 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 81 | Disable Switch Outlet ${src['power_switch_port']} |
| 82 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 83 | ... Wait Until Keyword Succeeds 60s 2s |
| 84 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 85 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 86 | |
| 87 | Enable Switch Outlet ${src['power_switch_port']} |
| 88 | # Check ONU port is Enabled in ONOS |
| 89 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 90 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 91 | # Verify EAPOL flows are added for the ONU port |
| 92 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 93 | ... 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] | 94 | # Verify ONU state in voltha |
| 95 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 96 | ... ENABLED ACTIVE REACHABLE |
| 97 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 98 | # Verify subscriber access flows are added for the ONU port |
| 99 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 100 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 101 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 102 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 103 | ... Wait Until Keyword Succeeds 60s 2s |
| 104 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 105 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 106 | Run Keyword And Ignore Error Collect Logs |
| 107 | END |
Suchitra Vemuri | d709613 | 2020-02-21 14:50:47 -0800 | [diff] [blame] | 108 | # 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] | 109 | #Run Keyword If ${has_dataplane} Delete Device and Verify |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 110 | |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 111 | Verify OLT after rebooting physically |
| 112 | [Documentation] Test the physical reboot of the OLT |
| 113 | ... Prerequisite : Subscriber are authenticated/DHCP/pingable state |
| 114 | ... Test performs a physical reboot, performs "reboot" from the OLT CLI |
| 115 | ... VOL-1956 |
| 116 | [Tags] functional PhysicalOLTReboot |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 117 | [Setup] Start Logging PhysicalOLTReboot |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 118 | [Teardown] Run Keywords Collect Logs |
| 119 | ... AND Stop Logging PhysicalOLTReboot |
Suchitra Vemuri | b3a92e4 | 2020-03-21 16:49:57 -0700 | [diff] [blame] | 120 | ... AND Delete Device and Verify |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 121 | # Add OLT device |
| 122 | setup |
| 123 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 124 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 125 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 126 | # Reboot the OLT from the OLT CLI |
| 127 | Run Keyword If ${has_dataplane} Login And Run Command On Remote System |
| 128 | ... sudo reboot ${olt_ip} ${olt_user} ${olt_pass} prompt=# |
| 129 | Run Keyword And Ignore Error Collect Logs |
| 130 | FOR ${I} IN RANGE 0 ${num_onus} |
| 131 | ${src}= Set Variable ${hosts.src[${I}]} |
| 132 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 133 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 134 | ... Wait Until Keyword Succeeds 60s 2s |
| 135 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 136 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 137 | END |
| 138 | # Wait for the OLT to come back up |
Andy Bavier | 8da0e13 | 2020-04-13 10:25:16 -0700 | [diff] [blame] | 139 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s |
| 140 | ... Check Remote System Reachability True ${olt_ip} |
Suchitra Vemuri | 64db965 | 2020-03-22 21:11:13 -0700 | [diff] [blame] | 141 | # Waiting extra time for the ONUs to come up |
| 142 | Sleep 60s |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 143 | Run Keyword And Ignore Error Collect Logs |
| 144 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 145 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 146 | # Deleting OLT after test completes |
Suchitra Vemuri | b3a92e4 | 2020-03-21 16:49:57 -0700 | [diff] [blame] | 147 | #Run Keyword If ${has_dataplane} Delete Device and Verify |
Suchitra Vemuri | 784e1ae | 2020-03-16 18:40:25 -0700 | [diff] [blame] | 148 | |
Suchitra Vemuri | 05180cb | 2020-03-26 13:13:27 -0700 | [diff] [blame] | 149 | Verify restart openolt-adapter container after subscriber provisioning |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 150 | [Documentation] Restart openolt-adapter container after VOLTHA is operational. |
| 151 | ... Prerequisite : ONUs are authenticated and pingable. |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 152 | [Tags] functional VOL-1958 Restart-OpenOlt released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 153 | [Setup] Start Logging Restart-OpenOlt |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 154 | [Teardown] Run Keywords Collect Logs |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 155 | ... AND Stop Logging Restart-OpenOlt |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [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 | ${waitforRestart} Set Variable 120s |
| 162 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 163 | Log ${podStatusOutput} |
| 164 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 165 | ${podName} Set Variable adapter-open-olt |
| 166 | Restart Pod ${NAMESPACE} ${podName} |
| 167 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ${podName} ${NAMESPACE} |
| 168 | ... Running |
Suchitra Vemuri | 312bfe0 | 2020-03-16 16:11:34 -0700 | [diff] [blame] | 169 | # Wait for 1min after openolt adapter is restarted |
| 170 | Sleep 60s |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 171 | Repeat Sanity Test |
Suchitra Vemuri | d709613 | 2020-02-21 14:50:47 -0800 | [diff] [blame] | 172 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 173 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 174 | Log ${podStatusOutput} |
| 175 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 176 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
| 177 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
Suchitra Vemuri | 60be98b | 2020-02-19 16:41:21 -0800 | [diff] [blame] | 178 | |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 179 | Check OLT/ONU Authentication After Radius Pod Restart |
| 180 | [Documentation] After radius restart, triggers reassociation, checks status and |
| 181 | ... authentication, validates dhcp and ping. Note : wpa reassociate works only when |
| 182 | ... wpa supplicant is running in background hence it is recommended to remove |
| 183 | ... teardown from previous test or uncomment 'Teardown None'. |
| 184 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 185 | [Tags] functional RadiusRestart released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 186 | [Setup] Start Logging RadiusRestart |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 187 | [Teardown] Run Keywords Collect Logs |
| 188 | ... AND Stop Logging RadiusRestart |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 189 | ${waitforRestart} Set Variable 120s |
Suchitra Vemuri | ca1c5d3 | 2020-04-09 18:45:29 -0700 | [diff] [blame] | 190 | Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${DEFAULTSPACE} ${RESTART_POD_NAME} |
| 191 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ${RESTART_POD_NAME} |
| 192 | ... ${DEFAULTSPACE} Running |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 193 | FOR ${I} IN RANGE 0 ${num_onus} |
| 194 | ${src}= Set Variable ${hosts.src[${I}]} |
| 195 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 196 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 197 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
| 198 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 199 | Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 200 | ... 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] | 201 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 202 | ... Validate Authentication After Reassociate True ${src['dp_iface_name']} |
| 203 | ... ${src['ip']} ${src['user']} ${src['pass']} |
| 204 | ... ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 205 | 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] | 206 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 207 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 208 | ... Validate DHCP and Ping True True ${src['dp_iface_name']} |
| 209 | ... ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 210 | ... ${src['ip']} ${src['user']} ${src['pass']} |
| 211 | ... ${src['container_type']} ${src['container_name']} |
| 212 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} |
| 213 | ... ${dst['pass']} ${dst['container_type']} ${dst['container_name']} |
| 214 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 215 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 216 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 217 | Run Keyword and Ignore Error Collect Logs |
| 218 | END |
| 219 | |
Suchitra Vemuri | 05180cb | 2020-03-26 13:13:27 -0700 | [diff] [blame] | 220 | Verify openolt adapter restart before subscriber provisioning |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 221 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 222 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 223 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 224 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 225 | ... complete the DHCP sequence. |
Hung-Wei Chiu | d357676 | 2020-03-25 18:06:26 -0700 | [diff] [blame] | 226 | [Tags] functional olt-adapter-restart |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 227 | [Setup] Start Logging OltAdapterRestart |
Suchitra Vemuri | a0c086f | 2020-03-29 19:14:13 -0700 | [diff] [blame] | 228 | #... AND Clear All Devices Then Create New Device |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 229 | [Teardown] Run Keywords Collect Logs |
| 230 | ... AND Stop Logging OltAdapterRestart |
Hung-Wei Chiu | d357676 | 2020-03-25 18:06:26 -0700 | [diff] [blame] | 231 | # Add OLT and perform sanity test |
Suchitra Vemuri | 59ad277 | 2020-03-26 22:27:27 -0700 | [diff] [blame] | 232 | #setup |
Suchitra Vemuri | 91537c8 | 2020-03-29 15:03:26 -0700 | [diff] [blame] | 233 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | 59ad277 | 2020-03-26 22:27:27 -0700 | [diff] [blame] | 234 | #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 235 | Set Global Variable ${of_id} |
| 236 | |
| 237 | FOR ${I} IN RANGE 0 ${num_onus} |
| 238 | ${src}= Set Variable ${hosts.src[${I}]} |
| 239 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 240 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 241 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 242 | ... ${of_id} |
| 243 | |
| 244 | # Bring up the device and verify it authenticates |
| 245 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE |
| 246 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 247 | 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] | 248 | ... ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 249 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 250 | ... /tmp/wpa ${src['dp_iface_name']} log |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 251 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 252 | ... ${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] | 253 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 254 | 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] | 255 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 256 | END |
| 257 | # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1 |
| 258 | Scale K8s Deployment voltha adapter-open-olt 0 |
| 259 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha adapter-open-olt |
| 260 | # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back |
| 261 | Scale K8s Deployment voltha adapter-open-olt 1 |
| 262 | Wait Until Keyword Succeeds ${timeout} 2s |
| 263 | ... Check Expected Available Deployment Replicas voltha adapter-open-olt 1 |
| 264 | |
| 265 | # Ensure the device is available in ONOS, this represents system connectivity being restored |
| 266 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 267 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 268 | |
| 269 | FOR ${I} IN RANGE 0 ${num_onus} |
| 270 | # 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] | 271 | 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] | 272 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 273 | # Verify subscriber access flows are added for the ONU port |
| 274 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 275 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 276 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 277 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 278 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 279 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 280 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 281 | ... ${dst['container_name']} |
| 282 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 283 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 284 | END |
| 285 | |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 286 | Verify restart ofagent container after subscriber is provisioned |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 287 | [Documentation] Restart ofagent container after VOLTHA is operational. |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 288 | ... Prerequisite : ONUs are authenticated and pingable. |
Hardik Windlass | 7a84666 | 2020-03-19 20:42:59 +0530 | [diff] [blame] | 289 | [Tags] functional VOL-2409 ofagentRestart |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 290 | [Setup] Start Logging ofagentRestart |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 291 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 292 | ... AND Stop Logging ofagentRestart |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 293 | ... AND Scale K8s Deployment ${NAMESPACE} voltha-ofagent 1 |
Suchitra Vemuri | ceb002a | 2020-03-25 13:36:21 -0700 | [diff] [blame] | 294 | # set timeout value |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 295 | ${waitforRestart} Set Variable 120s |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 296 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 297 | Log ${podStatusOutput} |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 298 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 299 | ${podName} Set Variable ofagent |
| 300 | Restart Pod ${NAMESPACE} ${podName} |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 301 | Sleep 60s |
| 302 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE} |
| 303 | ... Running |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 304 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 305 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 306 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 307 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 308 | Log ${podStatusOutput} |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 309 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 310 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 311 | # Scale Down the Of-Agent Deployment |
| 312 | Scale K8s Deployment ${NAMESPACE} voltha-ofagent 0 |
| 313 | Sleep 30s |
| 314 | FOR ${I} IN RANGE 0 ${num_onus} |
| 315 | ${src}= Set Variable ${hosts.src[${I}]} |
| 316 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 317 | Run Keyword and Ignore Error Collect Logs |
| 318 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 319 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 320 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 321 | # Verify ONU state in voltha |
| 322 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 323 | ... ENABLED ACTIVE REACHABLE |
| 324 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 325 | # Check ONU port is Disabled in ONOS |
| 326 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
| 327 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 328 | # Verify EAPOL flows are present for the ONU port |
| 329 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 330 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 331 | # Verify ONU in AAA-Users |
| 332 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 333 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 334 | # Verify DHCP-Allocations |
| 335 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 336 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 337 | # Verify subscriber access flows are added for the ONU port |
| 338 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 339 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 340 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Hardik Windlass | 8f2aadc | 2020-03-16 20:16:39 +0530 | [diff] [blame] | 341 | # Verify Ping |
| 342 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Check Ping True |
| 343 | ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']} |
| 344 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 345 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 346 | Run Keyword and Ignore Error Collect Logs |
| 347 | END |
| 348 | # Scale Up the Of-Agent Deployment |
| 349 | Scale K8s Deployment ${NAMESPACE} voltha-ofagent 1 |
| 350 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE} |
| 351 | ... Running |
| 352 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 353 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 354 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 355 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 356 | |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 357 | Check ONU adapter crash not forcing authentication again |
| 358 | [Documentation] After ONU adapter restart, checks wpa log for 'authentication started' |
| 359 | ... message count to make sure auth not started again and validates EAP status and ping. |
| 360 | ... 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] | 361 | [Tags] functional ONUAdaptCrash |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 362 | [Setup] Start Logging ONUAdaptCrash |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 363 | [Teardown] Run Keywords Collect Logs |
| 364 | ... AND Stop Logging ONUAdaptCrash |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 365 | # Wait for adapter to resync |
| 366 | Sleep 60s |
| 367 | # Restart the onu |
| 368 | ${podName} Set Variable adapter-open-onu |
| 369 | Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${NAMESPACE} ${podName} |
| 370 | # Validate ONU Ports |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 371 | FOR ${I} IN RANGE 0 ${num_onus} |
| 372 | ${src}= Set Variable ${hosts.src[${I}]} |
| 373 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 374 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 375 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 376 | ... ${of_id} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 377 | Run Keyword And Continue On Failure Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 378 | ... ${onu_port} |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 379 | ${output}= Run Keyword If ${has_dataplane} Login And Run Command On Remote System |
| 380 | ... wpa_cli status | grep SUCCESS ${src['ip']} ${src['user']} ${src['pass']} |
| 381 | ... ${src['container_type']} ${src['container_name']} |
| 382 | Run Keyword If ${has_dataplane} Should Contain ${output} SUCCESS |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 383 | END |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 384 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pod Status ${podName} ${NAMESPACE} |
| 385 | ... Running |
| 386 | # Wait for adapter to resync |
| 387 | Sleep 60s |
Andy Bavier | 8da0e13 | 2020-04-13 10:25:16 -0700 | [diff] [blame] | 388 | Run Keyword If ${has_dataplane} Clean Up Linux |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 389 | # Perform all steps in Sanity Test except the subscriber addition |
| 390 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 391 | Set Global Variable ${of_id} |
| 392 | FOR ${I} IN RANGE 0 ${num_onus} |
| 393 | ${src}= Set Variable ${hosts.src[${I}]} |
| 394 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 395 | Run Keyword and Ignore Error Collect Logs |
| 396 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 397 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 398 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 399 | # Check ONU port is Enabled in ONOS |
| 400 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
| 401 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 402 | # Verify EAPOL flows are added for the ONU port |
| 403 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 404 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 405 | # Verify ONU state in voltha |
| 406 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 407 | ... ENABLED ACTIVE REACHABLE |
| 408 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 409 | # Perform Authentication |
| 410 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 411 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 412 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 413 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 414 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 415 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 416 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 417 | # Verify that no pending flows exist for the ONU port |
| 418 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 419 | ... 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] | 420 | # Verify subscriber access flows are added for the ONU port |
| 421 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 422 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 423 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
hwchiu | 14c0510 | 2020-03-27 00:44:30 +0000 | [diff] [blame] | 424 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 425 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 426 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 427 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 428 | ... ${dst['container_name']} |
| 429 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 430 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 431 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 432 | Run Keyword and Ignore Error Collect Logs |
| 433 | END |
| 434 | |
Gayathri.Selvan | c0b3702 | 2020-02-06 05:17:00 +0000 | [diff] [blame] | 435 | Run Keyword and Ignore Error Collect Logs |
| 436 | |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 437 | Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart |
| 438 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 439 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 440 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 441 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 442 | ... complete the DHCP sequence. |
| 443 | [Tags] functional rwcore-restart |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 444 | [Setup] Run Keywords Start Logging RwCoreFailAndRestart |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 445 | ... AND Clear All Devices Then Create New Device |
| 446 | [Teardown] Run Keywords Collect Logs |
| 447 | ... AND Stop Logging RwCoreFailAndRestart |
Suchitra Vemuri | 5d3383f | 2020-04-03 11:02:26 -0700 | [diff] [blame] | 448 | #... AND Delete Device and Verify |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 449 | Run Keyword and Ignore Error Collect Logs |
| 450 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 451 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 452 | Set Global Variable ${of_id} |
| 453 | FOR ${I} IN RANGE 0 ${num_onus} |
| 454 | ${src}= Set Variable ${hosts.src[${I}]} |
| 455 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 456 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 457 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 458 | ... ${of_id} |
| 459 | # Bring up the device and verify it authenticates |
| 460 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE |
| 461 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
| 462 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} |
| 463 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 464 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 465 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 466 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 467 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 468 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 469 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP} |
| 470 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 471 | END |
| 472 | |
| 473 | # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1 |
| 474 | Scale K8s Deployment voltha voltha-rw-core 0 |
| 475 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-rw-core |
| 476 | # Ensure the ofagent POD goes "not-ready" as expected |
| 477 | Wait Until keyword Succeeds ${timeout} 2s |
| 478 | ... Check Expected Available Deployment Replicas voltha voltha-ofagent 0 |
| 479 | # Scale up the core deployment and make sure both it and the ofagent deployment are back |
| 480 | Scale K8s Deployment voltha voltha-rw-core 1 |
| 481 | Wait Until Keyword Succeeds ${timeout} 2s |
| 482 | ... Check Expected Available Deployment Replicas voltha voltha-rw-core 1 |
| 483 | Wait Until Keyword Succeeds ${timeout} 2s |
| 484 | ... Check Expected Available Deployment Replicas voltha voltha-ofagent 1 |
| 485 | # For some reason scaling down and up the POD behind a service causes the port forward to stop working, |
| 486 | # so restart the port forwarding for the API service |
| 487 | Restart VOLTHA Port Foward voltha-api-minimal |
| 488 | # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this |
| 489 | # represents system connectivity being restored |
| 490 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
| 491 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
| 492 | |
| 493 | FOR ${I} IN RANGE 0 ${num_onus} |
| 494 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 495 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 496 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 497 | # Verify subscriber access flows are added for the ONU port |
| 498 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 499 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 500 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | ebf6532 | 2020-04-03 10:09:41 -0700 | [diff] [blame] | 501 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 502 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 503 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 504 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 505 | ... ${dst['container_name']} |
| 506 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
| 507 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 508 | END |
| 509 | |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 510 | ONU Reboot |
| 511 | [Documentation] Reboot ONU and verify that ONU comes up properly |
| 512 | [Tags] VOL-1957 RebootONU notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 513 | [Setup] Start Logging RebootONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 514 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 515 | ... AND Stop Logging RebootONU |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 516 | FOR ${I} IN RANGE 0 ${num_onus} |
| 517 | ${src}= Set Variable ${hosts.src[${I}]} |
| 518 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 519 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 520 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 521 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 522 | Reboot ONU ${onu_device_id} ${src} ${dst} |
| 523 | Verify ping is succesful except for given device ${num_onus} ${onu_device_id} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 524 | # Check ONU port is Enabled in ONOS |
| 525 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 526 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 527 | # Verify EAPOL flows are added for the ONU port |
| 528 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 529 | ... 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] | 530 | # Verify ONU state in voltha |
| 531 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 532 | ... ENABLED ACTIVE REACHABLE |
| 533 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 534 | # Verify subscriber access flows are added for the ONU port |
| 535 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 536 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 537 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 538 | # Verify pings are successful after reboot on the current ONU |
| 539 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 540 | ... Wait Until Keyword Succeeds 60s 2s |
| 541 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 542 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 543 | END |
Suchitra Vemuri | cd2f64f | 2020-02-18 18:30:27 -0800 | [diff] [blame] | 544 | #Run Keyword If ${has_dataplane} Clean Up Linux |
| 545 | #Check after reboot that ONUs are active, authenticated/DHCP/pingable |
| 546 | #Perform Sanity Test |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 547 | |
| 548 | *** Keywords *** |
| 549 | Setup Suite |
| 550 | [Documentation] Set up the test suite |
| 551 | Common Test Suite Setup |
HungWei Chiu | 1408fb9 | 2020-03-03 19:43:30 -0500 | [diff] [blame] | 552 | #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] | 553 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 554 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 555 | |
| 556 | Clear All Devices Then Create New Device |
| 557 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 558 | # Remove all devices from voltha and nos |
| 559 | Delete All Devices and Verify |
| 560 | # Execute normal test Setup Keyword |
| 561 | Setup |