Joey Armstrong | 9fadcbe | 2024-01-17 19:00:37 -0500 | [diff] [blame] | 1 | # Copyright 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 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 |
TorstenThieme | 78c0950 | 2022-01-19 13:44:19 +0000 | [diff] [blame] | 35 | Resource ../../libraries/onu_utilities.robot |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 36 | |
| 37 | *** Variables *** |
| 38 | ${POD_NAME} flex-ocp-cord |
| 39 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 40 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 41 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 42 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 43 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 44 | ${VOLTHA_POD_NUM} 8 |
| 45 | ${NAMESPACE} voltha |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 46 | ${INFRA_NAMESPACE} default |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [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 |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 55 | ${scripts} ../../scripts |
TorstenThieme | 78c0950 | 2022-01-19 13:44:19 +0000 | [diff] [blame] | 56 | ${data_dir} ../data |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 57 | # flag to reboot OLT through Power Switch |
| 58 | ${power_cycle_olt} False |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 59 | |
| 60 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 61 | ${container_log_dir} ${None} |
| 62 | |
Matteo Scandolo | da1c64b | 2021-07-20 10:14:49 -0700 | [diff] [blame] | 63 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 64 | # example: -v logging:False |
| 65 | ${logging} True |
| 66 | |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 67 | ${suppressaddsubscriber} True |
| 68 | |
Hardik Windlass | c609eb0 | 2022-02-22 11:28:37 +0000 | [diff] [blame] | 69 | # flag to choose if mac-learning is enabled, or disabled (i.e. mac-address is configured) |
| 70 | # example: -v with_maclearning:True |
| 71 | ${with_maclearning} False |
| 72 | |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 73 | # flag to choose the subscriber provisioning command type in ONOS |
| 74 | # TT often provision a single services for a subscriber (eg: hsia, voip, ...) one after the other. |
| 75 | # if set to True, command used is "volt-add-subscriber-unitag" |
| 76 | # if set to False, comand used is "volt-add-subscriber-access" |
| 77 | ${unitag_sub} False |
| 78 | |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 79 | *** Test Cases *** |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 80 | Reboot TT ONUs and OLTs Physically - Clean Up |
| 81 | [Documentation] This test reboots ONUs and OLTs physically before execution all the tests |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 82 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 83 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 84 | [Tags] functionalTT PowerSwitch RebootAllTTONUsOLTs |
| 85 | [Setup] Start Logging RebootAllTTONUsOLTs |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 86 | [Teardown] Run Keywords Collect Logs |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 87 | ... AND Stop Logging RebootAllTTONUsOLTs |
| 88 | Perform Reboot ONUs and OLTs Physically ${power_cycle_olt} |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 89 | |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 90 | Sanity E2E Test for TT (HSIA, VoD, VoIP) |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 91 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 92 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 93 | ... Traffic sent with same vlan from different RGs, |
| 94 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 95 | ... Inner vlans from the RG should not change |
| 96 | [Tags] sanityTT |
| 97 | [Setup] Run Keywords Start Logging SanityTestTT |
| 98 | ... AND Setup |
| 99 | [Teardown] Run Keywords Collect Logs |
| 100 | ... AND Stop Logging SanityTestTT |
| 101 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | c609eb0 | 2022-02-22 11:28:37 +0000 | [diff] [blame] | 102 | Perform Sanity Test TT maclearning_enabled=${with_maclearning} |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 103 | |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 104 | Sanity E2E Test for TT (MCAST) |
| 105 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 106 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 107 | ... Traffic sent with same vlan from different RGs, |
| 108 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 109 | ... Inner vlans from the RG should not change |
| 110 | [Tags] sanityTT-MCAST |
| 111 | [Setup] Run Keyword Start Logging SanityTestTT-MCAST |
| 112 | [Teardown] Run Keywords Collect Logs |
| 113 | ... AND Stop Logging SanityTestTT-MCAST |
| 114 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 115 | Perform Sanity Test TT MCAST |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 116 | |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 117 | Test Disable and Delete OLT for TT |
| 118 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 119 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityTt test was executed) |
| 120 | ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed |
| 121 | ... Perform delete on the OLT, Re-do Setup (Recreate the OLT) and Perform Sanity Test TT |
Huseyin Ahmet AYDIN | 45922c8 | 2021-05-27 12:37:32 +0000 | [diff] [blame] | 122 | [Tags] functionalTT DisableDeleteOLTTt |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 123 | [Setup] Start Logging DisableDeleteOLTTt |
| 124 | [Teardown] Run Keywords Collect Logs |
| 125 | ... AND Stop Logging DisableDeleteOLTTt |
Huseyin Ahmet AYDIN | 45922c8 | 2021-05-27 12:37:32 +0000 | [diff] [blame] | 126 | @{particular_onu_device_port}= Create List |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 127 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 128 | ${src}= Set Variable ${hosts.src[${I}]} |
| 129 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 130 | ... ${of_id} ${src['uni_id']} |
| 131 | Append To List ${particular_onu_device_port} ${onu_port} |
| 132 | END |
| 133 | ${list_onu_port}= Remove Duplicates ${particular_onu_device_port} |
| 134 | ${num_of_provisioned_onus}= Get Length ${list_onu_port} |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 135 | # Disable and Validate OLT Device |
| 136 | FOR ${I} IN RANGE 0 ${olt_count} |
| 137 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 138 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 139 | Disable Device ${olt_device_id} |
| 140 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 141 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 142 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 143 | ... ${olt_serial_number} |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 144 | ${num_onus}= Set Variable ${list_olts}[${I}][onucount] |
| 145 | # Validate ONUs |
| 146 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONUs After OLT Disable |
| 147 | ... ${num_onus} ${olt_serial_number} |
| 148 | # Verify ONOS Flows |
Hardik Windlass | 7058103 | 2022-06-29 15:02:04 +0530 | [diff] [blame] | 149 | # When we disable the device should only have 3 default flows LLDP, IGMP and DHCP |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 150 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 7058103 | 2022-06-29 15:02:04 +0530 | [diff] [blame] | 151 | ... Verify Added Flow Count for OLT TT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} 3 |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 152 | # Verify VOLTHA Flows |
Hardik Windlass | 7058103 | 2022-06-29 15:02:04 +0530 | [diff] [blame] | 153 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows 3 |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 154 | ... ${olt_device_id} |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 155 | # Delete OLT and Validate Empty Device List |
| 156 | Delete Device ${olt_device_id} |
| 157 | # Check that the OLT and the ONUs are actually removed from the system |
| 158 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed |
| 159 | ... ${olt_serial_number} |
| 160 | Run Keyword and Continue On Failure Validate all ONUS for OLT Removed ${num_all_onus} ${hosts} |
| 161 | ... ${olt_serial_number} ${timeout} |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 162 | Wait Until Keyword Succeeds ${timeout} 5s |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 163 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 164 | END |
| 165 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test TT |
| 166 | Run Keyword Setup |
| 167 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 168 | Perform Sanity Tests TT |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 169 | |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 170 | Verify re-provisioning subscriber after removing provisoned subscriber for TT |
| 171 | [Documentation] Removing/Readding a particular subscriber should have no effect on any other subscriber. |
| 172 | [Tags] functionalTT Readd-subscriber-TT |
| 173 | [Setup] Start Logging Readd-subscriber-TT |
| 174 | [Teardown] Run Keywords Collect Logs |
| 175 | ... AND Stop Logging Readd-subscriber-TT |
| 176 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 177 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 178 | ${src}= Set Variable ${hosts.src[${I}]} |
| 179 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 180 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 181 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 182 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 183 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 184 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 185 | # Remove Subscriber Access |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 186 | ${del_sub_cmd}= Run Keyword If ${unitag_sub} |
| 187 | ... Catenate volt-remove-subscriber-unitag --tpId ${src['tp_id']} --sTag ${src['s_tag']} |
| 188 | ... --cTag ${src['c_tag']} ${src['onu']}-${src['uni_id']} |
| 189 | ... ELSE |
| 190 | ... Set Variable volt-remove-subscriber-access ${of_id} ${onu_port} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 191 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 192 | ... ${ONOS_SSH_PORT} ${del_sub_cmd} |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 193 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 194 | ... Wait Until Keyword Succeeds ${timeout} 5s |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 195 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 196 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Girish Gowdra | b1ef793 | 2021-10-29 10:57:47 -0700 | [diff] [blame] | 197 | ... ELSE Sleep 10s Wait for flows to be deleted |
Hardik Windlass | 88075f9 | 2022-01-25 12:19:45 +0000 | [diff] [blame] | 198 | Run Keyword If ${unitag_sub} and '${service_type}' != 'mcast' |
| 199 | ... Wait Until Keyword Succeeds ${timeout} 2s Verify UniTag Subscriber ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 200 | ... ${of_id} ${onu_port} ${src['s_tag']} ${src['c_tag']} ${src['tp_id']} False |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 201 | # Verify VOLTHA flows for ONU under test is Zero |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 202 | # TODO: Fix ${onu_flows} calculations based on UNIs provisioned |
| 203 | # Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 204 | # ... ${onu_device_id} 0 |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 205 | # Add Subscriber Access |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 206 | ${add_sub_cmd}= Run Keyword If ${unitag_sub} |
| 207 | ... Catenate volt-add-subscriber-unitag --tpId ${src['tp_id']} --sTag ${src['s_tag']} |
| 208 | ... --cTag ${src['c_tag']} ${src['onu']}-${src['uni_id']} |
| 209 | ... ELSE |
| 210 | ... Set Variable volt-add-subscriber-access ${of_id} ${onu_port} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 211 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 212 | ... ${ONOS_SSH_PORT} ${add_sub_cmd} |
Hardik Windlass | 88075f9 | 2022-01-25 12:19:45 +0000 | [diff] [blame] | 213 | Run Keyword If ${unitag_sub} and '${service_type}' != 'mcast' |
| 214 | ... Wait Until Keyword Succeeds ${timeout} 2s Verify UniTag Subscriber ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 215 | ... ${of_id} ${onu_port} ${src['s_tag']} ${src['c_tag']} ${src['tp_id']} |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 216 | Wait Until Keyword Succeeds ${timeout} 5s |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 217 | ... Validate Device ENABLED ACTIVE |
| 218 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | 5a2d1f4 | 2021-11-12 12:52:04 +0000 | [diff] [blame] | 219 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 220 | ... Sanity Test TT one ONU ${src} ${dst} ${suppressaddsubscriber} |
Hardik Windlass | 5a2d1f4 | 2021-11-12 12:52:04 +0000 | [diff] [blame] | 221 | ... ELSE IF ${has_dataplane} and '${service_type}' == 'mcast' |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 222 | ... Sanity Test TT MCAST one ONU ${src} ${dst} ${suppressaddsubscriber} |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 223 | END |
| 224 | |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 225 | Test Disable and Enable ONU for TT |
| 226 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 227 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanitytt test was executed) |
| 228 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 229 | ... Perform enable on the ONUs and validate that the pings are successful |
| 230 | [Tags] functionalTT DisableEnableONUTT |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 231 | [Setup] Run Keywords Start Logging DisableEnableONUTT |
| 232 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 233 | [Teardown] Run Keywords Collect Logs |
| 234 | ... AND Stop Logging DisableEnableONUTT |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 235 | @{onu_list}= Create List |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 236 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 237 | ${src}= Set Variable ${hosts.src[${I}]} |
| 238 | ${dst}= Set Variable ${hosts.dst[${I}]} |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 239 | ${sn}= Set Variable ${src['onu']} |
| 240 | # make sure all actions do only once per onu |
| 241 | ${onu_id}= Get Index From List ${onu_list} ${sn} |
| 242 | Continue For Loop If -1 != ${onu_id} |
| 243 | Append To List ${onu_list} ${sn} |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 244 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 245 | ${onu_port}= Get Onu Ports in ONOS For ALL UNI per ONU ${src['onu']} ${of_id} |
| 246 | Log ${onu_port} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 247 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 248 | Disable Device ${onu_device_id} |
| 249 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 250 | ... Validate Device DISABLED UNKNOWN |
Andrea Campanella | 753510e | 2022-04-28 23:26:27 +0200 | [diff] [blame] | 251 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 252 | Wait For All UNI Ports Are Disabled per ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 253 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 254 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 255 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 256 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 257 | Sleep 5s |
| 258 | Enable Device ${onu_device_id} |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 259 | Wait For All UNI Ports Are Enabled per ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Girish Gowdra | fc0bdf2 | 2021-12-06 16:57:50 +0530 | [diff] [blame] | 260 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 261 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 262 | # Workaround ends here for issue seen in VOL-4489. |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 263 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 264 | Run Keyword If ${has_dataplane} Wait For All UNI Ports Are Enabled per ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 265 | ... ${src['onu'] |
| 266 | Perform Sanity Tests TT ${suppressaddsubscriber} |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 267 | END |
| 268 | |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 269 | *** Keywords *** |
| 270 | Setup Suite |
| 271 | [Documentation] Set up the test suite |
| 272 | Common Test Suite Setup |
TorstenThieme | 78c0950 | 2022-01-19 13:44:19 +0000 | [diff] [blame] | 273 | # pre-load tech profiles to use single instance control for HSIA and VoIP, multi instance control for MCAST |
| 274 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Set Tech Profile TT-HSIA ${INFRA_NAMESPACE} 64 |
| 275 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Set Tech Profile TT-VoIP ${INFRA_NAMESPACE} 65 |
| 276 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Set Tech Profile TT-multi-uni-MCAST-AdditionalBW-None |
| 277 | ... ${INFRA_NAMESPACE} 66 |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 278 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 279 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
| 280 | |
| 281 | |
| 282 | Clear All Devices Then Create New Device |
| 283 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 284 | # Remove all devices from voltha and nos |
| 285 | Delete All Devices and Verify |
| 286 | # Execute normal test Setup Keyword |
| 287 | Setup |
| 288 | |
Suchitra Vemuri | 32dea01 | 2020-07-08 16:40:06 -0700 | [diff] [blame] | 289 | |
| 290 | Teardown Suite |
| 291 | [Documentation] Tear down steps for the suite |
Matteo Scandolo | 6a90bda | 2021-11-30 11:31:38 -0800 | [diff] [blame] | 292 | Start Logging Setup or Teardown Teardown-${SUITE NAME} |
Suchitra Vemuri | 32dea01 | 2020-07-08 16:40:06 -0700 | [diff] [blame] | 293 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | c609eb0 | 2022-02-22 11:28:37 +0000 | [diff] [blame] | 294 | Run Keyword If ${teardown_device} Delete All Devices And Verify maclearning_enabled=${with_maclearning} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 295 | Close All ONOS SSH Connections |
TorstenThieme | 78c0950 | 2022-01-19 13:44:19 +0000 | [diff] [blame] | 296 | # remove pre-loaded tech profiles |
| 297 | Set Suite Variable ${TechProfile} ${EMPTY} |
| 298 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Remove Tech Profile ${INFRA_NAMESPACE} 64 |
| 299 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Remove Tech Profile ${INFRA_NAMESPACE} 65 |
| 300 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Remove Tech Profile ${INFRA_NAMESPACE} 66 |
Matteo Scandolo | 6a90bda | 2021-11-30 11:31:38 -0800 | [diff] [blame] | 301 | Stop Logging Setup or Teardown Teardown-${SUITE NAME} |