Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -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 | |
| 15 | # Tests can be enabled by passing the following tags: |
| 16 | # - [setup] Creates and enable the OLT devices |
| 17 | # - [activation] Checks that ONUs are active in VOLTHA and ports discevered in ONOS |
| 18 | # - [flow-before] Checks that flows are pushed (before subscriber provisioning) |
| 19 | # - [authentication] Checks that subscribers are correctly authenticated |
| 20 | # - [provision] Provision the data-plane flows for all the subscribers |
| 21 | # - [flow-after] Checks that flows are pushed (after subscriber provisioning) |
| 22 | # - [dhcp] Checks that subscribers have received an IP |
| 23 | # |
| 24 | # To run the full test: |
| 25 | # robot Voltha_Scale_Tests.robot |
| 26 | # |
| 27 | # To run only ceratain tests: |
| 28 | # robot -i activation -i flow-before Voltha_Scale_Tests.robot |
| 29 | # |
| 30 | # To exclude only ceratain tests: |
| 31 | # robot -e -i flow-before Voltha_Scale_Tests.robot |
| 32 | # |
| 33 | # Once te test complete you can extrapolate the results by using |
| 34 | # python extract-times.py |
| 35 | |
| 36 | *** Settings *** |
| 37 | Documentation Collect measurements on VOLTHA performances |
| 38 | Suite Setup Setup Suite |
| 39 | #Test Setup Setup |
| 40 | #Test Teardown Teardown |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 41 | Suite Teardown Teardown Suite |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 42 | Library Collections |
| 43 | Library String |
| 44 | Library OperatingSystem |
| 45 | Library XML |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 46 | Library RequestsLibrary |
| 47 | Library ../../libraries/DependencyLibrary.py |
| 48 | Resource ../../libraries/onos.robot |
| 49 | Resource ../../libraries/voltctl.robot |
| 50 | Resource ../../libraries/voltha.robot |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 51 | Resource ../../libraries/flows.robot |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 52 | Resource ../../libraries/k8s.robot |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 53 | Resource ../../libraries/utils.robot |
| 54 | Resource ../../libraries/bbsim.robot |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 55 | Resource ../../variables/variables.robot |
| 56 | |
| 57 | *** Variables *** |
| 58 | ${ONOS_SSH_IP} 127.0.0.1 |
Matteo Scandolo | ec73e70 | 2021-04-09 11:09:38 -0700 | [diff] [blame] | 59 | ${ONOS_SSH_PORT} 30115 |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 60 | ${ONOS_REST_IP} 127.0.0.1 |
Matteo Scandolo | ec73e70 | 2021-04-09 11:09:38 -0700 | [diff] [blame] | 61 | ${ONOS_REST_PORT} 30120 |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 62 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 63 | ${BBSIM_REST_IP} 127.0.0.1 |
| 64 | ${BBSIM_REST_PORT} 50071 |
| 65 | |
| 66 | ${NAMESPACE} default |
| 67 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 68 | # Scale pipeline values |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 69 | ${stackId} 1 |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 70 | ${olt} 1 |
| 71 | ${pon} 1 |
| 72 | ${onu} 1 |
| 73 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 74 | ${enableFlowProvisioning} true |
| 75 | ${enableSubscriberProvisioning} true |
| 76 | |
| 77 | ${workflow} att |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 78 | ${withEapol} false |
| 79 | ${withDhcp} false |
| 80 | ${withIgmp} false |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 81 | # as of now the LLDP flow is always installed |
| 82 | ${withLLDP} true |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 83 | |
| 84 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 85 | ${container_log_dir} ${None} |
| 86 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 87 | ${timeout} 10m |
| 88 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 89 | *** Test Cases *** |
| 90 | |
| 91 | Create and Enable devices |
| 92 | [Documentation] Create and enable the OLTs in VOLTHA |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 93 | [Tags] setup |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 94 | ${olt_device_ids}= Create List |
| 95 | FOR ${INDEX} IN RANGE 0 ${olt} |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 96 | ${olt_device_id}= Create Device bbsim${INDEX} 50060 openolt |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 97 | Enable Device ${olt_device_id} |
| 98 | Append To List ${olt_device_ids} ${olt_device_id} |
| 99 | END |
| 100 | |
| 101 | Set Suite Variable ${olt_device_ids} |
| 102 | |
Matteo Scandolo | 7d1a80d | 2021-04-09 14:30:43 -0700 | [diff] [blame] | 103 | OLTs in ONOS |
| 104 | [Documentation] Check that ONOS recognize the correct number of OLTs |
| 105 | [Tags] activation plot-onos-olts |
Matteo Scandolo | 520f77e | 2021-06-01 16:14:47 -0700 | [diff] [blame] | 106 | ${onos_devices}= Compute Device IDs |
| 107 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 108 | Wait for Olt in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${deviceId} |
Matteo Scandolo | 520f77e | 2021-06-01 16:14:47 -0700 | [diff] [blame] | 109 | END |
Matteo Scandolo | 7d1a80d | 2021-04-09 14:30:43 -0700 | [diff] [blame] | 110 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 111 | Onu Activation in VOLTHA |
| 112 | [Documentation] Check that all ONUs reach the ACTIVE/ENABLED state in VOLTHA |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 113 | [Tags] activation plot-voltha-onus |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 114 | Wait For ONUs In VOLTHA ${total_onus} |
| 115 | |
| 116 | Port Discovery in ONOS |
| 117 | [Documentation] Check that all the UNI ports show up in ONOS |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 118 | [Tags] activation plot-onos-ports |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 119 | ${onos_devices}= Compute Device IDs |
| 120 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 121 | Wait for Ports in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${total_onus_per_olt} ${deviceId} BBSM |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 122 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 123 | |
| 124 | Flows validation in VOLTHA before subscriber provisioning |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 125 | [Documentation] Check that all the flows has been stored in the logical device |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 126 | [Tags] flow-before plot-voltha-flows-before |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 127 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 128 | Should Be Equal ${enableFlowProvisioning} true |
| 129 | Wait for Logical Devices flows ${workflow} ${total_onus} ${olt} false |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 130 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 131 | |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 132 | Flows validation in VOLTHA Adapters before subscriber provisioning |
| 133 | [Documentation] Check that all flows has been store in devices of type openolt |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 134 | [Tags] flow-before plot-voltha-openolt-flows-before only-me |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 135 | Should Be Equal ${enableFlowProvisioning} true |
| 136 | Wait for OpenOLT Devices flows ${workflow} ${total_onus} ${olt} false |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 137 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 138 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 139 | Flows validation in ONOS before subscriber provisioning |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 140 | [Documentation] Check that all the flows has been acknowledged |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 141 | [Tags] flow-before plot-onos-flows-before |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 142 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 143 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 144 | |
| 145 | ${onos_devices}= Compute Device IDs |
| 146 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 147 | Wait for all flows to in ADDED state ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 148 | ... ${deviceId} ${workflow} ${total_onus_per_olt} 1 false |
| 149 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
| 150 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 151 | |
| 152 | Wait for subscribers to be Authenticated |
| 153 | [Documentation] Check that all subscribers have successfully authenticated |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 154 | [Tags] authentication plot-onos-auth |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 155 | |
| 156 | ${onos_devices}= Compute Device IDs |
| 157 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 158 | Wait for AAA Authentication ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${total_onus_per_olt} ${deviceId} |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 159 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 160 | |
| 161 | Provision subscribers |
| 162 | [Documentation] Provision data plane flows for all the subscribers |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 163 | [Tags] provision |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 164 | Should Be Equal ${enableSubscriberProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 165 | ${onos_devices}= Compute Device IDs |
| 166 | FOR ${olt} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 167 | Provision all subscribers on device ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${ONOS_SSH_IP} ${ONOS_REST_PORT} ${olt} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 168 | END |
| 169 | |
| 170 | Flows validation in VOLTHA after subscriber provisioning |
| 171 | [Documentation] Check that all the flows has been stored in the logical device |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 172 | [Tags] flow-after plot-voltha-flows-after |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 173 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 174 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 175 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 176 | Wait for Logical Devices flows ${workflow} ${total_onus} ${olt} true |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 177 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 178 | |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 179 | Flows validation in VOLTHA Adapters after subscriber provisioning |
| 180 | [Documentation] Check that all flows has been store in devices of type openolt |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 181 | [Tags] flow-after plot-voltha-openolt-flows-after only-me |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 182 | Should Be Equal ${enableFlowProvisioning} true |
| 183 | Wait for OpenOLT Devices flows ${workflow} ${total_onus} ${olt} true |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 184 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 185 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 186 | Flows validation in ONOS after subscriber provisioning |
| 187 | [Documentation] Check that all the flows has been acknowledged |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 188 | [Tags] flow-after plot-onos-flows-after |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 189 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 190 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 191 | |
| 192 | ${onos_devices}= Compute Device IDs |
| 193 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 194 | Wait for all flows to in ADDED state ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 195 | ... ${deviceId} ${workflow} ${total_onus_per_olt} 1 true |
| 196 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
| 197 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 198 | |
| 199 | Wait for subscribers to have an IP |
| 200 | [Documentation] Check that all subscribers have received a DHCP_ACK |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 201 | [Tags] dhcp plot-onos-dhcp |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 202 | ${onos_devices}= Compute Device IDs |
| 203 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 204 | Wait for DHCP Ack ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${total_onus_per_olt} ${workflow} ${deviceId} |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 205 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 206 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 207 | Perform Igmp Join |
| 208 | [Documentation] Performs Igmp Join for all the ONUs of all the OLTs (based on Rest Endpoint) |
| 209 | [Tags] non-critical igmp igmp-join |
| 210 | FOR ${INDEX} IN RANGE 0 ${olt} |
| 211 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 212 | ${bbsim_rel_local_port}= Evaluate ${BBSIM_REST_PORT}+${INDEX} |
| 213 | Create Session ${bbsim_rel} http://${BBSIM_REST_IP}:${bbsim_rel_local_port} |
| 214 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 215 | ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 216 | Perform Igmp Join or Leave Per OLT ${bbsim_rel} ${onu_list} join |
| 217 | List Service ${NAMESPACE} ${bbsim_pod} |
| 218 | END |
| 219 | |
| 220 | Wait for ONUs Join Igmp Group |
| 221 | [Documentation] Checks the ONUs Join the IGMP Group |
| 222 | ... Note: Currently, it expects all the ONUs on an OLT joined the same group |
| 223 | [Tags] non-critical igmp igmp-join igmp-count-verify igmp-join-count-verify |
| 224 | ${onos_devices}= Compute Device IDs |
| 225 | FOR ${deviceId} IN @{onos_devices} |
| 226 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 227 | ... Verify ONUs in Group Count in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${total_onus_per_olt} ${deviceId} |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 228 | END |
| 229 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 230 | Perform Igmp Leave |
| 231 | [Documentation] Performs Igmp Leave for all the ONUs of all the OLTs (based on Rest Endpoint) |
| 232 | [Tags] non-critical igmp igmp-leave |
| 233 | FOR ${INDEX} IN RANGE 0 ${olt} |
| 234 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 235 | ${bbsim_rel_local_port}= Evaluate ${BBSIM_REST_PORT}+${INDEX} |
| 236 | Create Session ${bbsim_rel} http://${BBSIM_REST_IP}:${bbsim_rel_local_port} |
| 237 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 238 | ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 239 | Perform Igmp Join or Leave Per OLT ${bbsim_rel} ${onu_list} leave |
| 240 | List Service ${NAMESPACE} ${bbsim_pod} |
| 241 | END |
| 242 | |
| 243 | Wait for ONUs Leave Igmp Group |
| 244 | [Documentation] Checks the ONUs Leave the IGMP Group |
| 245 | ... Note: Currently, it expects all the ONUs on an OLT left the same group |
| 246 | [Tags] non-critical igmp igmp-leave igmp-count-verify igmp-leave-count-verify |
| 247 | ${onos_devices}= Compute Device IDs |
| 248 | FOR ${deviceId} IN @{onos_devices} |
| 249 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 250 | ... Verify Empty Group in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${deviceId} |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 251 | END |
| 252 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 253 | Disable and Delete devices |
| 254 | [Documentation] Disable and delete the OLTs in VOLTHA |
| 255 | [Tags] non-critical teardown |
Matteo Scandolo | f078ba7 | 2021-12-15 15:31:47 -0800 | [diff] [blame] | 256 | |
Andrea Campanella | 029b383 | 2022-01-11 13:43:30 +0100 | [diff] [blame] | 257 | ${rc} ${output}= Run And Return Rc And Output voltctl -c ${VOLTCTL_CONFIG} device list -m 32MB -f Type=openolt -q |
Matteo Scandolo | f078ba7 | 2021-12-15 15:31:47 -0800 | [diff] [blame] | 258 | Should Be Equal As Integers ${rc} 0 Failed to get device list from voltctl: ${output} |
| 259 | Log ${output} |
| 260 | ${devices}= Split To Lines ${output} |
| 261 | Log ${devices} |
| 262 | |
| 263 | FOR ${id} IN @{devices} |
| 264 | Disable Device ${id} |
| 265 | Delete Device ${id} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 266 | END |
| 267 | |
Matteo Scandolo | 7591109 | 2021-11-16 17:05:36 -0800 | [diff] [blame] | 268 | ${onos_devices}= Compute Device IDs |
| 269 | FOR ${deviceId} IN @{onos_devices} |
| 270 | Wait for all flows to be removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${deviceId} |
| 271 | END |
| 272 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 273 | *** Keywords *** |
| 274 | Setup Suite |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 275 | [Documentation] Setup test global variables, open an SSH connection to ONOS and starts a timer |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 276 | Set Suite Variable ${KUBECTL_CONFIG} export KUBECONFIG=%{KUBECONFIG} |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 277 | Set Suite Variable ${VOLTCTL_CONFIG} %{VOLTCONFIG} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 278 | |
| 279 | ${total_onus}= Evaluate ${olt} * ${pon} * ${onu} |
| 280 | Set Suite Variable ${total_onus} |
| 281 | |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 282 | ${total_onus_per_olt}= Evaluate ${pon} * ${onu} |
| 283 | Set Suite Variable ${total_onus_per_olt} |
| 284 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 285 | ${onos_auth}= Create List karaf karaf |
| 286 | Create Session ONOS http://${ONOS_REST_IP}:${ONOS_REST_PORT} auth=${ONOS_AUTH} |
| 287 | Run Keyword If '${workflow}'=='tt' |
| 288 | ... Send File To Onos ${CURDIR}/../../tests/data/onos-igmp.json apps/ |
| 289 | |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 290 | Teardown Suite |
| 291 | [Documentation] Close the SSH connection to ONOS |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 292 | Close All ONOS SSH Connections |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 293 | |
| 294 | Compute device IDs |
| 295 | [Documentation] Creates a list of ONOS device ID based on the test configuration |
| 296 | # TODO read ${olt} and ${stackid} from parameters |
| 297 | ${base}= Set Variable of:00000a0a0a0a0a |
| 298 | ${device_ids}= Create List |
| 299 | FOR ${olt_id} IN RANGE 0 ${olt} |
| 300 | ${decimal_id}= Catenate SEPARATOR= ${stackid} ${olt_id} |
| 301 | ${piece}= Convert To Hex ${decimal_id} length=2 lowercase=yes |
| 302 | ${id}= Catenate SEPARATOR= ${base} ${piece} |
| 303 | Append To List ${device_ids} ${id} |
| 304 | END |
| 305 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 306 | [Return] ${device_ids} |
| 307 | |
| 308 | Perform Igmp Join or Leave Per OLT |
| 309 | [Documentation] Performs Igmp Join for all the ONUs of an OLT (based on Rest Endpoint) |
| 310 | [Arguments] ${bbsim_rel_session} ${onu_list} ${task} |
| 311 | FOR ${onu} IN @{onu_list} |
| 312 | JoinOrLeave Igmp Rest Based ${bbsim_rel_session} ${onu} ${task} 224.0.0.22 |
| 313 | END |
| 314 | |