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 |
| 59 | ${ONOS_SSH_PORT} 8101 |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 60 | ${ONOS_REST_IP} 127.0.0.1 |
Matteo Scandolo | 96dbe43 | 2020-05-28 10:51:57 -0700 | [diff] [blame] | 61 | ${ONOS_REST_PORT} 8181 |
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 |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 93 | [Tags] non-critical 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 | |
| 103 | Onu Activation in VOLTHA |
| 104 | [Documentation] Check that all ONUs reach the ACTIVE/ENABLED state in VOLTHA |
| 105 | [Tags] non-critical activation plot-voltha-onus |
| 106 | Wait For ONUs In VOLTHA ${total_onus} |
| 107 | |
| 108 | Port Discovery in ONOS |
| 109 | [Documentation] Check that all the UNI ports show up in ONOS |
| 110 | [Tags] non-critical activation plot-onos-ports |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 111 | ${onos_devices}= Compute Device IDs |
| 112 | FOR ${deviceId} IN @{onos_devices} |
| 113 | Wait for Ports in ONOS ${onos_ssh_connection} ${total_onus_per_olt} ${deviceId} BBSM |
| 114 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 115 | |
| 116 | Flows validation in VOLTHA before subscriber provisioning |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 117 | [Documentation] Check that all the flows has been stored in the logical device |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 118 | [Tags] non-critical flow-before plot-voltha-flows-before |
| 119 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 120 | Should Be Equal ${enableFlowProvisioning} true |
| 121 | Wait for Logical Devices flows ${workflow} ${total_onus} ${olt} false |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 122 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 123 | |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 124 | Flows validation in VOLTHA Adapters before subscriber provisioning |
| 125 | [Documentation] Check that all flows has been store in devices of type openolt |
Matteo Scandolo | 96dbe43 | 2020-05-28 10:51:57 -0700 | [diff] [blame] | 126 | [Tags] non-critical flow-before plot-voltha-openolt-flows-before only-me |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 127 | Should Be Equal ${enableFlowProvisioning} true |
| 128 | Wait for OpenOLT Devices flows ${workflow} ${total_onus} ${olt} false |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 129 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 130 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 131 | Flows validation in ONOS before subscriber provisioning |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 132 | [Documentation] Check that all the flows has been acknowledged |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 133 | [Tags] non-critical flow-before plot-onos-flows-before |
| 134 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 135 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 136 | |
| 137 | ${onos_devices}= Compute Device IDs |
| 138 | FOR ${deviceId} IN @{onos_devices} |
| 139 | Wait for all flows to in ADDED state ${onos_ssh_connection} |
| 140 | ... ${deviceId} ${workflow} ${total_onus_per_olt} 1 false |
| 141 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
| 142 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 143 | |
| 144 | Wait for subscribers to be Authenticated |
| 145 | [Documentation] Check that all subscribers have successfully authenticated |
| 146 | [Tags] non-critical authentication plot-onos-auth |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 147 | |
| 148 | ${onos_devices}= Compute Device IDs |
| 149 | FOR ${deviceId} IN @{onos_devices} |
| 150 | Wait for AAA Authentication ${onos_ssh_connection} ${total_onus_per_olt} ${deviceId} |
| 151 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 152 | |
| 153 | Provision subscribers |
| 154 | [Documentation] Provision data plane flows for all the subscribers |
| 155 | [Tags] non-critical provision |
| 156 | Should Be Equal ${enableSubscriberProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 157 | ${onos_devices}= Compute Device IDs |
| 158 | FOR ${olt} IN @{onos_devices} |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 159 | Provision all subscribers on device ${onos_ssh_connection} ${ONOS_SSH_IP} ${ONOS_REST_PORT} ${olt} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 160 | END |
| 161 | |
| 162 | Flows validation in VOLTHA after subscriber provisioning |
| 163 | [Documentation] Check that all the flows has been stored in the logical device |
| 164 | [Tags] non-critical flow-after plot-voltha-flows-after |
| 165 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 166 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 167 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 168 | Wait for Logical Devices flows ${workflow} ${total_onus} ${olt} true |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 169 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 170 | |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 171 | Flows validation in VOLTHA Adapters after subscriber provisioning |
| 172 | [Documentation] Check that all flows has been store in devices of type openolt |
Matteo Scandolo | 96dbe43 | 2020-05-28 10:51:57 -0700 | [diff] [blame] | 173 | [Tags] non-critical flow-after plot-voltha-openolt-flows-after only-me |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 174 | Should Be Equal ${enableFlowProvisioning} true |
| 175 | Wait for OpenOLT Devices flows ${workflow} ${total_onus} ${olt} true |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 176 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 177 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 178 | Flows validation in ONOS after subscriber provisioning |
| 179 | [Documentation] Check that all the flows has been acknowledged |
| 180 | [Tags] non-critical flow-after plot-onos-flows-after |
| 181 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 182 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 183 | |
| 184 | ${onos_devices}= Compute Device IDs |
| 185 | FOR ${deviceId} IN @{onos_devices} |
| 186 | Wait for all flows to in ADDED state ${onos_ssh_connection} |
| 187 | ... ${deviceId} ${workflow} ${total_onus_per_olt} 1 true |
| 188 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
| 189 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 190 | |
| 191 | Wait for subscribers to have an IP |
| 192 | [Documentation] Check that all subscribers have received a DHCP_ACK |
| 193 | [Tags] non-critical dhcp plot-onos-dhcp |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 194 | ${onos_devices}= Compute Device IDs |
| 195 | FOR ${deviceId} IN @{onos_devices} |
| 196 | Wait for DHCP Ack ${onos_ssh_connection} ${total_onus_per_olt} ${workflow} ${deviceId} |
| 197 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 198 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 199 | Perform Igmp Join |
| 200 | [Documentation] Performs Igmp Join for all the ONUs of all the OLTs (based on Rest Endpoint) |
| 201 | [Tags] non-critical igmp igmp-join |
| 202 | FOR ${INDEX} IN RANGE 0 ${olt} |
| 203 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 204 | ${bbsim_rel_local_port}= Evaluate ${BBSIM_REST_PORT}+${INDEX} |
| 205 | Create Session ${bbsim_rel} http://${BBSIM_REST_IP}:${bbsim_rel_local_port} |
| 206 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 207 | ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 208 | Perform Igmp Join or Leave Per OLT ${bbsim_rel} ${onu_list} join |
| 209 | List Service ${NAMESPACE} ${bbsim_pod} |
| 210 | END |
| 211 | |
| 212 | Wait for ONUs Join Igmp Group |
| 213 | [Documentation] Checks the ONUs Join the IGMP Group |
| 214 | ... Note: Currently, it expects all the ONUs on an OLT joined the same group |
| 215 | [Tags] non-critical igmp igmp-join igmp-count-verify igmp-join-count-verify |
| 216 | ${onos_devices}= Compute Device IDs |
| 217 | FOR ${deviceId} IN @{onos_devices} |
| 218 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 219 | ... Verify ONUs in Group Count in ONOS ${onos_ssh_connection} ${total_onus_per_olt} ${deviceId} |
| 220 | END |
| 221 | |
| 222 | #Verify Igmp Join |
| 223 | # [Documentation] Verifies Igmp Groups in ONOS |
| 224 | # [Tags] non-critical igmp igmp-join igmp-verify igmp-join-verify |
| 225 | # ${onos_devices}= Compute Device IDs |
| 226 | # FOR ${INDEX} IN RANGE 0 ${olt} |
| 227 | # ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 228 | # ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 229 | # ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 230 | # Verify Igmp Groups in ONOS ${onos_devices}[${INDEX}] ${onu_list} |
| 231 | # END |
| 232 | |
| 233 | Perform Igmp Leave |
| 234 | [Documentation] Performs Igmp Leave for all the ONUs of all the OLTs (based on Rest Endpoint) |
| 235 | [Tags] non-critical igmp igmp-leave |
| 236 | FOR ${INDEX} IN RANGE 0 ${olt} |
| 237 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 238 | ${bbsim_rel_local_port}= Evaluate ${BBSIM_REST_PORT}+${INDEX} |
| 239 | Create Session ${bbsim_rel} http://${BBSIM_REST_IP}:${bbsim_rel_local_port} |
| 240 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 241 | ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 242 | Perform Igmp Join or Leave Per OLT ${bbsim_rel} ${onu_list} leave |
| 243 | List Service ${NAMESPACE} ${bbsim_pod} |
| 244 | END |
| 245 | |
| 246 | Wait for ONUs Leave Igmp Group |
| 247 | [Documentation] Checks the ONUs Leave the IGMP Group |
| 248 | ... Note: Currently, it expects all the ONUs on an OLT left the same group |
| 249 | [Tags] non-critical igmp igmp-leave igmp-count-verify igmp-leave-count-verify |
| 250 | ${onos_devices}= Compute Device IDs |
| 251 | FOR ${deviceId} IN @{onos_devices} |
| 252 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 253 | ... Verify Empty Group in ONOS ${onos_ssh_connection} ${deviceId} |
| 254 | END |
| 255 | |
| 256 | #Verify Igmp Leave |
| 257 | # [Documentation] Verifies Igmp Groups in ONOS |
| 258 | # [Tags] non-critical igmp igmp-leave igmp-verify igmp-leave-verify |
| 259 | # ${onos_devices}= Compute Device IDs |
| 260 | # FOR ${INDEX} IN RANGE 0 ${olt} |
| 261 | # ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 262 | # ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 263 | # ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 264 | # Verify Igmp Groups in ONOS ${onos_devices}[${INDEX}] ${onu_list} False |
| 265 | # END |
| 266 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 267 | Disable and Delete devices |
| 268 | [Documentation] Disable and delete the OLTs in VOLTHA |
| 269 | [Tags] non-critical teardown |
| 270 | FOR ${olt_device_id} IN @{olt_device_ids} |
| 271 | Disable Device ${olt_device_id} |
| 272 | Delete Device ${olt_device_id} |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 273 | Remove Values From List ${olt_device_ids} ${olt_device_id} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 274 | END |
| 275 | |
| 276 | Set Suite Variable ${olt_device_ids} |
| 277 | |
| 278 | *** Keywords *** |
| 279 | Setup Suite |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 280 | [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] | 281 | Set Suite Variable ${KUBECTL_CONFIG} export KUBECONFIG=%{KUBECONFIG} |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 282 | Set Suite Variable ${VOLTCTL_CONFIG} %{VOLTCONFIG} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 283 | |
| 284 | ${total_onus}= Evaluate ${olt} * ${pon} * ${onu} |
| 285 | Set Suite Variable ${total_onus} |
| 286 | |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 287 | ${total_onus_per_olt}= Evaluate ${pon} * ${onu} |
| 288 | Set Suite Variable ${total_onus_per_olt} |
| 289 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 290 | ${onos_auth}= Create List karaf karaf |
| 291 | Create Session ONOS http://${ONOS_REST_IP}:${ONOS_REST_PORT} auth=${ONOS_AUTH} |
| 292 | Run Keyword If '${workflow}'=='tt' |
| 293 | ... Send File To Onos ${CURDIR}/../../tests/data/onos-igmp.json apps/ |
| 294 | |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 295 | ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 296 | Set Suite Variable ${onos_ssh_connection} |
| 297 | |
| 298 | Teardown Suite |
| 299 | [Documentation] Close the SSH connection to ONOS |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 300 | Close ONOS SSH Connection ${onos_ssh_connection} |
| 301 | |
| 302 | Compute device IDs |
| 303 | [Documentation] Creates a list of ONOS device ID based on the test configuration |
| 304 | # TODO read ${olt} and ${stackid} from parameters |
| 305 | ${base}= Set Variable of:00000a0a0a0a0a |
| 306 | ${device_ids}= Create List |
| 307 | FOR ${olt_id} IN RANGE 0 ${olt} |
| 308 | ${decimal_id}= Catenate SEPARATOR= ${stackid} ${olt_id} |
| 309 | ${piece}= Convert To Hex ${decimal_id} length=2 lowercase=yes |
| 310 | ${id}= Catenate SEPARATOR= ${base} ${piece} |
| 311 | Append To List ${device_ids} ${id} |
| 312 | END |
| 313 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 314 | [Return] ${device_ids} |
| 315 | |
| 316 | Perform Igmp Join or Leave Per OLT |
| 317 | [Documentation] Performs Igmp Join for all the ONUs of an OLT (based on Rest Endpoint) |
| 318 | [Arguments] ${bbsim_rel_session} ${onu_list} ${task} |
| 319 | FOR ${onu} IN @{onu_list} |
| 320 | JoinOrLeave Igmp Rest Based ${bbsim_rel_session} ${onu} ${task} 224.0.0.22 |
| 321 | END |
| 322 | |
| 323 | Verify Igmp Groups in ONOS |
| 324 | [Documentation] Verifies Igmp Groups in ONOS for all ONUs of an OLT |
| 325 | [Arguments] ${devId} ${onu_list} ${group_exist}=True |
| 326 | FOR ${onu} IN @{onu_list} |
| 327 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 328 | ... Get ONU Port in ONOS ${onu} ${devId} |
| 329 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 330 | ... Verify ONU in Groups ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${devId} ${onu_port} ${group_exist} |
| 331 | END |