TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 1 | # Copyright 2021 - 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 functional end-to-end scenarios for TT workflow |
| 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 |
| 34 | Resource ../../libraries/power_switch.robot |
| 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 |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 45 | ${INFRA_NAMESPACE} default |
Matteo Scandolo | a4e5952 | 2021-08-31 14:56:24 -0700 | [diff] [blame] | 46 | ${STACK_NAME} voltha |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +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 |
| 53 | ${has_dataplane} True |
Hardik Windlass | 04896f6 | 2021-03-05 16:15:11 +0530 | [diff] [blame] | 54 | ${teardown_device} True |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 55 | ${scripts} ../../scripts |
| 56 | |
| 57 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 58 | ${container_log_dir} ${None} |
| 59 | |
Matteo Scandolo | da1c64b | 2021-07-20 10:14:49 -0700 | [diff] [blame] | 60 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 61 | # example: -v logging:False |
| 62 | ${logging} True |
| 63 | |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 64 | ${suppressaddsubscriber} True |
| 65 | |
| 66 | *** Test Cases *** |
Hardik Windlass | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 67 | Verify ONU after Rebooting Physically for TT |
| 68 | [Documentation] Test the ONU functionality by physically turning on/off ONU. |
| 69 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityTT test was executed) |
| 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 | [Tags] functionalTT PowerSwitchOnuRebootTT PowerSwitch |
| 73 | [Setup] Start Logging RebootOnu_PowerSwitch_TT |
| 74 | [Teardown] Run Keywords Collect Logs |
Hardik Windlass | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 75 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 76 | ... AND Run Keyword If ${logging} Collect Logs |
| 77 | ... AND Stop Logging RebootOnu_PowerSwitch_TT |
Hardik Windlass | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 78 | # Add OLT device |
| 79 | Setup |
| 80 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 81 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 82 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 83 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
| 84 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 85 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 86 | ${src}= Set Variable ${hosts.src[${I}]} |
| 87 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 88 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 89 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 90 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 91 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 92 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 93 | # Disable Power Switch |
| 94 | Disable Switch Outlet ${src['power_switch_port']} |
| 95 | # TODO: Add verification for MCAST |
| 96 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' 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']} |
| 100 | # Remove Subscriber Access (To replicate TT 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 | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 102 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 103 | Sleep 5s |
| 104 | # Enable Power Switch |
| 105 | Enable Switch Outlet ${src['power_switch_port']} |
| 106 | # Check ONU port is Enabled in ONOS |
| 107 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Hardik Windlass | 3901567 | 2021-07-05 05:48:08 +0000 | [diff] [blame] | 108 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 109 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 110 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Hardik Windlass | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 111 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 112 | # Verify ONU state in voltha |
| 113 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
| 114 | ... ENABLED ACTIVE REACHABLE |
| 115 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 116 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' |
| 117 | ... Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 118 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 119 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 120 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 121 | ... ${dst['container_name']} |
| 122 | ... ELSE IF ${has_dataplane} and '${service_type}' == 'mcast' Run Keyword And Continue On Failure |
| 123 | ... Wait Until Keyword Succeeds ${timeout} 2s Sanity Test TT MCAST one ONU ${src} |
| 124 | ... ${dst} ${suppressaddsubscriber} |
| 125 | END |
| 126 | |
| 127 | Verify OLT after Rebooting Physically for TT |
| 128 | [Documentation] Test the physical reboot of the OLT |
| 129 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityTT test was executed) |
| 130 | ... Test performs a physical reboot, performs "reboot" from the OLT CLI |
| 131 | [Tags] functionalTT PhysicalOltRebootTT |
| 132 | [Setup] Start Logging RebootOlt_Physical_TT |
| 133 | [Teardown] Run Keywords Collect Logs |
Hardik Windlass | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 134 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 135 | ... AND Run Keyword If ${logging} Collect Logs |
| 136 | ... AND Stop Logging RebootOlt_Physical_TT |
Hardik Windlass | 364ec45 | 2021-04-14 07:12:28 +0000 | [diff] [blame] | 137 | # Add OLT device |
| 138 | Setup |
| 139 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 140 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 141 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 142 | # Reboot the OLT from the OLT CLI |
| 143 | FOR ${I} IN RANGE 0 ${olt_count} |
| 144 | ${olt_user}= Get From Dictionary ${list_olts}[${I}] user |
| 145 | ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass |
| 146 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 147 | ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn |
| 148 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 149 | Run Keyword If ${has_dataplane} Login And Run Command On Remote System |
| 150 | ... reboot ${olt_ssh_ip} ${olt_user} ${olt_pass} prompt=# |
| 151 | END |
| 152 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 153 | ${src}= Set Variable ${hosts.src[${I}]} |
| 154 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 155 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 156 | # TODO: Add verification for MCAST |
| 157 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' Run Keyword And Continue On Failure |
| 158 | ... Wait Until Keyword Succeeds 60s 2s |
| 159 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 160 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 161 | END |
| 162 | # Wait for the OLT to come back up |
| 163 | FOR ${I} IN RANGE 0 ${olt_count} |
| 164 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 165 | ${olt_user}= Get From Dictionary ${list_olts}[${I}] user |
| 166 | ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass |
| 167 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 168 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 169 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s |
| 170 | ... Check Remote System Reachability True ${olt_ssh_ip} |
| 171 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 172 | ... Validate OLT Device ENABLED ACTIVE |
| 173 | ... REACHABLE ${olt_serial_number} |
| 174 | END |
| 175 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 176 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 177 | |
Hardik Windlass | 8a8d81c | 2021-04-22 15:33:42 +0000 | [diff] [blame] | 178 | Verify ONU Soft Reboot for TT |
| 179 | [Documentation] Test the ONU Soft Reboot functionality. |
| 180 | [Tags] functionalTT OnuSoftRebootTT |
| 181 | [Setup] Start Logging SoftRebootOnu_TT |
| 182 | [Teardown] Run Keywords Collect Logs |
Hardik Windlass | 8a8d81c | 2021-04-22 15:33:42 +0000 | [diff] [blame] | 183 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 184 | ... AND Collect Logs |
| 185 | ... AND Stop Logging SoftRebootOnu_TT |
Hardik Windlass | 8a8d81c | 2021-04-22 15:33:42 +0000 | [diff] [blame] | 186 | # Add OLT device |
| 187 | Setup |
| 188 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 189 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 190 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 191 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 192 | ${src}= Set Variable ${hosts.src[${I}]} |
| 193 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 194 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 195 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 196 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 197 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 198 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 199 | Reboot Device ${onu_device_id} |
| 200 | # TODO: Add verification for MCAST |
| 201 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' Run Keyword And Continue On Failure |
| 202 | ... Wait Until Keyword Succeeds ${timeout} 2s |
| 203 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 204 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 205 | # Remove Subscriber Access (To replicate TT workflow) |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 206 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Hardik Windlass | 8a8d81c | 2021-04-22 15:33:42 +0000 | [diff] [blame] | 207 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 208 | # Check ONU port is Enabled in ONOS |
| 209 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Hardik Windlass | 3901567 | 2021-07-05 05:48:08 +0000 | [diff] [blame] | 210 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | 8a8d81c | 2021-04-22 15:33:42 +0000 | [diff] [blame] | 211 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 212 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Hardik Windlass | 8a8d81c | 2021-04-22 15:33:42 +0000 | [diff] [blame] | 213 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 214 | # Verify ONU state in voltha |
| 215 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 216 | ... ENABLED ACTIVE REACHABLE |
| 217 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 218 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' |
| 219 | ... Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 220 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 221 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 222 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 223 | ... ${dst['container_name']} |
| 224 | ... ELSE IF ${has_dataplane} and '${service_type}' == 'mcast' Run Keyword And Continue On Failure |
| 225 | ... Wait Until Keyword Succeeds ${timeout} 2s Sanity Test TT MCAST one ONU ${src} |
| 226 | ... ${dst} ${suppressaddsubscriber} |
| 227 | END |
| 228 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 229 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT ${suppressaddsubscriber} |
| 230 | |
Hardik Windlass | 656661a | 2021-04-23 03:46:31 +0000 | [diff] [blame] | 231 | Verify OLT Soft Reboot for TT |
| 232 | [Documentation] Test the OLT Soft Reboot functionality. |
| 233 | [Tags] functionalTT OltSoftRebootTT |
| 234 | [Setup] Start Logging SoftRebootOlt_TT |
| 235 | [Teardown] Run Keywords Collect Logs |
Hardik Windlass | 656661a | 2021-04-23 03:46:31 +0000 | [diff] [blame] | 236 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 237 | ... AND Collect Logs |
| 238 | ... AND Stop Logging SoftRebootOlt_TT |
Hardik Windlass | 656661a | 2021-04-23 03:46:31 +0000 | [diff] [blame] | 239 | # Add OLT device |
| 240 | Setup |
| 241 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 242 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 243 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 244 | # Reboot the OLT from the OLT CLI |
| 245 | FOR ${I} IN RANGE 0 ${olt_count} |
| 246 | ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn |
| 247 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 248 | # Reboot the OLT using "voltctl device reboot" command |
| 249 | Reboot Device ${olt_device_id} |
Andrea Campanella | 9d8d3a5 | 2021-06-17 12:18:23 +0200 | [diff] [blame] | 250 | # Wait for the OLT to actually go down |
| 251 | Wait Until Keyword Succeeds 360s 5s Validate OLT Device ENABLED UNKNOWN UNREACHABLE |
| 252 | ... ${olt_serial_number} |
Hardik Windlass | 656661a | 2021-04-23 03:46:31 +0000 | [diff] [blame] | 253 | END |
| 254 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 255 | ${src}= Set Variable ${hosts.src[${I}]} |
| 256 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 257 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 258 | # TODO: Add verification for MCAST |
| 259 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' Run Keyword And Continue On Failure |
| 260 | ... Wait Until Keyword Succeeds ${timeout} 2s |
| 261 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 262 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 263 | END |
| 264 | # Wait for the OLT to come back up |
| 265 | FOR ${I} IN RANGE 0 ${olt_count} |
| 266 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 267 | ${olt_user}= Get From Dictionary ${list_olts}[${I}] user |
| 268 | ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass |
| 269 | ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship |
| 270 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 271 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s |
| 272 | ... Check Remote System Reachability True ${olt_ssh_ip} |
| 273 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 274 | ... Validate OLT Device ENABLED ACTIVE |
| 275 | ... REACHABLE ${olt_serial_number} |
| 276 | END |
| 277 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 278 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 279 | |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 280 | Verify restart openonu-adapter container after subscriber provisioning for TT |
| 281 | [Documentation] Restart openonu-adapter container after VOLTHA is operational. |
| 282 | ... Prerequisite : ONUs are authenticated and pingable. |
Hardik Windlass | 04896f6 | 2021-03-05 16:15:11 +0530 | [diff] [blame] | 283 | [Tags] functionalTT Restart-OpenOnu-TT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 284 | [Setup] Start Logging Restart-OpenOnu-TT |
| 285 | [Teardown] Run Keywords Collect Logs |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 286 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 287 | ... AND Collect Logs |
| 288 | ... AND Stop Logging Restart-OpenOnu-TT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 289 | # Add OLT device |
| 290 | Setup |
| 291 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 292 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 293 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 294 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 295 | Log ${podStatusOutput} |
| 296 | ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 297 | ${podName} Set Variable adapter-open-onu |
| 298 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
| 299 | Sleep 5s |
| 300 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 301 | ... app ${podName} Running |
| 302 | Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName} |
| 303 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT ${suppressaddsubscriber} |
| 304 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 305 | Log ${podStatusOutput} |
| 306 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 307 | Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart} |
| 308 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
| 309 | |
Emrehan UZUN | 2884ed5 | 2021-05-04 15:36:31 +0000 | [diff] [blame] | 310 | Verify restart openolt-adapter container before subscriber provisioning for TT |
| 311 | [Documentation] Restart openolt-adapter container after VOLTHA is operational. |
| 312 | [Tags] functionalTT Restart-OpenOlt-Before-Subscription-TT |
| 313 | [Setup] Start Logging Restart-OpenOlt-Before-Subscription-TT |
| 314 | [Teardown] Run Keywords Collect Logs |
Emrehan UZUN | 2884ed5 | 2021-05-04 15:36:31 +0000 | [diff] [blame] | 315 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 316 | ... AND Collect Logs |
| 317 | ... AND Stop Logging Restart-OpenOlt-Before-Subscription-TT |
Emrehan UZUN | 2884ed5 | 2021-05-04 15:36:31 +0000 | [diff] [blame] | 318 | # Add OLT device |
| 319 | Setup |
| 320 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 321 | FOR ${I} IN RANGE 0 ${olt_count} |
| 322 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 323 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 324 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 325 | ... ${olt_serial_number} |
| 326 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 327 | ... Get NNI Port in ONOS ${of_id} |
| 328 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 329 | ... Verify Default Downstream Flows are added in ONOS for OLT TT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 330 | ... ${nni_port} |
| 331 | END |
| 332 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 333 | Log ${podStatusOutput} |
| 334 | ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 335 | ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL} |
| 336 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
| 337 | Sleep 5s |
| 338 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 339 | ... app ${podName} Running |
| 340 | Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName} |
| 341 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 342 | Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart} |
| 343 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 344 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
| 345 | |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 346 | Verify restart openolt-adapter container after subscriber provisioning for TT |
| 347 | [Documentation] Restart openolt-adapter container after VOLTHA is operational. |
| 348 | [Tags] functionalTT Restart-OpenOlt-TT |
| 349 | [Setup] Start Logging Restart-OpenOlt-TT |
| 350 | [Teardown] Run Keywords Collect Logs |
| 351 | ... AND Stop Logging Restart-OpenOlt-TT |
| 352 | Setup |
| 353 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 354 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
| 355 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 356 | Log ${podStatusOutput} |
| 357 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 358 | ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL} |
| 359 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
| 360 | Sleep 5s |
| 361 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 362 | ... app ${podName} Running |
| 363 | Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName} |
| 364 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT ${suppressaddsubscriber} |
| 365 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 366 | Log ${podStatusOutput} |
| 367 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 368 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
| 369 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
| 370 | |
| 371 | Verify restart ofagent container after subscriber is provisioned for TT |
| 372 | [Documentation] Restart ofagent container after VOLTHA is operational. |
Hardik Windlass | a9ec90d | 2021-05-27 11:33:22 +0000 | [diff] [blame] | 373 | [Tags] functionalTT ofagentRestart-TT |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 374 | [Setup] Start Logging ofagentRestart-TT |
| 375 | [Teardown] Run Keywords Collect Logs |
| 376 | ... AND Stop Logging ofagentRestart-TT |
Matteo Scandolo | a4e5952 | 2021-08-31 14:56:24 -0700 | [diff] [blame] | 377 | ... AND Scale K8s Deployment ${NAMESPACE} ${STACK_NAME}-voltha-ofagent 1 |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 378 | # set timeout value |
| 379 | ${waitforRestart} Set Variable 120s |
| 380 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 381 | Log ${podStatusOutput} |
| 382 | ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 383 | ${podName} Set Variable ofagent |
| 384 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
| 385 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 386 | ... app ${podName} Running |
| 387 | Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName} |
| 388 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | a9ec90d | 2021-05-27 11:33:22 +0000 | [diff] [blame] | 389 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test TT ${suppressaddsubscriber} |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 390 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 391 | Log ${podStatusOutput} |
| 392 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 393 | Should Be Equal As Strings ${countAfterRestart} ${countBforRestart} |
| 394 | # Scale Down the Of-Agent Deployment |
Matteo Scandolo | a4e5952 | 2021-08-31 14:56:24 -0700 | [diff] [blame] | 395 | Scale K8s Deployment ${NAMESPACE} ${STACK_NAME}-voltha-ofagent 0 |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 396 | Sleep 30s |
| 397 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 398 | ${src}= Set Variable ${hosts.src[${I}]} |
| 399 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Hardik Windlass | a9ec90d | 2021-05-27 11:33:22 +0000 | [diff] [blame] | 400 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 401 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 402 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 403 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 404 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 405 | # Verify ONU state in voltha |
| 406 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device |
| 407 | ... ENABLED ACTIVE REACHABLE |
| 408 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 409 | # Check ONU port is Disabled in ONOS |
| 410 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Hardik Windlass | 3901567 | 2021-07-05 05:48:08 +0000 | [diff] [blame] | 411 | ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 412 | # Verify Ping |
Hardik Windlass | a9ec90d | 2021-05-27 11:33:22 +0000 | [diff] [blame] | 413 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' |
| 414 | ... Run Keyword And Continue On Failure Check Ping True |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 415 | ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']} |
| 416 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 417 | END |
| 418 | # Scale Up the Of-Agent Deployment |
Matteo Scandolo | a4e5952 | 2021-08-31 14:56:24 -0700 | [diff] [blame] | 419 | Scale K8s Deployment ${NAMESPACE} ${STACK_NAME}-voltha-ofagent 1 |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 420 | Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE} |
| 421 | ... Running |
| 422 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 423 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT ${suppressaddsubscriber} |
| 424 | Log to console Pod ${podName} restarted and sanity checks passed successfully |
| 425 | |
| 426 | Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart for TT |
| 427 | [Documentation] Deploys an device instance. After that rw-core deployment is scaled to 0 instances to |
| 428 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 429 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 430 | ... complete the DHCP sequence. |
Hardik Windlass | 3e3c994 | 2021-04-09 11:37:15 +0000 | [diff] [blame] | 431 | [Tags] functionalTT rwcore-restart-TT |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 432 | [Setup] Run Keywords Start Logging RwCoreFailAndRestart-TT |
| 433 | ... AND Clear All Devices Then Create New Device |
| 434 | [Teardown] Run Keywords Collect Logs |
| 435 | ... AND Stop Logging RwCoreFailAndRestart-TT |
| 436 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 437 | FOR ${I} IN RANGE 0 ${olt_count} |
| 438 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 439 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 440 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 441 | ... ${olt_serial_number} |
| 442 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 443 | ... Get NNI Port in ONOS ${of_id} |
| 444 | END |
| 445 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 446 | ${src}= Set Variable ${hosts.src[${I}]} |
| 447 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 448 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 449 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 450 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 451 | ... ${of_id} |
| 452 | # Bring up the device and verify it authenticates |
| 453 | Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE |
Hardik Windlass | 8b44649 | 2021-06-10 06:25:23 +0000 | [diff] [blame] | 454 | ... ${onu_device_id} onu=True onu_reason=initial-mib-downloaded by_dev_id=True |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 455 | END |
| 456 | |
| 457 | # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1 |
| 458 | Scale K8s Deployment voltha voltha-voltha-rw-core 0 |
| 459 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-voltha-rw-core |
| 460 | # Ensure the ofagent POD goes "not-ready" as expected |
| 461 | Wait Until keyword Succeeds ${timeout} 2s |
| 462 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 0 |
| 463 | # Scale up the core deployment and make sure both it and the ofagent deployment are back |
| 464 | Scale K8s Deployment voltha voltha-voltha-rw-core 1 |
| 465 | Wait Until Keyword Succeeds ${timeout} 2s |
| 466 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-rw-core 1 |
| 467 | Wait Until Keyword Succeeds ${timeout} 2s |
| 468 | ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 1 |
| 469 | # For some reason scaling down and up the POD behind a service causes the port forward to stop working, |
| 470 | # so restart the port forwarding for the API service |
| 471 | Restart VOLTHA Port Forward voltha-api |
| 472 | # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this |
| 473 | # represents system connectivity being restored |
| 474 | FOR ${I} IN RANGE 0 ${olt_count} |
| 475 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 476 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 477 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 478 | ... ${olt_serial_number} |
| 479 | Wait Until Keyword Succeeds 120s 2s Device Is Available In ONOS |
| 480 | ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id} |
| 481 | END |
Hardik Windlass | 3e3c994 | 2021-04-09 11:37:15 +0000 | [diff] [blame] | 482 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Tests TT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 483 | |
Hardik Windlass | d50b020 | 2021-09-02 14:45:09 +0000 | [diff] [blame] | 484 | Verify restart openonu-adapter container while continuously running ping in background for TT |
| 485 | [Documentation] Restart openonu-adapter container after VOLTHA is operational. |
| 486 | ... Run the ping continuously in background during container restart, |
| 487 | ... and verify that there should be no affect on the dataplane. |
| 488 | [Tags] functionalTT Restart-OpenOnu-Ping-TT non-critical |
| 489 | [Setup] Start Logging Restart-OpenOnu-Ping-TT |
| 490 | [Teardown] Run Keywords Collect Logs |
| 491 | ... AND Stop Logging Restart-OpenOnu-Ping-TT |
| 492 | Clear All Devices Then Create New Device |
| 493 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 494 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 495 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test TT |
| 496 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 497 | ${src}= Set Variable ${hosts.src[${I}]} |
| 498 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 499 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 500 | Continue For Loop If '${service_type}' == 'mcast' |
| 501 | ${ping_output_file}= Set Variable /tmp/${src['onu']}_${service_type}_ping |
| 502 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 503 | ... Wait Until Keyword Succeeds 60s 2s |
| 504 | ... Run Ping In Background ${ping_output_file} ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 505 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 506 | END |
| 507 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 508 | Log ${podStatusOutput} |
| 509 | ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 510 | ${podName} Set Variable adapter-open-onu |
| 511 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
| 512 | Sleep 5s |
| 513 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 514 | ... app ${podName} Running |
| 515 | Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName} |
| 516 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 517 | Log ${podStatusOutput} |
| 518 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 519 | Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart} |
| 520 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 521 | ${src}= Set Variable ${hosts.src[${I}]} |
| 522 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 523 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 524 | Continue For Loop If '${service_type}' == 'mcast' |
| 525 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 526 | ... Wait Until Keyword Succeeds 60s 2s |
| 527 | ... Stop Ping Running In Background ${src['ip']} ${src['user']} ${src['pass']} |
| 528 | ... ${src['container_type']} ${src['container_name']} |
| 529 | END |
| 530 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 531 | ${src}= Set Variable ${hosts.src[${I}]} |
| 532 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 533 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 534 | Continue For Loop If '${service_type}' == 'mcast' |
| 535 | ${ping_output_file}= Set Variable /tmp/${src['onu']}_${service_type}_ping |
| 536 | ${ping_output}= Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 537 | ... Wait Until Keyword Succeeds 60s 2s |
| 538 | ... Retrieve Remote File Contents ${ping_output_file} ${src['ip']} ${src['user']} ${src['pass']} |
| 539 | ... ${src['container_type']} ${src['container_name']} |
| 540 | Check Ping Result True ${ping_output} |
| 541 | END |
| 542 | |
| 543 | Verify restart openolt-adapter container while continuously running ping in background for TT |
| 544 | [Documentation] Restart openolt-adapter container after VOLTHA is operational. |
| 545 | ... Run the ping continuously in background during container restart, |
| 546 | ... and verify that there should be no affect on the dataplane. |
| 547 | [Tags] functionalTT Restart-OpenOlt-Ping-TT non-critical |
| 548 | [Setup] Start Logging Restart-OpenOlt-Ping-TT |
| 549 | [Teardown] Run Keywords Collect Logs |
| 550 | ... AND Stop Logging Restart-OpenOlt-Ping-TT |
| 551 | Clear All Devices Then Create New Device |
| 552 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 553 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 554 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test TT |
| 555 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 556 | ${src}= Set Variable ${hosts.src[${I}]} |
| 557 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 558 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 559 | Continue For Loop If '${service_type}' == 'mcast' |
| 560 | ${ping_output_file}= Set Variable /tmp/${src['onu']}_${service_type}_ping |
| 561 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 562 | ... Wait Until Keyword Succeeds 60s 2s |
| 563 | ... Run Ping In Background ${ping_output_file} ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 564 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 565 | END |
| 566 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 567 | Log ${podStatusOutput} |
| 568 | ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 569 | ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL} |
| 570 | Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName} |
| 571 | Sleep 5s |
| 572 | Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE} |
| 573 | ... app ${podName} Running |
| 574 | Wait Until Keyword Succeeds ${timeout} 3s Pods Are Ready By Label ${NAMESPACE} app ${podName} |
| 575 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 576 | Log ${podStatusOutput} |
| 577 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 578 | Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart} |
| 579 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 580 | ${src}= Set Variable ${hosts.src[${I}]} |
| 581 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 582 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 583 | Continue For Loop If '${service_type}' == 'mcast' |
| 584 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 585 | ... Wait Until Keyword Succeeds 60s 2s |
| 586 | ... Stop Ping Running In Background ${src['ip']} ${src['user']} ${src['pass']} |
| 587 | ... ${src['container_type']} ${src['container_name']} |
| 588 | END |
| 589 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 590 | ${src}= Set Variable ${hosts.src[${I}]} |
| 591 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 592 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 593 | Continue For Loop If '${service_type}' == 'mcast' |
| 594 | ${ping_output_file}= Set Variable /tmp/${src['onu']}_${service_type}_ping |
| 595 | ${ping_output}= Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 596 | ... Wait Until Keyword Succeeds 60s 2s |
| 597 | ... Retrieve Remote File Contents ${ping_output_file} ${src['ip']} ${src['user']} ${src['pass']} |
| 598 | ... ${src['container_type']} ${src['container_name']} |
| 599 | Check Ping Result True ${ping_output} |
| 600 | END |
| 601 | |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 602 | *** Keywords *** |
| 603 | Setup Suite |
| 604 | [Documentation] Set up the test suite |
| 605 | Common Test Suite Setup |
| 606 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 607 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
| 608 | |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 609 | Teardown Suite |
| 610 | [Documentation] Tear down steps for the suite |
| 611 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 04896f6 | 2021-03-05 16:15:11 +0530 | [diff] [blame] | 612 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 613 | Close All ONOS SSH Connections |
Hardik Windlass | d3f6389 | 2021-03-25 08:28:02 +0000 | [diff] [blame] | 614 | |
| 615 | Clear All Devices Then Create New Device |
| 616 | [Documentation] Remove any devices from VOLTHA and ONOS & then Create new devices |
| 617 | # Remove all devices from voltha and onos |
| 618 | Delete All Devices and Verify |
| 619 | # Execute normal test Setup Keyword |
| 620 | Setup |