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 | |
Hardik Windlass | f8b3ee6 | 2022-01-24 16:36:32 +0000 | [diff] [blame] | 89 | # ONU Image to test for Upgrade needs to be passed in the following format: |
| 90 | ${image_version} BBSM_IMG_00002 |
| 91 | ${image_url} http://bbsim0:50074/images/software-image.img |
| 92 | ${image_vendor} BBSM |
| 93 | ${image_activate_on_success} false |
| 94 | ${image_commit_on_success} false |
| 95 | ${image_crc} 0 |
| 96 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 97 | *** Test Cases *** |
| 98 | |
| 99 | Create and Enable devices |
| 100 | [Documentation] Create and enable the OLTs in VOLTHA |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 101 | [Tags] setup |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 102 | ${olt_device_ids}= Create List |
| 103 | FOR ${INDEX} IN RANGE 0 ${olt} |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 104 | ${olt_device_id}= Create Device bbsim${INDEX} 50060 openolt |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 105 | Enable Device ${olt_device_id} |
| 106 | Append To List ${olt_device_ids} ${olt_device_id} |
| 107 | END |
| 108 | |
| 109 | Set Suite Variable ${olt_device_ids} |
| 110 | |
Matteo Scandolo | 7d1a80d | 2021-04-09 14:30:43 -0700 | [diff] [blame] | 111 | OLTs in ONOS |
| 112 | [Documentation] Check that ONOS recognize the correct number of OLTs |
| 113 | [Tags] activation plot-onos-olts |
Matteo Scandolo | 520f77e | 2021-06-01 16:14:47 -0700 | [diff] [blame] | 114 | ${onos_devices}= Compute Device IDs |
| 115 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 116 | Wait for Olt in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${deviceId} |
Matteo Scandolo | 520f77e | 2021-06-01 16:14:47 -0700 | [diff] [blame] | 117 | END |
Matteo Scandolo | 7d1a80d | 2021-04-09 14:30:43 -0700 | [diff] [blame] | 118 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 119 | Onu Activation in VOLTHA |
| 120 | [Documentation] Check that all ONUs reach the ACTIVE/ENABLED state in VOLTHA |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 121 | [Tags] activation plot-voltha-onus |
Andrea Campanella | 4ec9b83 | 2022-02-09 13:21:54 +0100 | [diff] [blame] | 122 | Wait For ONUs In VOLTHA ${total_onus} ${timeout} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 123 | |
| 124 | Port Discovery in ONOS |
| 125 | [Documentation] Check that all the UNI ports show up in ONOS |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 126 | [Tags] activation plot-onos-ports |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 127 | ${onos_devices}= Compute Device IDs |
| 128 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 129 | 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] | 130 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 131 | |
| 132 | Flows validation in VOLTHA before subscriber provisioning |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 133 | [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] | 134 | [Tags] flow-before plot-voltha-flows-before |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 135 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 136 | Should Be Equal ${enableFlowProvisioning} true |
| 137 | Wait for Logical Devices flows ${workflow} ${total_onus} ${olt} false |
Andrea Campanella | 4ec9b83 | 2022-02-09 13:21:54 +0100 | [diff] [blame] | 138 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} ${timeout} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 139 | |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 140 | Flows validation in VOLTHA Adapters before subscriber provisioning |
| 141 | [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] | 142 | [Tags] flow-before plot-voltha-openolt-flows-before only-me |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 143 | Should Be Equal ${enableFlowProvisioning} true |
| 144 | Wait for OpenOLT Devices flows ${workflow} ${total_onus} ${olt} false |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 145 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 146 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 147 | Flows validation in ONOS before subscriber provisioning |
Matteo Scandolo | eb26a84 | 2020-05-08 10:06:24 -0700 | [diff] [blame] | 148 | [Documentation] Check that all the flows has been acknowledged |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 149 | [Tags] flow-before plot-onos-flows-before |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 150 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 151 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 152 | |
| 153 | ${onos_devices}= Compute Device IDs |
| 154 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 155 | 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] | 156 | ... ${deviceId} ${workflow} ${total_onus_per_olt} 1 false |
| 157 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
| 158 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 159 | |
| 160 | Wait for subscribers to be Authenticated |
| 161 | [Documentation] Check that all subscribers have successfully authenticated |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 162 | [Tags] authentication plot-onos-auth |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 163 | |
| 164 | ${onos_devices}= Compute Device IDs |
| 165 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 166 | 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] | 167 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 168 | |
Hardik Windlass | f8b3ee6 | 2022-01-24 16:36:32 +0000 | [diff] [blame] | 169 | Image Download and Validation during ONUs Software Upgrade |
| 170 | [Documentation] Validates the Download Image step in ONU Upgrade process |
| 171 | ... Requirement: Pass image details in following parameters in the robot command |
| 172 | ... onu_image_name, onu_image_url, onu_image_version, onu_image_crc, onu_image_local_dir |
| 173 | ... Note: Expects the image url and other parameters to be common for all ONUs on all BBSim |
| 174 | [Tags] onu-upgrade onu-upgrade-image-download |
Hardik Windlass | ca8ce7c | 2022-02-01 09:01:23 +0000 | [diff] [blame] | 175 | @{list_onu_device_id}= Create List |
| 176 | ${list_onu_device_id}= Get ONUs Device IDs from Voltha |
| 177 | ${onu_device_id_str}= Catenate @{list_onu_device_id} |
| 178 | Download ONU Device Image ${image_version} ${image_url} ${image_vendor} |
| 179 | ... ${image_activate_on_success} ${image_commit_on_success} |
| 180 | ... ${image_crc} ${onu_device_id_str} |
Hardik Windlass | f8b3ee6 | 2022-01-24 16:36:32 +0000 | [diff] [blame] | 181 | ${imageState}= Run Keyword If '${image_activate_on_success}'=='true' and '${image_commit_on_success}'=='false' |
| 182 | ... Set Variable IMAGE_ACTIVE |
| 183 | ... ELSE IF '${image_activate_on_success}'=='true' and '${image_commit_on_success}'=='true' |
| 184 | ... Set Variable IMAGE_COMMITTED |
| 185 | ... ELSE Set Variable IMAGE_INACTIVE |
| 186 | ${activated}= Set Variable If '${image_activate_on_success}'=='true' True False |
| 187 | ${committed}= Set Variable If '${image_activate_on_success}'=='true' and '${image_commit_on_success}'=='true' |
| 188 | ... True False |
Hardik Windlass | ca8ce7c | 2022-02-01 09:01:23 +0000 | [diff] [blame] | 189 | Wait Until Keyword Succeeds ${timeout} 10s Verify ONU Device Image Status ${image_version} |
| 190 | ... ${onu_device_id_str} DOWNLOAD_SUCCEEDED NO_ERROR ${imageState} |
| 191 | FOR ${onu_device_id} IN @{list_onu_device_id} |
| 192 | Wait Until Keyword Succeeds ${timeout} 10s Verify ONU Device Image List ${onu_device_id} |
Hardik Windlass | f8b3ee6 | 2022-01-24 16:36:32 +0000 | [diff] [blame] | 193 | ... ${image_version} ${committed} ${activated} True |
| 194 | END |
| 195 | |
| 196 | Image Activation and Validation during ONUs Software Upgrade |
| 197 | [Documentation] Validates the Activate Image step in ONU Upgrade process |
| 198 | ... Requirement: Pass image details in following parameters in the robot command |
| 199 | ... onu_image_name, onu_image_url, onu_image_version, onu_image_crc, onu_image_local_dir |
| 200 | ... Note: Expects the image url and other parameters to be common for all ONUs on all BBSim |
| 201 | [Tags] onu-upgrade onu-upgrade-image-activate |
| 202 | Pass Execution If '${image_activate_on_success}'=='true' Skipping test: Image activated in download stage |
Hardik Windlass | ca8ce7c | 2022-02-01 09:01:23 +0000 | [diff] [blame] | 203 | @{list_onu_device_id}= Create List |
| 204 | ${list_onu_device_id}= Get ONUs Device IDs from Voltha |
| 205 | ${onu_device_id_str}= Catenate @{list_onu_device_id} |
| 206 | Activate ONU Device Image ${image_version} ${image_commit_on_success} ${onu_device_id_str} |
Hardik Windlass | f8b3ee6 | 2022-01-24 16:36:32 +0000 | [diff] [blame] | 207 | ${imageState}= Set Variable If '${image_commit_on_success}'=='true' IMAGE_COMMITTED IMAGE_ACTIVE |
| 208 | ${committed}= Set Variable If '${image_commit_on_success}'=='true' True False |
Hardik Windlass | ca8ce7c | 2022-02-01 09:01:23 +0000 | [diff] [blame] | 209 | Wait Until Keyword Succeeds ${timeout} 10s Verify ONU Device Image Status ${image_version} |
| 210 | ... ${onu_device_id_str} DOWNLOAD_SUCCEEDED NO_ERROR ${imageState} |
| 211 | FOR ${onu_device_id} IN @{list_onu_device_id} |
| 212 | Wait Until Keyword Succeeds ${timeout} 10s Verify ONU Device Image List ${onu_device_id} |
Hardik Windlass | f8b3ee6 | 2022-01-24 16:36:32 +0000 | [diff] [blame] | 213 | ... ${image_version} ${committed} True True |
| 214 | END |
| 215 | |
| 216 | Image Commit and Validation during ONUs Software Upgrade |
| 217 | [Documentation] Validates the Commit Image step in ONU Upgrade process |
| 218 | ... Requirement: Pass image details in following parameters in the robot command |
| 219 | ... onu_image_name, onu_image_url, onu_image_version, onu_image_crc, onu_image_local_dir |
| 220 | ... Note: Expects the image url and other parameters to be common for all ONUs on all BBSim |
| 221 | [Tags] onu-upgrade onu-upgrade-image-commit |
| 222 | Pass Execution If '${image_commit_on_success}'=='true' Skipping test: Image committed in download or activate stage |
Hardik Windlass | ca8ce7c | 2022-02-01 09:01:23 +0000 | [diff] [blame] | 223 | @{list_onu_device_id}= Create List |
| 224 | ${list_onu_device_id}= Get ONUs Device IDs from Voltha |
| 225 | ${onu_device_id_str}= Catenate @{list_onu_device_id} |
| 226 | Commit ONU Device Image ${image_version} ${onu_device_id_str} |
| 227 | Wait Until Keyword Succeeds ${timeout} 10s Verify ONU Device Image Status ${image_version} |
| 228 | ... ${onu_device_id_str} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_COMMITTED |
| 229 | FOR ${onu_device_id} IN @{list_onu_device_id} |
| 230 | Wait Until Keyword Succeeds ${timeout} 10s Verify ONU Device Image List ${onu_device_id} |
Hardik Windlass | f8b3ee6 | 2022-01-24 16:36:32 +0000 | [diff] [blame] | 231 | ... ${image_version} True True True |
| 232 | END |
| 233 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 234 | Provision subscribers |
| 235 | [Documentation] Provision data plane flows for all the subscribers |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 236 | [Tags] provision |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 237 | Should Be Equal ${enableSubscriberProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 238 | ${onos_devices}= Compute Device IDs |
| 239 | FOR ${olt} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 240 | 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] | 241 | END |
| 242 | |
| 243 | Flows validation in VOLTHA after subscriber provisioning |
| 244 | [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] | 245 | [Tags] flow-after plot-voltha-flows-after |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 246 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 247 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 248 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 249 | Wait for Logical Devices flows ${workflow} ${total_onus} ${olt} true |
Andrea Campanella | 4ec9b83 | 2022-02-09 13:21:54 +0100 | [diff] [blame] | 250 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} ${timeout} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 251 | |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 252 | Flows validation in VOLTHA Adapters after subscriber provisioning |
| 253 | [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] | 254 | [Tags] flow-after plot-voltha-openolt-flows-after only-me |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 255 | Should Be Equal ${enableFlowProvisioning} true |
| 256 | Wait for OpenOLT Devices flows ${workflow} ${total_onus} ${olt} true |
Andrea Campanella | 70cf0a7 | 2020-05-27 10:55:15 +0200 | [diff] [blame] | 257 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
Matteo Scandolo | 616daab | 2020-05-13 11:49:24 -0700 | [diff] [blame] | 258 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 259 | Flows validation in ONOS after subscriber provisioning |
| 260 | [Documentation] Check that all the flows has been acknowledged |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 261 | [Tags] flow-after plot-onos-flows-after |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 262 | # NOTE fail the test immediately if we're trying to check flows without provisioning them |
| 263 | Should Be Equal ${enableFlowProvisioning} true |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 264 | |
| 265 | ${onos_devices}= Compute Device IDs |
| 266 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 267 | 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] | 268 | ... ${deviceId} ${workflow} ${total_onus_per_olt} 1 true |
| 269 | ... ${withEapol} ${withDhcp} ${withIgmp} ${withLLDP} |
| 270 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 271 | |
| 272 | Wait for subscribers to have an IP |
| 273 | [Documentation] Check that all subscribers have received a DHCP_ACK |
Matteo Scandolo | 830071d | 2021-07-01 15:17:27 +0200 | [diff] [blame] | 274 | [Tags] dhcp plot-onos-dhcp |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 275 | ${onos_devices}= Compute Device IDs |
| 276 | FOR ${deviceId} IN @{onos_devices} |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 277 | 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] | 278 | END |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 279 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 280 | Perform Igmp Join |
| 281 | [Documentation] Performs Igmp Join for all the ONUs of all the OLTs (based on Rest Endpoint) |
| 282 | [Tags] non-critical igmp igmp-join |
| 283 | FOR ${INDEX} IN RANGE 0 ${olt} |
| 284 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 285 | ${bbsim_rel_local_port}= Evaluate ${BBSIM_REST_PORT}+${INDEX} |
| 286 | Create Session ${bbsim_rel} http://${BBSIM_REST_IP}:${bbsim_rel_local_port} |
| 287 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 288 | ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 289 | Perform Igmp Join or Leave Per OLT ${bbsim_rel} ${onu_list} join |
| 290 | List Service ${NAMESPACE} ${bbsim_pod} |
| 291 | END |
| 292 | |
| 293 | Wait for ONUs Join Igmp Group |
| 294 | [Documentation] Checks the ONUs Join the IGMP Group |
| 295 | ... Note: Currently, it expects all the ONUs on an OLT joined the same group |
| 296 | [Tags] non-critical igmp igmp-join igmp-count-verify igmp-join-count-verify |
| 297 | ${onos_devices}= Compute Device IDs |
| 298 | FOR ${deviceId} IN @{onos_devices} |
| 299 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 300 | ... 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] | 301 | END |
| 302 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 303 | Perform Igmp Leave |
| 304 | [Documentation] Performs Igmp Leave for all the ONUs of all the OLTs (based on Rest Endpoint) |
| 305 | [Tags] non-critical igmp igmp-leave |
| 306 | FOR ${INDEX} IN RANGE 0 ${olt} |
| 307 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${INDEX} |
| 308 | ${bbsim_rel_local_port}= Evaluate ${BBSIM_REST_PORT}+${INDEX} |
| 309 | Create Session ${bbsim_rel} http://${BBSIM_REST_IP}:${bbsim_rel_local_port} |
| 310 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 311 | ${onu_list}= Get ONUs List ${NAMESPACE} ${bbsim_pod} |
| 312 | Perform Igmp Join or Leave Per OLT ${bbsim_rel} ${onu_list} leave |
| 313 | List Service ${NAMESPACE} ${bbsim_pod} |
| 314 | END |
| 315 | |
| 316 | Wait for ONUs Leave Igmp Group |
| 317 | [Documentation] Checks the ONUs Leave the IGMP Group |
| 318 | ... Note: Currently, it expects all the ONUs on an OLT left the same group |
| 319 | [Tags] non-critical igmp igmp-leave igmp-count-verify igmp-leave-count-verify |
| 320 | ${onos_devices}= Compute Device IDs |
| 321 | FOR ${deviceId} IN @{onos_devices} |
| 322 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Andrea Campanella | bbfe55f | 2021-07-02 10:46:01 +0200 | [diff] [blame] | 323 | ... Verify Empty Group in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${deviceId} |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 324 | END |
| 325 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 326 | Disable and Delete devices |
| 327 | [Documentation] Disable and delete the OLTs in VOLTHA |
| 328 | [Tags] non-critical teardown |
Matteo Scandolo | f078ba7 | 2021-12-15 15:31:47 -0800 | [diff] [blame] | 329 | |
Andrea Campanella | 029b383 | 2022-01-11 13:43:30 +0100 | [diff] [blame] | 330 | ${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] | 331 | Should Be Equal As Integers ${rc} 0 Failed to get device list from voltctl: ${output} |
| 332 | Log ${output} |
| 333 | ${devices}= Split To Lines ${output} |
| 334 | Log ${devices} |
| 335 | |
| 336 | FOR ${id} IN @{devices} |
| 337 | Disable Device ${id} |
| 338 | Delete Device ${id} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 339 | END |
| 340 | |
Matteo Scandolo | 7591109 | 2021-11-16 17:05:36 -0800 | [diff] [blame] | 341 | ${onos_devices}= Compute Device IDs |
| 342 | FOR ${deviceId} IN @{onos_devices} |
| 343 | Wait for all flows to be removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${deviceId} |
| 344 | END |
| 345 | |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 346 | *** Keywords *** |
| 347 | Setup Suite |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 348 | [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] | 349 | Set Suite Variable ${KUBECTL_CONFIG} export KUBECONFIG=%{KUBECONFIG} |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 350 | Set Suite Variable ${VOLTCTL_CONFIG} %{VOLTCONFIG} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 351 | |
| 352 | ${total_onus}= Evaluate ${olt} * ${pon} * ${onu} |
| 353 | Set Suite Variable ${total_onus} |
| 354 | |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 355 | ${total_onus_per_olt}= Evaluate ${pon} * ${onu} |
| 356 | Set Suite Variable ${total_onus_per_olt} |
| 357 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 358 | ${onos_auth}= Create List karaf karaf |
| 359 | Create Session ONOS http://${ONOS_REST_IP}:${ONOS_REST_PORT} auth=${ONOS_AUTH} |
| 360 | Run Keyword If '${workflow}'=='tt' |
| 361 | ... Send File To Onos ${CURDIR}/../../tests/data/onos-igmp.json apps/ |
| 362 | |
Matteo Scandolo | 37bca8d | 2020-07-31 11:28:40 -0700 | [diff] [blame] | 363 | Teardown Suite |
| 364 | [Documentation] Close the SSH connection to ONOS |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 365 | Close All ONOS SSH Connections |
Matteo Scandolo | 50be75c | 2020-11-12 11:14:12 -0800 | [diff] [blame] | 366 | |
| 367 | Compute device IDs |
| 368 | [Documentation] Creates a list of ONOS device ID based on the test configuration |
| 369 | # TODO read ${olt} and ${stackid} from parameters |
| 370 | ${base}= Set Variable of:00000a0a0a0a0a |
| 371 | ${device_ids}= Create List |
| 372 | FOR ${olt_id} IN RANGE 0 ${olt} |
| 373 | ${decimal_id}= Catenate SEPARATOR= ${stackid} ${olt_id} |
| 374 | ${piece}= Convert To Hex ${decimal_id} length=2 lowercase=yes |
| 375 | ${id}= Catenate SEPARATOR= ${base} ${piece} |
| 376 | Append To List ${device_ids} ${id} |
| 377 | END |
| 378 | |
Hardik Windlass | 513afd1 | 2021-02-03 15:19:46 +0000 | [diff] [blame] | 379 | [Return] ${device_ids} |
| 380 | |
| 381 | Perform Igmp Join or Leave Per OLT |
| 382 | [Documentation] Performs Igmp Join for all the ONUs of an OLT (based on Rest Endpoint) |
| 383 | [Arguments] ${bbsim_rel_session} ${onu_list} ${task} |
| 384 | FOR ${onu} IN @{onu_list} |
| 385 | JoinOrLeave Igmp Rest Based ${bbsim_rel_session} ${onu} ${task} 224.0.0.22 |
| 386 | END |