Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [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. |
| 14 | # FIXME Can we use the same test against BBSim and Hardware? |
| 15 | |
| 16 | *** Settings *** |
| 17 | Documentation Test various end-to-end scenarios |
| 18 | Suite Setup Setup Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Suite Teardown Teardown Suite |
| 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
| 27 | Library ../../libraries/DependencyLibrary.py |
| 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils.robot |
| 32 | Resource ../../libraries/k8s.robot |
| 33 | Resource ../../variables/variables.robot |
Andrea Campanella | 15619c7 | 2020-04-30 09:48:04 +0200 | [diff] [blame] | 34 | Resource ../../libraries/power_switch.robot |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [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 |
| 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 |
| 51 | ${has_dataplane} True |
| 52 | ${teardown_device} False |
| 53 | ${scripts} ../../scripts |
| 54 | |
| 55 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 56 | ${container_log_dir} ${None} |
| 57 | |
| 58 | *** Test Cases *** |
| 59 | Verify ONU after Rebooting Physically for DT |
| 60 | [Documentation] Test the ONU functionality by physically turning on/off ONU. |
| 61 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 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 | [Tags] functionalDt PowerSwitchOnuRebootDt VOL-2819 PowerSwitch |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 65 | [Setup] Start Logging RebootOnu_PowerSwitch_Dt |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 66 | [Teardown] Run Keywords Collect Logs |
| 67 | ... AND Stop Logging RebootOnu_PowerSwitch_Dt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 68 | ... AND Delete All Devices and Verify |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 69 | # Add OLT device |
| 70 | Setup |
| 71 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 72 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 73 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 74 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
Hardik Windlass | 2eb4718 | 2020-05-19 20:24:12 +0530 | [diff] [blame] | 75 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 76 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 77 | ${src}= Set Variable ${hosts.src[${I}]} |
| 78 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 79 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 0560f80 | 2020-05-06 23:06:53 +0530 | [diff] [blame] | 80 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 81 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 82 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 83 | # Disable Power Switch |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 84 | Disable Switch Outlet ${src['power_switch_port']} |
| 85 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 86 | ... Wait Until Keyword Succeeds 60s 2s |
| 87 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 88 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 89 | # Remove Subscriber Access (To replicate DT workflow) |
| 90 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 91 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 1b8d7b8 | 2020-05-29 21:10:12 -0700 | [diff] [blame] | 92 | Sleep 10s |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 93 | # Delete ONU Device (To replicate DT workflow) |
| 94 | Delete Device ${onu_device_id} |
| 95 | Sleep 5s |
| 96 | # Enable Power Switch |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 97 | Enable Switch Outlet ${src['power_switch_port']} |
Hardik Windlass | 40ccffb | 2020-05-11 14:12:07 +0530 | [diff] [blame] | 98 | # Waiting extra time for the ONU to come up |
| 99 | Sleep 60s |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 100 | # Check ONU port is Enabled in ONOS |
| 101 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 102 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 103 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 104 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 105 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 106 | # Verify ONU state in voltha |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 107 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 108 | ... ENABLED ACTIVE REACHABLE |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 109 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 110 | # Verify subscriber access flows are added for the ONU port |
| 111 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 112 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 113 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
Hardik Windlass | 2eb4718 | 2020-05-19 20:24:12 +0530 | [diff] [blame] | 114 | #Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 115 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 116 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 117 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 118 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 119 | ... ${dst['container_name']} |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 120 | Run Keyword And Ignore Error Collect Logs |
| 121 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 122 | # Verify flows for all OLTs |
| 123 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 124 | |
| 125 | Verify OLT after Rebooting Physically for DT |
| 126 | [Documentation] Test the physical reboot of the OLT |
| 127 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 128 | ... Test performs a physical reboot, performs "reboot" from the OLT CLI |
| 129 | [Tags] functionalDt PhysicalOltRebootDt VOL-2817 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 130 | [Setup] Start Logging RebootOlt_Physical_Dt |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 131 | [Teardown] Run Keywords Collect Logs |
| 132 | ... AND Stop Logging RebootOlt_Physical_Dt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 133 | ... AND Delete All Devices and Verify |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 134 | # Add OLT device |
| 135 | Setup |
| 136 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 137 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 138 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 139 | # Reboot the OLT from the OLT CLI |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 140 | FOR ${I} IN RANGE 0 ${olt_count} |
| 141 | ${olt_user}= Get From Dictionary ${list_olts}[${I}] user |
| 142 | ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass |
| 143 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 144 | ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn |
| 145 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 146 | Run Keyword If ${has_dataplane} Login And Run Command On Remote System |
| 147 | ... sudo reboot ${olt_ssh_ip} ${olt_user} ${olt_pass} prompt=# |
| 148 | Run Keyword And Ignore Error Collect Logs |
| 149 | END |
| 150 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 151 | ${src}= Set Variable ${hosts.src[${I}]} |
| 152 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 153 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 154 | ... Wait Until Keyword Succeeds 60s 2s |
| 155 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 156 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 157 | END |
| 158 | # Wait for the OLT to come back up |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 159 | FOR ${I} IN RANGE 0 ${olt_count} |
| 160 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 161 | ${olt_user}= Get From Dictionary ${list_olts}[${I}] user |
| 162 | ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass |
| 163 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 164 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 165 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s |
| 166 | ... Check Remote System Reachability True ${olt_ssh_ip} |
| 167 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 168 | ... Validate OLT Device ENABLED ACTIVE |
| 169 | ... REACHABLE ${olt_serial_number} |
| 170 | END |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 171 | # Waiting extra time for the ONUs to come up |
| 172 | Sleep 60s |
| 173 | Run Keyword And Ignore Error Collect Logs |
| 174 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 175 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 176 | |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 177 | Verify restart openolt-adapter container after subscriber provisioning for DT |
| 178 | [Documentation] Restart openolt-adapter container after VOLTHA is operational. |
| 179 | ... Prerequisite : ONUs are authenticated and pingable. |
| 180 | [Tags] functionalDt Restart-OpenOlt-Dt |
| 181 | [Setup] Start Logging Restart-OpenOlt-Dt |
| 182 | [Teardown] Run Keywords Collect Logs |
| 183 | ... AND Stop Logging Restart-OpenOlt-Dt |
| 184 | # Add OLT device |
| 185 | setup |
| 186 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 187 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 188 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 189 | ${waitforRestart} Set Variable 120s |
| 190 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 191 | Log ${podStatusOutput} |
| 192 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 193 | ${podName} Set Variable adapter-open-olt |
| 194 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
| 195 | Sleep 5s |
| 196 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 197 | ... app ${podName} Running |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 198 | # Wait for 1min after openolt adapter is restarted |
| 199 | Sleep 60s |
| 200 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 201 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 202 | Run Keyword and Ignore Error Collect Logs |
| 203 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 204 | Log ${podStatusOutput} |
| 205 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 206 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
| 207 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
| 208 | |
| 209 | Verify openolt adapter restart before subscriber provisioning for DT |
| 210 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 211 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 212 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 213 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 214 | ... complete the DHCP sequence. |
| 215 | [Tags] functionalDt olt-adapter-restart-Dt |
| 216 | [Setup] Start Logging OltAdapterRestart-Dt |
| 217 | #... AND Clear All Devices Then Create New Device |
| 218 | [Teardown] Run Keywords Collect Logs |
| 219 | ... AND Stop Logging OltAdapterRestart-Dt |
| 220 | # Add OLT and perform sanity test |
| 221 | #setup |
| 222 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 223 | #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 224 | Set Global Variable ${of_id} |
| 225 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 226 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 227 | ${src}= Set Variable ${hosts.src[${I}]} |
| 228 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 229 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 230 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 231 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 232 | ... ${of_id} |
| 233 | # Bring up the device and verify it authenticates |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 234 | Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 235 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
| 236 | END |
| 237 | # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1 |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 238 | Scale K8s Deployment voltha open-olt-voltha-adapter-openolt 0 |
| 239 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha open-olt-voltha-adapter-openolt |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 240 | # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 241 | Scale K8s Deployment voltha open-olt-voltha-adapter-openolt 1 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 242 | Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 243 | ... Check Expected Available Deployment Replicas voltha open-olt-voltha-adapter-openolt 1 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 244 | |
| 245 | # 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] | 246 | FOR ${I} IN RANGE 0 ${olt_count} |
| 247 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 248 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 249 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 250 | ... ${olt_serial_number} |
| 251 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
| 252 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
| 253 | END |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 254 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 255 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 256 | ${src}= Set Variable ${hosts.src[${I}]} |
| 257 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 258 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 259 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 260 | ... ${of_id} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 261 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 262 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 263 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 264 | # Verify subscriber access flows are added for the ONU port |
| 265 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 266 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 267 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 268 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 269 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 270 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 271 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 272 | ... ${dst['container_name']} |
| 273 | END |
| 274 | |
| 275 | Verify restart ofagent container after subscriber is provisioned for DT |
| 276 | [Documentation] Restart ofagent container after VOLTHA is operational. |
| 277 | ... Prerequisite : ONUs are authenticated and pingable. |
| 278 | [Tags] functionalDt ofagentRestart-Dt |
| 279 | [Setup] Start Logging ofagentRestart-Dt |
| 280 | [Teardown] Run Keywords Collect Logs |
| 281 | ... AND Stop Logging ofagentRestart-Dt |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 282 | ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 283 | # set timeout value |
| 284 | ${waitforRestart} Set Variable 120s |
| 285 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 286 | Log ${podStatusOutput} |
| 287 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 288 | ${podName} Set Variable ofagent |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 289 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 290 | Sleep 60s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 291 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 292 | ... app ${podName} Running |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 293 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 294 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 295 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 296 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 297 | Log ${podStatusOutput} |
| 298 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 299 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
| 300 | # Scale Down the Of-Agent Deployment |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 301 | Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 0 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 302 | Sleep 30s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 303 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 304 | ${src}= Set Variable ${hosts.src[${I}]} |
| 305 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 306 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 307 | Run Keyword and Ignore Error Collect Logs |
| 308 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 309 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 310 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 311 | # Verify ONU state in voltha |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 312 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 313 | ... ENABLED ACTIVE REACHABLE |
| 314 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 315 | # Check ONU port is Disabled in ONOS |
| 316 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 317 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 318 | # Verify subscriber access flows are added for the ONU port |
| 319 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 320 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 321 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 322 | # Verify Ping |
| 323 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Check Ping True |
| 324 | ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']} |
| 325 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 326 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 327 | Run Keyword and Ignore Error Collect Logs |
| 328 | END |
| 329 | # Scale Up the Of-Agent Deployment |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 330 | Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 331 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE} |
| 332 | ... Running |
| 333 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 334 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 335 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 336 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
| 337 | |
| 338 | Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart for DT |
| 339 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 340 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 341 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 342 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 343 | ... complete the DHCP sequence. |
| 344 | [Tags] functionalDt rwcore-restart-Dt |
| 345 | [Setup] Run Keywords Start Logging RwCoreFailAndRestart-Dt |
| 346 | ... AND Clear All Devices Then Create New Device |
| 347 | [Teardown] Run Keywords Collect Logs |
| 348 | ... AND Stop Logging RwCoreFailAndRestart-Dt |
| 349 | #... AND Delete Device and Verify |
| 350 | Run Keyword and Ignore Error Collect Logs |
| 351 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 352 | FOR ${I} IN RANGE 0 ${olt_count} |
| 353 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 354 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 355 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 356 | ... ${olt_serial_number} |
| 357 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 358 | ... Get NNI Port in ONOS ${of_id} |
| 359 | # Set Global Variable ${nni_port} |
| 360 | END |
| 361 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 362 | ${src}= Set Variable ${hosts.src[${I}]} |
| 363 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 364 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 365 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 366 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 367 | ... ${of_id} |
| 368 | # Bring up the device and verify it authenticates |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 369 | Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 370 | ... ${onu_device_id} onu=True onu_reason=initial-mib-downloaded |
| 371 | END |
| 372 | |
| 373 | # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1 |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 374 | Scale K8s Deployment voltha voltha-voltha-rw-core 0 |
| 375 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-voltha-rw-core |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 376 | # Ensure the ofagent POD goes "not-ready" as expected |
| 377 | Wait Until keyword Succeeds ${timeout} 2s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 378 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 0 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 379 | # Scale up the core deployment and make sure both it and the ofagent deployment are back |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 380 | Scale K8s Deployment voltha voltha-voltha-rw-core 1 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 381 | Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 382 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-rw-core 1 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 383 | Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 79b40ff | 2020-06-11 22:55:47 +0530 | [diff] [blame] | 384 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 1 |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 385 | # For some reason scaling down and up the POD behind a service causes the port forward to stop working, |
| 386 | # so restart the port forwarding for the API service |
David Bainbridge | 07321ff | 2020-06-12 13:55:42 -0700 | [diff] [blame] | 387 | Restart VOLTHA Port Forward voltha-api |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 388 | # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this |
| 389 | # represents system connectivity being restored |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 390 | FOR ${I} IN RANGE 0 ${olt_count} |
| 391 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 392 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 393 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 394 | ... ${olt_serial_number} |
| 395 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
| 396 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
| 397 | END |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 398 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 399 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | 5209462 | 2020-05-12 15:54:24 -0700 | [diff] [blame] | 400 | ${src}= Set Variable ${hosts.src[${I}]} |
| 401 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 402 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | 5209462 | 2020-05-12 15:54:24 -0700 | [diff] [blame] | 403 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 404 | ... ${of_id} |
Hardik Windlass | 9df139e | 2020-04-24 14:54:54 +0530 | [diff] [blame] | 405 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 406 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 407 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 408 | # Verify subscriber access flows are added for the ONU port |
| 409 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 410 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 411 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 412 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 413 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 414 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 415 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 416 | ... ${dst['container_name']} |
| 417 | END |
| 418 | |
Hema | df00368 | 2020-04-28 21:22:22 +0530 | [diff] [blame] | 419 | Verify OLT Soft Reboot for DT |
| 420 | [Documentation] Test soft reboot of the OLT using voltctl command |
| 421 | [Tags] VOL-2818 OLTSoftRebootDt notready |
| 422 | [Setup] Start Logging OLTSoftRebootDt |
| 423 | #... AND Setup |
| 424 | [Teardown] Run Keywords Collect Logs |
| 425 | ... AND Stop Logging OLTSoftRebootDt |
| 426 | #... AND Delete Device and Verify |
Hema | df00368 | 2020-04-28 21:22:22 +0530 | [diff] [blame] | 427 | # Reboot the OLT using "voltctl device reboot" command |
| 428 | Reboot Device ${olt_device_id} |
| 429 | Run Keyword And Ignore Error Collect Logs |
| 430 | #Verify that ping fails |
| 431 | FOR ${I} IN RANGE 0 ${num_onus} |
| 432 | ${src}= Set Variable ${hosts.src[${I}]} |
| 433 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 434 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 435 | ... Wait Until Keyword Succeeds 60s 2s |
| 436 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 437 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 438 | END |
| 439 | # Wait for the OLT to come back up |
| 440 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s |
Suchitra Vemuri | b7253a5 | 2020-07-14 22:35:17 -0700 | [diff] [blame] | 441 | ... Check Remote System Reachability True ${olt_ssh_ip} |
Hema | df00368 | 2020-04-28 21:22:22 +0530 | [diff] [blame] | 442 | # Waiting extra time for the ONUs to come up |
| 443 | Sleep 60s |
| 444 | # Check OLT states |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 445 | Wait Until Keyword Succeeds 360s 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
Hema | df00368 | 2020-04-28 21:22:22 +0530 | [diff] [blame] | 446 | ... ${olt_serial_number} |
| 447 | Run Keyword And Ignore Error Collect Logs |
| 448 | #Check after reboot that ONUs are active, DHCP and pingable |
| 449 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 450 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 451 | |
Hema | 8c1a032 | 2020-05-26 16:02:32 +0530 | [diff] [blame] | 452 | Verify ONU Soft Reboot for DT |
| 453 | [Documentation] Test soft reboot of the ONU using voltctl command |
| 454 | [Tags] VOL-2820 ONUSoftRebootDt notready |
| 455 | [Setup] Start Logging ONUSoftRebootDt |
| 456 | #... AND Setup |
| 457 | [Teardown] Run Keywords Collect Logs |
| 458 | ... AND Stop Logging ONUSoftRebootDt |
| 459 | #... AND Delete Device and Verify |
Hema | 8c1a032 | 2020-05-26 16:02:32 +0530 | [diff] [blame] | 460 | #Reboot the ONU and verify that ping fails |
| 461 | FOR ${I} IN RANGE 0 ${num_onus} |
| 462 | ${src}= Set Variable ${hosts.src[${I}]} |
| 463 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 464 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 465 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 466 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 467 | Reboot Device ${onu_device_id} |
| 468 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 469 | ... Wait Until Keyword Succeeds 60s 2s |
| 470 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 471 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 472 | Verify ping is succesful except for given device ${num_onus} ${onu_device_id} |
| 473 | # Remove Subscriber Access (To replicate DT workflow) |
| 474 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 475 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 476 | # Delete ONU Device (To replicate DT workflow) |
| 477 | Delete Device ${onu_device_id} |
| 478 | Sleep 40s |
| 479 | # Check ONU port is Enabled in ONOS |
| 480 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 481 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hema | 8c1a032 | 2020-05-26 16:02:32 +0530 | [diff] [blame] | 482 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 483 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 484 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 485 | # Verify ONU state in voltha |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 486 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
Hema | 8c1a032 | 2020-05-26 16:02:32 +0530 | [diff] [blame] | 487 | ... ENABLED ACTIVE REACHABLE |
| 488 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 489 | # Verify subscriber access flows are added for the ONU port |
| 490 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 491 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 492 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 493 | #Run Keyword If ${has_dataplane} Clean Up Linux |
| 494 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 495 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 496 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 497 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 498 | ... ${dst['container_name']} |
| 499 | Run Keyword And Ignore Error Collect Logs |
| 500 | END |
| 501 | # Verify ONOS Flows |
| 502 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 503 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 504 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 505 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 506 | ... ${of_id} ${onos_flows_count} |
| 507 | # Verify VOLTHA Flows |
| 508 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 509 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 510 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 511 | ${onu_flows}= Set Variable 2 |
| 512 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 513 | ${List_ONU_Serial} Create List |
| 514 | Set Suite Variable ${List_ONU_Serial} |
| 515 | Build ONU SN List ${List_ONU_Serial} |
| 516 | Log ${List_ONU_Serial} |
| 517 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 518 | ... ${List_ONU_Serial} ${onu_flows} |
Hema | df00368 | 2020-04-28 21:22:22 +0530 | [diff] [blame] | 519 | |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 520 | *** Keywords *** |
| 521 | Setup Suite |
| 522 | [Documentation] Set up the test suite |
| 523 | Common Test Suite Setup |
Andrea Campanella | 15619c7 | 2020-04-30 09:48:04 +0200 | [diff] [blame] | 524 | #power_switch.robot needs it to support different vendor's power switch |
| 525 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 526 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Hardik Windlass | b9bdd50 | 2020-04-17 14:46:21 +0530 | [diff] [blame] | 527 | |
| 528 | Clear All Devices Then Create New Device |
| 529 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 530 | # Remove all devices from voltha and nos |
| 531 | Delete All Devices and Verify |
| 532 | # Execute normal test Setup Keyword |
| 533 | Setup |
| 534 | |