Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [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 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 |
Andrea Campanella | 753510e | 2022-04-28 23:26:27 +0200 | [diff] [blame] | 149 | # Number of Access Flows on ONOS equals 16 * the Number of Active ONUs + 3 for default LLDP, IGMP and DHCP |
| 150 | ${onos_flows_count}= Run Keyword If ${has_dataplane} Evaluate 16 * ${num_of_provisioned_onus} + 3 |
| 151 | ... ELSE Evaluate 15 * ${num_of_provisioned_onus} + 3 |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 152 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Andrea Campanella | 753510e | 2022-04-28 23:26:27 +0200 | [diff] [blame] | 153 | ... Verify Added Flow Count for OLT TT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 154 | ... ${onos_flows_count} |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 155 | # Verify VOLTHA Flows |
Andrea Campanella | 753510e | 2022-04-28 23:26:27 +0200 | [diff] [blame] | 156 | # Number of per OLT Flows equals 10 * Number of Active ONUs + 3 for default LLDP, IGMP and DHCP |
| 157 | ${olt_flows}= Run Keyword If ${has_dataplane} Evaluate 10 * ${num_of_provisioned_onus} + 3 |
| 158 | ... ELSE Evaluate 9 * ${num_of_provisioned_onus} + 3 |
| 159 | # Number of per ONU Flows equals 6 for 3play service data plane + 4 for Trap to Host Flows |
| 160 | ${onu_flows}= Run Keyword If ${has_dataplane} Set Variable 10 |
| 161 | ... ELSE Set Variable 9 |
| 162 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 163 | ... ${olt_device_id} |
Andrea Campanella | 753510e | 2022-04-28 23:26:27 +0200 | [diff] [blame] | 164 | ${List_ONU_Serial} Create List |
| 165 | Set Suite Variable ${List_ONU_Serial} |
| 166 | Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} ${num_onus} |
| 167 | Log ${List_ONU_Serial} |
| 168 | # TODO: Fix ${onu_flows} calculations based on UNIs provisioned |
| 169 | # Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 170 | # ... ${List_ONU_Serial} ${onu_flows} |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 171 | # Delete OLT and Validate Empty Device List |
| 172 | Delete Device ${olt_device_id} |
| 173 | # Check that the OLT and the ONUs are actually removed from the system |
| 174 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed |
| 175 | ... ${olt_serial_number} |
| 176 | Run Keyword and Continue On Failure Validate all ONUS for OLT Removed ${num_all_onus} ${hosts} |
| 177 | ... ${olt_serial_number} ${timeout} |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 178 | Wait Until Keyword Succeeds ${timeout} 5s |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 179 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 180 | END |
| 181 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test TT |
| 182 | Run Keyword Setup |
| 183 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 184 | Perform Sanity Tests TT |
Huseyin Ahmet AYDIN | 9ea27aa | 2021-05-20 14:32:29 +0000 | [diff] [blame] | 185 | |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 186 | Verify re-provisioning subscriber after removing provisoned subscriber for TT |
| 187 | [Documentation] Removing/Readding a particular subscriber should have no effect on any other subscriber. |
| 188 | [Tags] functionalTT Readd-subscriber-TT |
| 189 | [Setup] Start Logging Readd-subscriber-TT |
| 190 | [Teardown] Run Keywords Collect Logs |
| 191 | ... AND Stop Logging Readd-subscriber-TT |
| 192 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 193 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 194 | ${src}= Set Variable ${hosts.src[${I}]} |
| 195 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 196 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 197 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 198 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 199 | ${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] | 200 | ... ${of_id} ${src['uni_id']} |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 201 | # Remove Subscriber Access |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 202 | ${del_sub_cmd}= Run Keyword If ${unitag_sub} |
| 203 | ... Catenate volt-remove-subscriber-unitag --tpId ${src['tp_id']} --sTag ${src['s_tag']} |
| 204 | ... --cTag ${src['c_tag']} ${src['onu']}-${src['uni_id']} |
| 205 | ... ELSE |
| 206 | ... Set Variable volt-remove-subscriber-access ${of_id} ${onu_port} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 207 | 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] | 208 | ... ${ONOS_SSH_PORT} ${del_sub_cmd} |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 209 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 210 | ... Wait Until Keyword Succeeds ${timeout} 5s |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 211 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 212 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Girish Gowdra | b1ef793 | 2021-10-29 10:57:47 -0700 | [diff] [blame] | 213 | ... ELSE Sleep 10s Wait for flows to be deleted |
Hardik Windlass | 88075f9 | 2022-01-25 12:19:45 +0000 | [diff] [blame] | 214 | Run Keyword If ${unitag_sub} and '${service_type}' != 'mcast' |
| 215 | ... Wait Until Keyword Succeeds ${timeout} 2s Verify UniTag Subscriber ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 216 | ... ${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] | 217 | # Verify VOLTHA flows for ONU under test is Zero |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 218 | # TODO: Fix ${onu_flows} calculations based on UNIs provisioned |
| 219 | # Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 220 | # ... ${onu_device_id} 0 |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 221 | # Add Subscriber Access |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 222 | ${add_sub_cmd}= Run Keyword If ${unitag_sub} |
| 223 | ... Catenate volt-add-subscriber-unitag --tpId ${src['tp_id']} --sTag ${src['s_tag']} |
| 224 | ... --cTag ${src['c_tag']} ${src['onu']}-${src['uni_id']} |
| 225 | ... ELSE |
| 226 | ... Set Variable volt-add-subscriber-access ${of_id} ${onu_port} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 227 | 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] | 228 | ... ${ONOS_SSH_PORT} ${add_sub_cmd} |
Hardik Windlass | 88075f9 | 2022-01-25 12:19:45 +0000 | [diff] [blame] | 229 | Run Keyword If ${unitag_sub} and '${service_type}' != 'mcast' |
| 230 | ... Wait Until Keyword Succeeds ${timeout} 2s Verify UniTag Subscriber ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 231 | ... ${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] | 232 | Wait Until Keyword Succeeds ${timeout} 5s |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 233 | ... Validate Device ENABLED ACTIVE |
| 234 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | 5a2d1f4 | 2021-11-12 12:52:04 +0000 | [diff] [blame] | 235 | Run Keyword If ${has_dataplane} and '${service_type}' != 'mcast' |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 236 | ... Sanity Test TT one ONU ${src} ${dst} ${suppressaddsubscriber} |
Hardik Windlass | 5a2d1f4 | 2021-11-12 12:52:04 +0000 | [diff] [blame] | 237 | ... ELSE IF ${has_dataplane} and '${service_type}' == 'mcast' |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 238 | ... Sanity Test TT MCAST one ONU ${src} ${dst} ${suppressaddsubscriber} |
Emrehan UZUN | 6274828 | 2021-05-21 08:16:52 +0000 | [diff] [blame] | 239 | END |
| 240 | |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 241 | Test Disable and Enable ONU for TT |
| 242 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 243 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanitytt test was executed) |
| 244 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 245 | ... Perform enable on the ONUs and validate that the pings are successful |
| 246 | [Tags] functionalTT DisableEnableONUTT |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 247 | [Setup] Run Keywords Start Logging DisableEnableONUTT |
| 248 | ... 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] | 249 | [Teardown] Run Keywords Collect Logs |
| 250 | ... AND Stop Logging DisableEnableONUTT |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 251 | @{onu_list}= Create List |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 252 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 253 | ${src}= Set Variable ${hosts.src[${I}]} |
| 254 | ${dst}= Set Variable ${hosts.dst[${I}]} |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 255 | ${sn}= Set Variable ${src['onu']} |
| 256 | # make sure all actions do only once per onu |
| 257 | ${onu_id}= Get Index From List ${onu_list} ${sn} |
| 258 | Continue For Loop If -1 != ${onu_id} |
| 259 | Append To List ${onu_list} ${sn} |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 260 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 261 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 262 | ${onu_port}= Get Onu Ports in ONOS For ALL UNI per ONU ${src['onu']} ${of_id} |
| 263 | Log ${onu_port} |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 264 | Disable Device ${onu_device_id} |
| 265 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 266 | ... Validate Device DISABLED UNKNOWN |
Andrea Campanella | 753510e | 2022-04-28 23:26:27 +0200 | [diff] [blame] | 267 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 268 | 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] | 269 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 5083b3a | 2021-11-11 12:16:22 +0000 | [diff] [blame] | 270 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 271 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 272 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 273 | Sleep 5s |
| 274 | Enable Device ${onu_device_id} |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 275 | 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] | 276 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 277 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 278 | # Workaround ends here for issue seen in VOL-4489. |
TorstenThieme | 9b25aab | 2021-12-16 15:59:45 +0000 | [diff] [blame] | 279 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 280 | Run Keyword If ${has_dataplane} Wait For All UNI Ports Are Enabled per ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 281 | ... ${src['onu'] |
| 282 | Perform Sanity Tests TT ${suppressaddsubscriber} |
Emrehan UZUN | ec59bea | 2021-05-27 13:45:57 +0000 | [diff] [blame] | 283 | END |
| 284 | |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 285 | *** Keywords *** |
| 286 | Setup Suite |
| 287 | [Documentation] Set up the test suite |
| 288 | Common Test Suite Setup |
TorstenThieme | 78c0950 | 2022-01-19 13:44:19 +0000 | [diff] [blame] | 289 | # pre-load tech profiles to use single instance control for HSIA and VoIP, multi instance control for MCAST |
| 290 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Set Tech Profile TT-HSIA ${INFRA_NAMESPACE} 64 |
| 291 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Set Tech Profile TT-VoIP ${INFRA_NAMESPACE} 65 |
| 292 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Set Tech Profile TT-multi-uni-MCAST-AdditionalBW-None |
| 293 | ... ${INFRA_NAMESPACE} 66 |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 294 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 295 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
| 296 | |
| 297 | |
| 298 | Clear All Devices Then Create New Device |
| 299 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 300 | # Remove all devices from voltha and nos |
| 301 | Delete All Devices and Verify |
| 302 | # Execute normal test Setup Keyword |
| 303 | Setup |
| 304 | |
Suchitra Vemuri | 32dea01 | 2020-07-08 16:40:06 -0700 | [diff] [blame] | 305 | |
| 306 | Teardown Suite |
| 307 | [Documentation] Tear down steps for the suite |
Matteo Scandolo | 6a90bda | 2021-11-30 11:31:38 -0800 | [diff] [blame] | 308 | Start Logging Setup or Teardown Teardown-${SUITE NAME} |
Suchitra Vemuri | 32dea01 | 2020-07-08 16:40:06 -0700 | [diff] [blame] | 309 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | c609eb0 | 2022-02-22 11:28:37 +0000 | [diff] [blame] | 310 | 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] | 311 | Close All ONOS SSH Connections |
TorstenThieme | 78c0950 | 2022-01-19 13:44:19 +0000 | [diff] [blame] | 312 | # remove pre-loaded tech profiles |
| 313 | Set Suite Variable ${TechProfile} ${EMPTY} |
| 314 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Remove Tech Profile ${INFRA_NAMESPACE} 64 |
| 315 | Run Keyword If ${unitag_sub} and not ${has_dataplane} Remove Tech Profile ${INFRA_NAMESPACE} 65 |
| 316 | 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] | 317 | Stop Logging Setup or Teardown Teardown-${SUITE NAME} |