Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 1 | # Copyright 2021 - present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # FIXME Can we use the same test against BBSim and Hardware? |
| 15 | |
| 16 | *** Settings *** |
| 17 | Documentation Tests ONU Software Upgrade |
| 18 | Suite Setup Setup Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Suite Teardown Teardown Suite |
| 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
| 27 | Library ../../libraries/DependencyLibrary.py |
| 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils.robot |
| 32 | Resource ../../libraries/k8s.robot |
TorstenThieme | b56633f | 2022-07-06 09:41:04 +0000 | [diff] [blame] | 33 | Resource ../../libraries/onu_utilities.robot |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 34 | Resource ../../libraries/bbsim.robot |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 35 | Resource ../../variables/variables.robot |
| 36 | |
| 37 | *** Variables *** |
| 38 | ${POD_NAME} flex-ocp-cord |
| 39 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 40 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 41 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 42 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 43 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 44 | ${VOLTHA_POD_NUM} 8 |
| 45 | ${NAMESPACE} voltha |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 46 | ${INFRA_NAMESPACE} default |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 47 | # For below variable value, using deployment name as using grep for |
| 48 | # parsing radius pod name, we can also use full radius pod name |
| 49 | ${RESTART_POD_NAME} radius |
| 50 | ${timeout} 60s |
| 51 | ${of_id} 0 |
| 52 | ${logical_id} 0 |
| 53 | ${has_dataplane} True |
| 54 | ${teardown_device} False |
| 55 | ${scripts} ../../scripts |
| 56 | |
| 57 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 58 | ${container_log_dir} ${None} |
| 59 | |
| 60 | ${suppressaddsubscriber} True |
| 61 | |
Hardik Windlass | f0ce206 | 2021-07-23 11:04:39 +0000 | [diff] [blame] | 62 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 63 | # example: -v logging:False |
| 64 | ${logging} True |
| 65 | |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 66 | # ONU Image to test for Upgrade needs to be passed in the following format: |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 67 | ${image_version} ${EMPTY} |
| 68 | # Example value: BBSM_IMG_00002 |
| 69 | ${image_url} ${EMPTY} |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 70 | # Example value: http://bbsim0:50074/images/software-image.img |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 71 | ${image_vendor} ${EMPTY} |
| 72 | # Example value: BBSM |
| 73 | ${image_activate_on_success} ${EMPTY} |
| 74 | # Example value: false |
| 75 | ${image_commit_on_success} ${EMPTY} |
| 76 | # Example value: false |
| 77 | ${image_crc} ${EMPTY} |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 78 | # Example value: 0 |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 79 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 80 | # when voltha is running in k8s port forwarding is needed |
| 81 | # example: -v PORT_FORWARDING:False |
| 82 | ${PORT_FORWARDING} True |
| 83 | |
| 84 | # Next values are default values for port forward, do not need to be passed, will be overwritten by values taken from image-url |
| 85 | # bbsim webserver port |
| 86 | # example: -v BBSIM_WEBSERVER_PORT:50074 |
| 87 | ${BBSIM_WEBSERVER_PORT} 50074 |
| 88 | # bbsim instance |
| 89 | # example: -v BBSIM_INSTANCE:bbsim0 |
| 90 | ${BBSIM_INSTANCE} bbsim0 |
| 91 | # port forward handle |
| 92 | ${portFwdHandle} None |
| 93 | |
TorstenThieme | b56633f | 2022-07-06 09:41:04 +0000 | [diff] [blame] | 94 | # Log Level of Helm chart |
| 95 | # example: -v helmloglevel:WARN |
| 96 | ${helmloglevel} DEBUG |
| 97 | |
| 98 | |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 99 | *** Test Cases *** |
| 100 | Test ONU Upgrade |
| 101 | [Documentation] Validates the ONU Upgrade doesn't affect the system functionality |
| 102 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 103 | ... Requirement: Pass image details in following parameters in the robot command |
| 104 | ... onu_image_name, onu_image_url, onu_image_version, onu_image_crc, onu_image_local_dir |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 105 | ... Note: The TC expects the image url and other parameters to be common for all ONUs on all BBSim |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 106 | ... Check [VOL-3903] for more details |
| 107 | [Tags] functional ONUUpgrade |
| 108 | [Setup] Start Logging ONUUpgrade |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 109 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 110 | ... AND Delete All Devices and Verify |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 111 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 112 | ... AND Stop Logging ONUUpgrade |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 113 | Do ONU Upgrade All OLTs |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 114 | |
| 115 | Test ONU Upgrade All Activate and Commit Combinations |
| 116 | [Documentation] Validates the ONU Upgrade doesn't affect the system functionality by use all combinations of |
| 117 | ... flags activate_on_success and commit_on_success |
| 118 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 119 | ... Requirement: Pass image details in following parameters in the robot command |
| 120 | ... onu_image_name, onu_image_url, onu_image_version, onu_image_crc, onu_image_local_dir |
| 121 | ... Note: The TC expects the image url and other parameters to be common for all ONUs on all BBSim |
| 122 | ... Check [VOL-4250] for more details |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 123 | [Tags] functional ONUUpgradeAllCombies |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 124 | [Setup] Start Logging ONUUpgradeAllCombies |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 125 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 126 | ... AND Delete All Devices and Verify |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 127 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 128 | ... AND Stop Logging ONUUpgradeAllCombies |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 129 | ${false_false}= Create Dictionary activate false commit false |
| 130 | ${true_false}= Create Dictionary activate true commit false |
| 131 | ${false_true}= Create Dictionary activate false commit true |
| 132 | ${true_true}= Create Dictionary activate true commit true |
| 133 | ${flag_list}= Create List ${false_false} ${true_false} ${false_true} ${true_true} |
| 134 | FOR ${item} IN @{flag_list} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 135 | Do ONU Upgrade All OLTs ${item['activate']} ${item['commit']} |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 136 | Delete All Devices and Verify |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 137 | Restart And Check BBSIM ${NAMESPACE} |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 138 | END |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 139 | |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 140 | Test ONU Upgrade Correct Indication of Download Wrong Url |
| 141 | [Documentation] Validates the ONU Upgrade download from wrong URL failure will be indicated correctly |
| 142 | ... and doesn't affect the system functionality |
| 143 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 144 | ... Check [VOL-4257] for more details |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 145 | [Tags] functional ONUUpgradeDownloadWrongUrl |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 146 | [Setup] Start Logging ONUUpgradeDownloadWrongUrl |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 147 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 148 | ... AND Delete All Devices and Verify |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 149 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 150 | ... AND Stop Logging ONUUpgradeDownloadWrongUrl |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 151 | # Add OLT device |
| 152 | Setup |
| 153 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 154 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 155 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 156 | FOR ${J} IN RANGE 0 ${num_olts} |
| 157 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 158 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 159 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 160 | Do ONU Upgrade Download Failure Per OLT ${bbsim_pod} ${olt_serial_number} |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 161 | ... url=http://bbsim0:50074/images/wrong-image.img$ |
| 162 | ... dwl_dwlstate=DOWNLOAD_FAILED dwl_reason=INVALID_URL dwl_imgstate=IMAGE_UNKNOWN |
| 163 | ... dwlstate=DOWNLOAD_UNKNOWN reason=NO_ERROR imgstate=IMAGE_UNKNOWN |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 164 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 165 | END |
| 166 | # Additional Verification |
| 167 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 168 | Setup |
| 169 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 170 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 171 | |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 172 | Test ONU Upgrade Correct Indication of Download Failure |
| 173 | [Documentation] Validates the ONU Upgrade download failure will be indicated correctly and |
| 174 | ... doesn't affect the system functionality |
| 175 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 176 | ... Check [VOL-3935] for more details |
| 177 | [Tags] functional ONUUpgradeDownloadFailure |
| 178 | [Setup] Start Logging ONUUpgradeDownloadFailure |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 179 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 180 | ... AND Delete All Devices and Verify |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 181 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 182 | ... AND Stop Logging ONUUpgradeDownloadFailure |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 183 | # Add OLT device |
| 184 | Setup |
| 185 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 186 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 187 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 188 | FOR ${J} IN RANGE 0 ${num_olts} |
| 189 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 190 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 191 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 192 | Do ONU Upgrade Download Failure Per OLT ${bbsim_pod} ${olt_serial_number} |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 193 | ... dwlstate=DOWNLOAD_FAILED reason=CANCELLED_ON_ONU_STATE imgstate=IMAGE_UNKNOWN |
| 194 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 195 | END |
| 196 | # Additional Verification |
| 197 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 198 | Setup |
| 199 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 200 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 201 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 202 | Test ONU Upgrade Correct Indication of Downloading Abort |
| 203 | [Documentation] Validates the ONU Upgrade downloading abort will be indicated correctly and |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 204 | ... doesn't affect the system functionality |
| 205 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 206 | ... Check [VOL-4318] for more details |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 207 | [Tags] functional ONUUpgradeDownloadingAbort |
| 208 | [Setup] Start Logging ONUUpgradeDownloadingAbort |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 209 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 210 | ... AND Delete All Devices and Verify |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 211 | ... AND Restart And Check BBSIM ${NAMESPACE} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 212 | ... AND Stop Logging ONUUpgradeDownloadingAbort |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 213 | # Add OLT device |
| 214 | Setup |
| 215 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 216 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 217 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 218 | FOR ${J} IN RANGE 0 ${num_olts} |
| 219 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 220 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 221 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 222 | Do ONU Upgrade Downloading Abort Per OLT ${bbsim_pod} ${olt_serial_number} |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 223 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 224 | END |
| 225 | # Additional Verification |
| 226 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 227 | Setup |
| 228 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 229 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 230 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 231 | Test ONU Upgrade Correct Indication of Downloaded Abort |
| 232 | [Documentation] Validates the ONU Upgrade downloaded abort will be indicated correctly and |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 233 | ... doesn't affect the system functionality |
| 234 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 235 | ... Check [VOL-4320] for more details |
| 236 | [Tags] functional ONUUpgradeDownloadedAbort |
| 237 | [Setup] Start Logging ONUUpgradeDownloadedAbort |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 238 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 239 | ... AND Delete All Devices and Verify |
| 240 | ... AND Restart And Check BBSIM ${NAMESPACE} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 241 | ... AND Stop Logging ONUUpgradeDownloadedAbort |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 242 | # Add OLT device |
| 243 | Setup |
| 244 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 245 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 246 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 247 | FOR ${J} IN RANGE 0 ${num_olts} |
| 248 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 249 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 250 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 251 | Do ONU Upgrade Downloaded Abort Per OLT ${bbsim_pod} ${olt_serial_number} |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 252 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 253 | END |
| 254 | # Additional Verification |
| 255 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 256 | Setup |
| 257 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 258 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 259 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 260 | Test ONU Upgrade Correct Indication of Activating Abort |
| 261 | [Documentation] Validates the ONU Upgrade activating abort will be indicated correctly and |
| 262 | ... doesn't affect the system functionality |
| 263 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 264 | ... Check [VOL-4319] for more details |
| 265 | [Tags] functional ONUUpgradeActivatingAbort |
| 266 | [Setup] Start Logging ONUUpgradeActivatingAbort |
| 267 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 268 | ... AND Delete All Devices and Verify |
| 269 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 270 | ... AND Stop Logging ONUUpgradeActivatingAbort |
| 271 | # Add OLT device |
| 272 | Setup |
| 273 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 274 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 275 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 276 | FOR ${J} IN RANGE 0 ${num_olts} |
| 277 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 278 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 279 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 280 | Do ONU Upgrade Activating Abort Per OLT ${bbsim_pod} ${olt_serial_number} |
| 281 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 282 | END |
| 283 | # Additional Verification |
| 284 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 285 | Setup |
| 286 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 287 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 288 | |
| 289 | Test ONU Upgrade Correct Indication of Active Abort |
| 290 | [Documentation] Validates the ONU Upgrade active abort will be indicated correctly and |
| 291 | ... doesn't affect the system functionality |
| 292 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 293 | ... Check [VOL-4320] for more details |
| 294 | [Tags] functional ONUUpgradeActiveAbort |
| 295 | [Setup] Start Logging ONUUpgradeActiveAbort |
| 296 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 297 | ... AND Delete All Devices and Verify |
| 298 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 299 | ... AND Stop Logging ONUUpgradeActiveAbort |
| 300 | # Add OLT device |
| 301 | Setup |
| 302 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 303 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 304 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 305 | FOR ${J} IN RANGE 0 ${num_olts} |
| 306 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 307 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 308 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 309 | Do ONU Upgrade Active Abort Per OLT ${bbsim_pod} ${olt_serial_number} |
| 310 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 311 | END |
| 312 | # Additional Verification |
| 313 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 314 | Setup |
| 315 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 316 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 317 | |
| 318 | Test ONU Upgrade Correct Indication of Committed Abort |
| 319 | [Documentation] Validates the ONU Upgrade committed abort will be indicated correctly and |
| 320 | ... doesn't affect the system functionality. Check BBSIM server transfer image counter after further download, |
| 321 | ... counter should be incremented. |
| 322 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 323 | ... Check [VOL-4320] for more details |
| 324 | [Tags] functional ONUUpgradeCommittedAbort |
| 325 | [Setup] Start Logging ONUUpgradeCommittedAbort |
| 326 | [Teardown] Run Keywords Run Keyword If ${portFwdHandle}!=None Terminate Process ${portFwdHandle} kill=true |
| 327 | ... AND Set Suite Variable ${portFwdHandle} None |
| 328 | ... AND Run Keyword If ${logging} Collect Logs |
| 329 | ... AND Delete All Devices and Verify |
| 330 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 331 | ... AND Stop Logging ONUUpgradeCommittedAbort |
| 332 | # Add OLT device |
| 333 | Setup |
| 334 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 335 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 336 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 337 | # in case of bbsim is running in k8s port forwarding of WEBSERVER is needed |
| 338 | ${BBSIM_INSTANCE} ${BBSIM_WEBSERVER_PORT}= Run Keyword If '${image_url}'!='${EMPTY}' Get BBSIM Svc and Webserver Port |
| 339 | ${cmd} Catenate |
| 340 | ... kubectl port-forward --address 0.0.0.0 -n ${NAMESPACE} svc/${BBSIM_INSTANCE} |
| 341 | ... ${BBSIM_WEBSERVER_PORT}:${BBSIM_WEBSERVER_PORT} & |
| 342 | ${portFwdHandle}= Run Keyword If ${PORT_FORWARDING} Start Process ${cmd} shell=true |
| 343 | Set Suite Variable ${portFwdHandle} |
| 344 | Sleep 5s |
| 345 | FOR ${J} IN RANGE 0 ${num_olts} |
| 346 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 347 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 348 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 349 | Do ONU Upgrade Committed Abort Per OLT ${bbsim_pod} ${olt_serial_number} |
| 350 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 351 | END |
| 352 | # Additional Verification |
| 353 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 354 | Setup |
| 355 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 356 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 357 | |
| 358 | Test ONU Upgrade Correct Indication Multiple Image Download |
| 359 | [Documentation] Validates the ONU Upgrade multiple Image Download will be indicated correctly, |
| 360 | ... In case of (re-) download the same image without aborting the cached one in openonu-adapter should taken, |
| 361 | ... no further download from server has executed. Check BBSIM server transfer image counter after further download, |
| 362 | ... counter should NOT be incremented. |
| 363 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 364 | ... Check [VOL-4320] for more details |
| 365 | [Tags] functional ONUUpgradeMultipleImageDownload |
| 366 | [Setup] Start Logging ONUUpgradeMultipleImageDownload |
| 367 | [Teardown] Run Keywords Run Keyword If ${portFwdHandle}!=None Terminate Process ${portFwdHandle} kill=true |
| 368 | ... AND Set Suite Variable ${portFwdHandle} None |
| 369 | ... AND Run Keyword If ${logging} Collect Logs |
| 370 | ... AND Delete All Devices and Verify |
| 371 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 372 | ... AND Stop Logging ONUUpgradeMultipleImageDownload |
| 373 | # Add OLT device |
| 374 | Setup |
| 375 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 376 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 377 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 378 | # in case of bbsim is running in k8s port forwarding of WEBSERVER is needed |
| 379 | ${BBSIM_INSTANCE} ${BBSIM_WEBSERVER_PORT}= Run Keyword If '${image_url}'!='${EMPTY}' Get BBSIM Svc and Webserver Port |
| 380 | ${cmd} Catenate |
| 381 | ... kubectl port-forward --address 0.0.0.0 -n ${NAMESPACE} svc/${BBSIM_INSTANCE} |
| 382 | ... ${BBSIM_WEBSERVER_PORT}:${BBSIM_WEBSERVER_PORT} & |
| 383 | ${portFwdHandle}= Run Keyword If ${PORT_FORWARDING} Start Process ${cmd} shell=true |
| 384 | Set Suite Variable ${portFwdHandle} |
| 385 | Sleep 5s |
| 386 | FOR ${J} IN RANGE 0 ${num_olts} |
| 387 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 388 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 389 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 390 | Do ONU Upgrade Multiple Image Download Per OLT ${bbsim_pod} ${olt_serial_number} |
| 391 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 392 | END |
| 393 | # Additional Verification |
| 394 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 395 | Setup |
| 396 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 397 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 398 | |
TorstenThieme | b56633f | 2022-07-06 09:41:04 +0000 | [diff] [blame] | 399 | Test ONU Upgrade Compare OMCI Message Version |
| 400 | [Documentation] Validates the ONU Upgrade duration depending on OMCI message version |
| 401 | ... - setup one ONU with baseline OMCI message (EXTRA_HELM_FLAGS=" --set omccVersion=163) |
| 402 | ... - perform a SW upgrade |
| 403 | ... - store SW upgrade duration |
| 404 | ... - delete all devices |
| 405 | ... - setup one ONU with extended OMCI message (EXTRA_HELM_FLAGS=" --set omccVersion=180) |
| 406 | ... - perform a SW upgrade |
| 407 | ... - store SW upgrade duration |
| 408 | ... - compare both duration |
| 409 | ... - duration of extended msg ONU should be at least less than 80% of the baseline one |
| 410 | ... Check [VOL-4733] for more details |
| 411 | [Tags] functional ONUUpgradeOmciBaselineVersusExtendedOnuGo |
| 412 | [Setup] Start Logging ONUUpgradeOmciBaselineVersusExtendedOnuGo |
| 413 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 414 | ... AND Delete All Devices and Verify |
| 415 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 416 | ... AND Stop Logging ONUUpgradeOmciBaselineVersusExtendedOnuGo |
| 417 | Do ONU Upgrade Compare OMCI Message Version |
| 418 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 419 | Test ONU Upgrade Image Download Simultaneously |
| 420 | [Documentation] Validates the ONU Upgrade Image Download to all ONUs simultaneously. |
| 421 | ... Test case should executed in multiple ONU (OLT) environment! |
| 422 | ... Performs the sanity and verifies all the ONUs are authenticated/DHCP/pingable |
| 423 | ... Check [VOL-4320] for more details |
| 424 | [Tags] functionalMultipleONUs ONUUpgradeImageDownloadSimultaneously |
| 425 | [Setup] Start Logging ONUUpgradeImageDownloadSimultaneously |
| 426 | [Teardown] Run Keywords Run Keyword If ${portFwdHandle}!=None Terminate Process ${portFwdHandle} kill=true |
| 427 | ... AND Set Suite Variable ${portFwdHandle} None |
| 428 | ... AND Run Keyword If ${logging} Collect Logs |
| 429 | ... AND Delete All Devices and Verify |
| 430 | ... AND Restart And Check BBSIM ${NAMESPACE} |
| 431 | ... AND Stop Logging ONUUpgradeImageDownloadSimultaneously |
| 432 | # Add OLT device |
| 433 | Setup |
| 434 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 435 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 436 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 437 | # in case of bbsim is running in k8s port forwarding of WEBSERVER is needed |
| 438 | ${BBSIM_INSTANCE} ${BBSIM_WEBSERVER_PORT}= Run Keyword If '${image_url}'!='${EMPTY}' Get BBSIM Svc and Webserver Port |
| 439 | ${cmd} Catenate |
| 440 | ... kubectl port-forward --address 0.0.0.0 -n ${NAMESPACE} svc/${BBSIM_INSTANCE} |
| 441 | ... ${BBSIM_WEBSERVER_PORT}:${BBSIM_WEBSERVER_PORT} & |
| 442 | ${portFwdHandle}= Run Keyword If ${PORT_FORWARDING} Start Process ${cmd} shell=true |
| 443 | Set Suite Variable ${portFwdHandle} |
| 444 | Sleep 5s |
| 445 | Do ONU Upgrade Image Download Simultaneously |
| 446 | # Additional Verification |
| 447 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 448 | Setup |
| 449 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 450 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 451 | |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 452 | *** Keywords *** |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 453 | Do ONU Upgrade All OLTs |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 454 | [Documentation] This keyword performs the ONU Upgrade test on all OLTs |
| 455 | [Arguments] ${activate_on_success}=${image_activate_on_success} ${commit_on_success}=${image_commit_on_success} |
| 456 | # Add OLT device |
| 457 | Setup |
| 458 | # Performing Sanity Test to make sure subscribers are all DHCP and pingable |
| 459 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 460 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 461 | FOR ${J} IN RANGE 0 ${num_olts} |
| 462 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 463 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 464 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 465 | Do ONU Upgrade Per OLT ${bbsim_pod} ${olt_serial_number} ${activate_on_success} ${commit_on_success} |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 466 | List ONUs ${NAMESPACE} ${bbsim_pod} |
| 467 | END |
| 468 | # Additional Verification |
| 469 | Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify |
| 470 | Setup |
| 471 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 472 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 473 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 474 | Do ONU Upgrade Per OLT |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 475 | [Documentation] This keyword performs the ONU Upgrade test on single OLT |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 476 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${activate_on_success}=${image_activate_on_success} |
| 477 | ... ${commit_on_success}=${image_commit_on_success} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 478 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image ${image_version} ${onu_device_id} |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 479 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 480 | ${src}= Set Variable ${hosts.src[${I}]} |
| 481 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 482 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 483 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 484 | # Download Image |
| 485 | Download ONU Device Image ${image_version} ${image_url} ${image_vendor} |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 486 | ... ${activate_on_success} ${commit_on_success} |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 487 | ... ${image_crc} ${onu_device_id} |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 488 | ${imageState}= Run Keyword If '${activate_on_success}'=='true' and '${commit_on_success}'=='false' |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 489 | ... Set Variable IMAGE_ACTIVE |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 490 | ... ELSE IF '${activate_on_success}'=='true' and '${commit_on_success}'=='true' |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 491 | ... Set Variable IMAGE_COMMITTED |
| 492 | ... ELSE Set Variable IMAGE_INACTIVE |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 493 | ${activated}= Set Variable If '${activate_on_success}'=='true' True False |
| 494 | ${committed}= Set Variable If '${activate_on_success}'=='true' and '${commit_on_success}'=='true' |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 495 | ... True False |
| 496 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 497 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR ${imageState} |
| 498 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 499 | ... ${image_version} ${committed} ${activated} True |
| 500 | # Activate Image |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 501 | ${imageState}= Set Variable If '${commit_on_success}'=='true' IMAGE_COMMITTED IMAGE_ACTIVE |
| 502 | ${committed}= Set Variable If '${commit_on_success}'=='true' True False |
| 503 | Run Keyword If '${activate_on_success}'=='false' Run Keywords |
| 504 | ... Activate ONU Device Image ${image_version} ${commit_on_success} ${onu_device_id} |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 505 | ... AND Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 506 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR ${imageState} |
| 507 | ... AND Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 508 | ... ${image_version} ${committed} True True |
| 509 | # Commit Image |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 510 | Run Keyword If '${commit_on_success}'=='false' Run Keywords |
Hardik Windlass | ba1bd27 | 2021-06-22 08:29:33 +0000 | [diff] [blame] | 511 | ... Commit ONU Device Image ${image_version} ${onu_device_id} |
| 512 | ... AND Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 513 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_COMMITTED |
| 514 | ... AND Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 515 | ... ${image_version} True True True |
Hardik Windlass | c310c7c | 2021-03-25 13:16:59 +0000 | [diff] [blame] | 516 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image On BBSim ${NAMESPACE} ${bbsim_pod} |
| 517 | ... ${src['onu']} software_image_committed |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 518 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
Andrea Campanella | f3b88f6 | 2021-10-01 18:43:03 +0200 | [diff] [blame] | 519 | # to remove the image again from adapter, Multi-Onu tests could be restructured - not yet in focus |
| 520 | Remove Adapter Image ${image_version} ${onu_device_id} |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 521 | END |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 522 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 523 | Do ONU Upgrade Download Failure Per OLT |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 524 | [Documentation] This keyword performs the ONU Upgrade Dowload Failure test on single OLT |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 525 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${url}=${image_url} |
| 526 | ... ${dwl_dwlstate}=DOWNLOAD_STARTED ${dwl_reason}=NO_ERROR ${dwl_imgstate}=IMAGE_UNKNOWN |
| 527 | ... ${dwlstate}=DOWNLOAD_SUCCEEDED ${reason}=NO_ERROR ${imgstate}=IMAGE_INACTIVE |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 528 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image INVALID_IMAGE ${onu_device_id} |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 529 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 530 | ${src}= Set Variable ${hosts.src[${I}]} |
| 531 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 532 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 533 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 534 | # Download Image |
TorstenThieme | 9cf8bd5 | 2021-07-29 10:53:55 +0000 | [diff] [blame] | 535 | Download ONU Device Image INVALID_IMAGE ${url} ${image_vendor} |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 536 | ... ${image_activate_on_success} ${image_commit_on_success} ${image_crc} ${onu_device_id} |
| 537 | ... download_state=${dwl_dwlstate} expected_reason=${dwl_reason} image_state=${dwl_imgstate} |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 538 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status INVALID_IMAGE |
TorstenThieme | 7cb9de7 | 2021-08-24 09:40:57 +0000 | [diff] [blame] | 539 | ... ${onu_device_id} ${dwlstate} ${reason} ${imgstate} |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 540 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
Andrea Campanella | f3b88f6 | 2021-10-01 18:43:03 +0200 | [diff] [blame] | 541 | # to remove the image again from adapter, Multi-Onu tests could be restructured - not yet in focus |
| 542 | Remove Adapter Image INVALID_IMAGE ${onu_device_id} |
TorstenThieme | eb2440e | 2021-07-20 10:45:05 +0000 | [diff] [blame] | 543 | END |
| 544 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 545 | Do ONU Upgrade Downloading Abort Per OLT |
| 546 | [Documentation] This keyword performs the ONU Upgrade Downloading Abort test on single OLT |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 547 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${url}=${image_url} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 548 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image ${image_version} ${onu_device_id} |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 549 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 550 | ${src}= Set Variable ${hosts.src[${I}]} |
| 551 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 552 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 553 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 554 | # Download Image |
| 555 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 556 | ... ${image_activate_on_success} ${image_commit_on_success} ${image_crc} ${onu_device_id} |
| 557 | Abort ONU Device Image ${image_version} ${onu_device_id} |
Andrea Campanella | f3b88f6 | 2021-10-01 18:43:03 +0200 | [diff] [blame] | 558 | ... DOWNLOAD_STARTED CANCELLED_ON_REQUEST IMAGE_DOWNLOADING |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 559 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
Andrea Campanella | f3b88f6 | 2021-10-01 18:43:03 +0200 | [diff] [blame] | 560 | ... ${onu_device_id} DOWNLOAD_CANCELLED CANCELLED_ON_REQUEST IMAGE_UNKNOWN |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 561 | # !!! Expected is image is not visible in list !!! |
| 562 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
TorstenThieme | 7079028 | 2021-11-19 10:26:25 +0000 | [diff] [blame] | 563 | ... ${image_version} False False False image_should_not_in_list=True |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 564 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
| 565 | END |
| 566 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 567 | Do ONU Upgrade Downloaded Abort Per OLT |
| 568 | [Documentation] This keyword performs the ONU Upgrade Downloaded Abort test on single OLT |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 569 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${url}=${image_url} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 570 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image ${image_version} ${onu_device_id} |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 571 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 572 | ${src}= Set Variable ${hosts.src[${I}]} |
| 573 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 574 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 575 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 576 | # Download Image |
| 577 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 578 | ... false false ${image_crc} ${onu_device_id} |
| 579 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 580 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_INACTIVE |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 581 | Abort ONU Device Image ${image_version} ${onu_device_id} |
| 582 | ... DOWNLOAD_SUCCEEDED CANCELLED_ON_REQUEST IMAGE_INACTIVE |
| 583 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 584 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED CANCELLED_ON_REQUEST IMAGE_INACTIVE |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 585 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 586 | ... ${image_version} False False True |
| 587 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
| 588 | END |
| 589 | |
| 590 | Do ONU Upgrade Activating Abort Per OLT |
| 591 | [Documentation] This keyword performs the ONU Upgrade Activating Abort test on single OLT |
| 592 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${url}=${image_url} |
| 593 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image ${image_version} ${onu_device_id} |
| 594 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 595 | ${src}= Set Variable ${hosts.src[${I}]} |
| 596 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 597 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 598 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 599 | # Download Image |
| 600 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 601 | ... false false ${image_crc} ${onu_device_id} |
| 602 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 603 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_INACTIVE |
| 604 | Activate ONU Device Image ${image_version} false ${onu_device_id} |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 605 | Abort ONU Device Image ${image_version} ${onu_device_id} |
Andrea Campanella | f3b88f6 | 2021-10-01 18:43:03 +0200 | [diff] [blame] | 606 | ... DOWNLOAD_SUCCEEDED CANCELLED_ON_REQUEST IMAGE_ACTIVATING |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 607 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
Andrea Campanella | f3b88f6 | 2021-10-01 18:43:03 +0200 | [diff] [blame] | 608 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED CANCELLED_ON_REQUEST IMAGE_ACTIVATION_ABORTED |
TorstenThieme | c96d096 | 2021-09-10 10:01:39 +0000 | [diff] [blame] | 609 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 610 | ... ${image_version} False True True |
| 611 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
| 612 | END |
| 613 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 614 | Do ONU Upgrade Active Abort Per OLT |
| 615 | [Documentation] This keyword performs the ONU Upgrade Active Abort test on single OLT |
| 616 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${url}=${image_url} |
| 617 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image ${image_version} ${onu_device_id} |
| 618 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 619 | ${src}= Set Variable ${hosts.src[${I}]} |
| 620 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 621 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 622 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 623 | # Download Image |
| 624 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 625 | ... false false ${image_crc} ${onu_device_id} |
| 626 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 627 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_INACTIVE |
| 628 | Activate ONU Device Image ${image_version} false ${onu_device_id} |
| 629 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 630 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_ACTIVE |
| 631 | Abort ONU Device Image ${image_version} ${onu_device_id} |
| 632 | ... DOWNLOAD_SUCCEEDED CANCELLED_ON_REQUEST IMAGE_ACTIVE |
| 633 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 634 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED CANCELLED_ON_REQUEST IMAGE_ACTIVE |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 635 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 636 | ... ${image_version} False True True |
| 637 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
| 638 | END |
| 639 | |
| 640 | Do ONU Upgrade Committed Abort Per OLT |
| 641 | [Documentation] This keyword performs the ONU Upgrade Committed Abort test on single OLT |
| 642 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${url}=${image_url} |
| 643 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image ${image_version} ${onu_device_id} |
| 644 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 645 | ${src}= Set Variable ${hosts.src[${I}]} |
| 646 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 647 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 648 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 649 | ${Images_Count_Start}= Get Images Count |
| 650 | # Download Image |
| 651 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 652 | ... false false ${image_crc} ${onu_device_id} |
| 653 | # After download of image, check image counter of BBSIM, has to be incremented by 2, because bbsim increments counter |
| 654 | # whenever openonu adapter touch the image, so one increment for check image is available and one for downloading |
| 655 | ${Images_Count_First}= Get Images Count |
| 656 | ${Images_Count_Start}= Evaluate ${Images_Count_Start}+2 |
| 657 | Should Be Equal as Integers ${Images_Count_First} ${Images_Count_Start} Count of image download not correct! |
| 658 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 659 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_INACTIVE |
| 660 | Activate ONU Device Image ${image_version} false ${onu_device_id} |
| 661 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 662 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_ACTIVE |
| 663 | Commit ONU Device Image ${image_version} ${onu_device_id} |
| 664 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 665 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_COMMITTED |
| 666 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 667 | ... ${image_version} True True True |
| 668 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image On BBSim ${NAMESPACE} ${bbsim_pod} |
| 669 | ... ${src['onu']} software_image_committed |
| 670 | Abort ONU Device Image ${image_version} ${onu_device_id} |
| 671 | ... DOWNLOAD_UNKNOWN NO_ERROR IMAGE_UNKNOWN |
| 672 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 673 | ... ${onu_device_id} DOWNLOAD_UNKNOWN NO_ERROR IMAGE_UNKNOWN |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 674 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 675 | ... ${image_version} True True True |
| 676 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
| 677 | ${Images_Count_Intermediate}= Get Images Count |
| 678 | # Repeat download of aborted image, check image counter of BBSIM, has to be incremented by 2, because bbsim increments |
| 679 | # whenever openonu adapter touch the image, so one increment for check image is available and one for downloading |
| 680 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 681 | ... false false ${image_crc} ${onu_device_id} |
| 682 | ${Images_Count_End}= Get Images Count |
| 683 | ${Images_Count_Intermediate}= Evaluate ${Images_Count_Intermediate}+2 |
| 684 | Should Be Equal as Integers ${Images_Count_End} ${Images_Count_Intermediate} Count of image download not correct! |
| 685 | Remove Adapter Image ${image_version} ${onu_device_id} |
| 686 | END |
| 687 | |
| 688 | Do ONU Upgrade Multiple Image Download Per OLT |
| 689 | [Documentation] This keyword performs the ONU Upgrade Image Download test on single OLT |
| 690 | [Arguments] ${bbsim_pod} ${olt_serial_number} ${url}=${image_url} |
| 691 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' Remove Adapter Image ${image_version} ${onu_device_id} |
| 692 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 693 | ${src}= Set Variable ${hosts.src[${I}]} |
| 694 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 695 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 696 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 697 | ${Images_Count_Start}= Get Images Count |
| 698 | # Download Image |
| 699 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 700 | ... true true ${image_crc} ${onu_device_id} |
| 701 | # After download of image, check image counter of BBSIM, has to be incremented by 2, because bbsim increments counter |
| 702 | # whenever openonu adapter touch the image, so one increment for check image is available and one for downloading |
| 703 | ${Images_Count_First}= Get Images Count |
| 704 | ${Images_Count_Start}= Evaluate ${Images_Count_Start}+2 |
| 705 | Should Be Equal as Integers ${Images_Count_First} ${Images_Count_Start} Count of image download not correct! |
| 706 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 707 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_COMMITTED |
| 708 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 709 | ... ${image_version} True True True |
| 710 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image On BBSim ${NAMESPACE} ${bbsim_pod} |
| 711 | ... ${src['onu']} software_image_committed |
| 712 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test ${suppressaddsubscriber} |
| 713 | ${Images_Count_Intermediate}= Get Images Count |
| 714 | # Repeat download of same image, check image counter of BBSIM, has to be not incremented, because no download from |
| 715 | # server will be executed, the cached one from openonu-adapter will taken |
| 716 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 717 | ... false false ${image_crc} ${onu_device_id} |
| 718 | ${Images_Count_End}= Get Images Count |
| 719 | Should Be Equal as Integers ${Images_Count_End} ${Images_Count_Intermediate} Count of image download not correct! |
| 720 | Remove Adapter Image ${image_version} ${onu_device_id} |
| 721 | END |
| 722 | |
TorstenThieme | b56633f | 2022-07-06 09:41:04 +0000 | [diff] [blame] | 723 | Do ONU Upgrade Compare OMCI Message Version |
| 724 | [Documentation] This keyword performs the ONU Upgrade Compare OMCI Message Version test for the first OLT/ONU |
| 725 | [Arguments] ${activate_on_success}=${image_activate_on_success} ${commit_on_success}=${image_commit_on_success} |
TorstenThieme | e7b10bd | 2022-07-08 08:32:10 +0000 | [diff] [blame] | 726 | [Teardown] Run Keyword If '${KEYWORD STATUS}'=='FAIL' and '${onu_device_id}'!='${EMPTY}' |
| 727 | ... Remove Adapter Image ${image_version} ${onu_device_id} |
| 728 | ${onu_device_id}= Set Variable ${EMPTY} |
| 729 | ${firstonu}= Set Variable 0 |
| 730 | ${outputfile}= Set variable ${OUTPUTDIR}/ONU_SW_Upgrade_Time.txt |
TorstenThieme | b56633f | 2022-07-06 09:41:04 +0000 | [diff] [blame] | 731 | ${omcc_version} ${is_omcc_extended}= Get BBSIM OMCC Version ${NAMESPACE} |
| 732 | # Restart BBSIM with OMCI Baseline Message if needed |
| 733 | Create File ${outputfile} This file contains the SW Upgrade download durations |
| 734 | ${extra_helm_flags} Catenate --set omccVersion=163 |
| 735 | Run Keyword If ${is_omcc_extended} Restart BBSIM by Helm Charts ${NAMESPACE} extra_helm_flags=${extra_helm_flags} |
| 736 | # Add OLT device |
| 737 | Setup |
| 738 | ${src}= Set Variable ${hosts.src[${firstonu}]} |
| 739 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 740 | ${admin_state} ${oper_status} ${connect_status} ${onu_state_nb} ${onu_state}= |
| 741 | ... Map State omci-flows-pushed |
| 742 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 1s |
| 743 | ... Validate Device ${admin_state} ${oper_status} ${connect_status} |
| 744 | ... ${src['onu']} onu=True onu_reason=${onu_state} |
| 745 | ${baselineonu}= Get ONU SW Upgrade Duration ${firstonu} ${activate_on_success} ${commit_on_success} |
| 746 | Log ONU ${src['onu']}: downloaded SW upgrade in ${baselineonu} sec for OMCI baseline message. console=yes |
| 747 | Append To File ${outputfile} |
| 748 | ... \r\nONU ${src['onu']} downloaded SW upgrade in ${baselineonu} sec for OMCI baseline message. |
TorstenThieme | 517b7ce | 2022-12-19 11:56:34 +0000 | [diff] [blame] | 749 | # get ONU OMCI counter statistics |
| 750 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 751 | ${rc} ${OMCI_counter_dict}= Get OMCI counter statistics dictionary ${onu_device_id} |
| 752 | Run Keyword If ${rc} != 0 FAIL Could not get baseline ONU OMCI counter statistic of ONU ${src['onu']}! |
| 753 | ${BaseTxNoArFrames}= Get From Dictionary ${OMCI_counter_dict} BaseTxNoArFrames |
| 754 | Should Be True 0 < ${BaseTxNoArFrames} No BaseTxNoArFrames found in baseline OMCI! |
| 755 | # some additional checks |
| 756 | ${ExtRxAkFrames}= Get From Dictionary ${OMCI_counter_dict} ExtRxAkFrames |
| 757 | ${ExtRxNoAkFrames}= Get From Dictionary ${OMCI_counter_dict} ExtRxNoAkFrames |
| 758 | ${ExtTxArFrames}= Get From Dictionary ${OMCI_counter_dict} ExtTxArFrames |
| 759 | ${ExtTxNoArFrames}= Get From Dictionary ${OMCI_counter_dict} ExtTxNoArFrames |
| 760 | ${TxOmciCounterRetries}= Get From Dictionary ${OMCI_counter_dict} TxOmciCounterRetries |
| 761 | ${TxOmciCounterTimeouts}= Get From Dictionary ${OMCI_counter_dict} TxOmciCounterTimeouts |
| 762 | Should Be Equal 0 ${ExtRxAkFrames} ExtRxAkFrames found in baseline OMCI! |
| 763 | Should Be Equal 0 ${ExtRxNoAkFrames} ExtRxNoAkFrames found in baseline OMCI! |
| 764 | Should Be Equal 0 ${ExtTxArFrames} ExtTxArFrames found in baseline OMCI! |
| 765 | Should Be Equal 0 ${ExtTxNoArFrames} ExtTxNoArFrames found in baseline OMCI! |
| 766 | Should Be Equal 0 ${TxOmciCounterRetries} TxOmciCounterRetries found in baseline OMCI! |
| 767 | Should Be Equal 0 ${TxOmciCounterTimeouts} TxOmciCounterTimeouts found in baseline OMCI! |
TorstenThieme | b56633f | 2022-07-06 09:41:04 +0000 | [diff] [blame] | 768 | Delete All Devices and Verify |
| 769 | # Restart BBSIM with OMCI Extended Message |
| 770 | ${extra_helm_flags}= Run Keyword If ${is_omcc_extended} Catenate --set omccVersion=${omcc_version} |
| 771 | ... ELSE Catenate --set omccVersion=180 |
| 772 | Restart BBSIM by Helm Charts ${NAMESPACE} extra_helm_flags=${extra_helm_flags} |
| 773 | # Start Onu again with OMCI Extended Message |
| 774 | Setup |
| 775 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 776 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 1s |
| 777 | ... Validate Device ${admin_state} ${oper_status} ${connect_status} |
| 778 | ... ${src['onu']} onu=True onu_reason=${onu_state} |
| 779 | ${extendedonu}= Get ONU SW Upgrade Duration ${firstonu} ${activate_on_success} ${commit_on_success} |
| 780 | Log ONU ${src['onu']}: downloaded SW upgrade in ${extendedonu} sec for OMCI extended message. console=yes |
| 781 | Append To File ${outputfile} |
| 782 | ... \r\nONU ${src['onu']} downloaded SW upgrade in ${extendedonu} sec for OMCI extended message. |
| 783 | ${duration_compare}= Evaluate ${baselineonu}*0.8 > ${extendedonu} |
| 784 | Should Be True ${duration_compare} SW Upgrade too slow for OMCI extended message! |
TorstenThieme | 517b7ce | 2022-12-19 11:56:34 +0000 | [diff] [blame] | 785 | # get ONU OMCI counter statistics |
| 786 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 787 | ${rc} ${OMCI_counter_dict}= Get OMCI counter statistics dictionary ${onu_device_id} |
| 788 | Run Keyword If ${rc} != 0 FAIL Could not get extended ONU OMCI counter statistic of ONU ${src['onu']}! |
| 789 | ${ExtTxNoArFrames}= Get From Dictionary ${OMCI_counter_dict} ExtTxNoArFrames |
| 790 | Should Be True 0 < ${ExtTxNoArFrames} No ExtTxNoArFrames found in extended OMCI! |
| 791 | # check baseline and extended OMCI frames counter |
| 792 | ${TxNoArFrames_compare}= Evaluate ${BaseTxNoArFrames}*0.05 > ${ExtTxNoArFrames} |
| 793 | Should Be True ${TxNoArFrames_compare} Comparison of TxNoArFrames failed (${BaseTxNoArFrames}:${ExtTxNoArFrames})! |
| 794 | # some additional checks |
| 795 | ${TxOmciCounterRetries}= Get From Dictionary ${OMCI_counter_dict} TxOmciCounterRetries |
| 796 | ${TxOmciCounterTimeouts}= Get From Dictionary ${OMCI_counter_dict} TxOmciCounterTimeouts |
| 797 | Should Be Equal 0 ${TxOmciCounterRetries} TxOmciCounterRetries found in extended OMCI! |
| 798 | Should Be Equal 0 ${TxOmciCounterTimeouts} TxOmciCounterTimeouts found in extended OMCI! |
TorstenThieme | b56633f | 2022-07-06 09:41:04 +0000 | [diff] [blame] | 799 | # Restart BBSIM with OMCI Message Version read at begin of test |
| 800 | ${extra_helm_flags}= Catenate --set omccVersion=${omcc_version} |
| 801 | Run Keyword Unless ${is_omcc_extended} Restart BBSIM by Helm Charts ${NAMESPACE} extra_helm_flags=${extra_helm_flags} |
| 802 | |
| 803 | Get ONU SW Upgrade Duration |
| 804 | [Documentation] This keyword delivers SW Upgrade duration of onu |
| 805 | [Arguments] ${onu} ${activate_on_success} ${commit_on_success} |
| 806 | ${src}= Set Variable ${hosts.src[${onu}]} |
| 807 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 808 | ${timeStart}= Get Current Date |
| 809 | Download ONU Device Image ${image_version} ${image_url} ${image_vendor} |
| 810 | ... ${activate_on_success} ${commit_on_success} |
| 811 | ... ${image_crc} ${onu_device_id} |
| 812 | ${imageState}= Run Keyword If '${activate_on_success}'=='true' and '${commit_on_success}'=='false' |
| 813 | ... Set Variable IMAGE_ACTIVE |
| 814 | ... ELSE IF '${activate_on_success}'=='true' and '${commit_on_success}'=='true' |
| 815 | ... Set Variable IMAGE_COMMITTED |
| 816 | ... ELSE Set Variable IMAGE_INACTIVE |
| 817 | ${activated}= Set Variable If '${activate_on_success}'=='true' True False |
| 818 | ${committed}= Set Variable If '${activate_on_success}'=='true' and '${commit_on_success}'=='true' |
| 819 | ... True False |
| 820 | Wait Until Keyword Succeeds ${timeout} 0s Verify ONU Device Image Status ${image_version} |
| 821 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR ${imageState} |
| 822 | ${timeCurrent} = Get Current Date |
| 823 | ${timeTotalMs} = Subtract Date From Date ${timeCurrent} ${timeStart} result_format=number |
| 824 | Remove Adapter Image ${image_version} ${onu_device_id} |
| 825 | [Return] ${timeTotalMs} |
| 826 | |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 827 | Do ONU Upgrade Image Download Simultaneously |
| 828 | [Documentation] This keyword performs the ONU Upgrade Image Download Simultaneously on all ONUs test |
| 829 | [Arguments] ${url}=${image_url} |
| 830 | [Teardown] Remove Adapter Image from ONUs ${image_version} ${list_onus} |
| 831 | # collect all ONU's device ids |
| 832 | ${list_onus} Create List |
| 833 | Build ONU Device Id List ${list_onus} |
| 834 | # prepare OLT-SN BBSIM-POD releation dictionary for later fast access |
| 835 | ${olt_bbsim_dict}= Create Dictionary |
| 836 | FOR ${J} IN RANGE 0 ${num_olts} |
| 837 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 838 | ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J} |
| 839 | ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel} |
| 840 | Set To Dictionary ${olt_bbsim_dict} ${olt_serial_number} ${bbsim_pod} |
| 841 | END |
| 842 | ${Images_Count_Start}= Get Images Count |
| 843 | # Download Image to all ONUs simultaneously |
| 844 | ${onu_device_ids} = Catenate @{list_onus} |
| 845 | Download ONU Device Image ${image_version} ${url} ${image_vendor} |
| 846 | ... true true ${image_crc} ${onu_device_ids} |
| 847 | # do all the check stuff |
| 848 | FOR ${onu_device_id} IN @{list_onus} |
| 849 | Log ${onu_device_id} |
| 850 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image Status ${image_version} |
| 851 | ... ${onu_device_id} DOWNLOAD_SUCCEEDED NO_ERROR IMAGE_COMMITTED |
| 852 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image List ${onu_device_id} |
| 853 | ... ${image_version} True True True |
| 854 | END |
| 855 | # last but not least check bbsim |
| 856 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 857 | ${src}= Set Variable ${hosts.src[${I}]} |
| 858 | ${bbsim_pod}= Get From Dictionary ${olt_bbsim_dict} ${src['olt']} |
| 859 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU Device Image On BBSim ${NAMESPACE} ${bbsim_pod} |
| 860 | ... ${src['onu']} software_image_committed |
| 861 | END |
| 862 | ${Images_Count_End}= Get Images Count |
| 863 | ${Images_Count_Start}= Evaluate ${Images_Count_Start}+2 |
| 864 | Should Be Equal as Integers ${Images_Count_End} ${Images_Count_Start} Count of image download not correct! |
| 865 | |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 866 | Setup Suite |
| 867 | [Documentation] Set up the test suite |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 868 | Start Logging Setup or Teardown Setup-${SUITE NAME} |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 869 | Common Test Suite Setup |
TorstenThieme | f360794 | 2022-09-06 08:54:17 +0000 | [diff] [blame] | 870 | # set log level for org.onosproject.store.device.impl.GossipDeviceStore to TRACE to get reason for hanging ONOS resources |
| 871 | ${LogLevelGossipDeviceStore}= Wait Until Keyword Succeeds ${timeout} 2s |
| 872 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 873 | ... log:get org.onosproject.store.device.impl.GossipDeviceStore |
| 874 | Set Suite Variable ${LogLevelGossipDeviceStore} |
| 875 | Log Old Log Level of GossipDeviceStore is ${LogLevelGossipDeviceStore} |
| 876 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 877 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 878 | ... log:set TRACE org.onosproject.store.device.impl.GossipDeviceStore |
| 879 | ${NewLogLevelGossipDeviceStore}= Wait Until Keyword Succeeds ${timeout} 2s |
| 880 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 881 | ... log:get org.onosproject.store.device.impl.GossipDeviceStore |
| 882 | Log New Log Level of GossipDeviceStore is ${NewLogLevelGossipDeviceStore} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 883 | Run Keyword If ${logging} Collect Logs |
| 884 | Stop Logging Setup or Teardown Setup-${SUITE NAME} |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 885 | |
| 886 | Teardown Suite |
| 887 | [Documentation] Tear down steps for the suite |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 888 | Start Logging Setup or Teardown Teardown-${SUITE NAME} |
| 889 | # stop port forwarding if still running |
| 890 | Run Keyword If ${portFwdHandle}!=None Terminate Process ${portFwdHandle} kill=true |
Hardik Windlass | 17bd114 | 2021-03-12 08:15:25 +0000 | [diff] [blame] | 891 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 892 | Run Keyword If ${logging} Collect Logs |
TorstenThieme | f360794 | 2022-09-06 08:54:17 +0000 | [diff] [blame] | 893 | # reset log level for org.onosproject.store.device.impl.GossipDeviceStore to to previous level |
| 894 | ${NewLogLevelGossipDeviceStore}= Wait Until Keyword Succeeds ${timeout} 2s |
| 895 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 896 | ... log:get org.onosproject.store.device.impl.GossipDeviceStore |
| 897 | Log Log Level of GossipDeviceStore is ${NewLogLevelGossipDeviceStore} |
| 898 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 899 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 900 | ... log:set ${LogLevelGossipDeviceStore} org.onosproject.store.device.impl.GossipDeviceStore |
| 901 | ${LogLevelGossipDeviceStore}= Wait Until Keyword Succeeds ${timeout} 2s |
| 902 | ... Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 903 | ... log:get org.onosproject.store.device.impl.GossipDeviceStore |
| 904 | Log New Log Level of GossipDeviceStore is ${LogLevelGossipDeviceStore} |
TorstenThieme | f3e492c | 2021-11-08 15:25:48 +0000 | [diff] [blame] | 905 | Stop Logging Setup or Teardown Teardown-${SUITE NAME} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 906 | Close All ONOS SSH Connections |