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