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