TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 1 | # Copyright 2020 - 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 | *** Settings *** |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 16 | Documentation Test different Reconcile scenarios of ONU Go adapter with all three workflows ATT, DT and TT. |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 17 | ... Test suite is dedicated for only one ONU! Run robot with bbsim-kind.yaml only! |
| 18 | ... Not for DT/TT workflow! |
| 19 | ... Hint: default timeout in BBSim to mimic OLT reboot is 60 seconds! |
| 20 | ... This behaviour of BBSim can be modified by 'oltRebootDelay: 60' in BBSim section of helm chart or |
| 21 | ... used values.yaml during 'voltha up'. |
| 22 | Suite Setup Setup Suite |
| 23 | Suite Teardown Teardown Suite |
| 24 | Test Setup Setup |
| 25 | Test Teardown Teardown |
| 26 | Library Collections |
| 27 | Library String |
| 28 | Library OperatingSystem |
| 29 | Library XML |
| 30 | Library RequestsLibrary |
| 31 | Library ../../libraries/DependencyLibrary.py |
| 32 | Resource ../../libraries/onos.robot |
| 33 | Resource ../../libraries/voltctl.robot |
| 34 | Resource ../../libraries/voltha.robot |
| 35 | Resource ../../libraries/utils.robot |
| 36 | Resource ../../libraries/k8s.robot |
| 37 | Resource ../../libraries/onu_utilities.robot |
| 38 | Resource ../../variables/variables.robot |
| 39 | |
| 40 | *** Variables *** |
| 41 | ${namespace} voltha |
| 42 | ${timeout} 60s |
| 43 | ${of_id} 0 |
| 44 | ${logical_id} 0 |
| 45 | ${has_dataplane} True |
| 46 | ${external_libs} True |
| 47 | ${teardown_device} True |
| 48 | ${scripts} ../../scripts |
| 49 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 50 | ${container_log_dir} ${None} |
| 51 | # flag for first test, needed due default timeout in BBSim to mimic OLT reboot of 60 seconds |
| 52 | ${firsttest} True |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 53 | # determines the environment workflow: DT, TT or ATT (default) |
| 54 | # example: -v workflow:DT |
| 55 | ${workflow} ATT |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 56 | # flag debugmode is used, if true timeout calculation various, can be passed via the command line too |
| 57 | # example: -v debugmode:True |
| 58 | ${debugmode} False |
| 59 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 60 | # example: -v logging:True |
| 61 | ${logging} False |
| 62 | # if True execution will be paused before clean up, only use in case of manual testing, do not use in ci pipeline! |
| 63 | # example: -v pausebeforecleanup:True |
| 64 | ${pausebeforecleanup} False |
| 65 | # if True some outputs to console are done during running tests e.g. long duration flow test |
| 66 | # example: -v print2console:True |
| 67 | ${print2console} False |
| 68 | # if True (hard) kill will be used to restart onu adapter, else (soft) restart mechanism of k8s will be used |
| 69 | # example: -v usekill2restart:True |
| 70 | ${usekill2restart} False |
| 71 | ${data_dir} ../data |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 72 | ${suppressaddsubscriber} True |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 73 | |
| 74 | |
| 75 | *** Test Cases *** |
| 76 | Reconcile In Starting-OpenOmci |
| 77 | [Documentation] Validates the Reconcile in Starting-OpenOmci |
| 78 | ... Reconcile test during “starting-openomci” in AT&T-workflow: |
| 79 | ... - create and enable one BBSIM-ONU (no MIB-template should be available in KV-store) |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 80 | ... - wait for device reason “starting-openomci” |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 81 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 82 | ... - wait for open-onu-adapter-go to restart |
| 83 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 84 | ... - delete ONU and MIB-template in KV-store |
| 85 | [Tags] functionalOnuGo ReconcileStartingOpenOmciOnuGo |
| 86 | [Setup] Run Keywords Start Logging ReconcileStartingOpenOmciOnuGo |
| 87 | ... AND Setup Test |
| 88 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 89 | Run Keyword If ${no_skip} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 90 | ... Do Reconcile In Determined State starting-openomci |
| 91 | ... ELSE Pass Execution ${skip_message} skipped |
| 92 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 93 | ... AND Teardown Test |
| 94 | ... AND Stop Logging ReconcileStartingOpenOmciOnuGo |
| 95 | |
| 96 | Reconcile In Initial-Mib-Downloaded |
| 97 | [Documentation] Validates the Reconcile in initial-mib-downloaded |
| 98 | ... Reconcile test during “initial-mib-downloaded” in AT&T-workflow: |
| 99 | ... - create and enable one BBSIM-ONU (no MIB-template should be available in KV-store) |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 100 | ... - wait for device reason “initial-mib-downloaded” |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 101 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 102 | ... - wait for open-onu-adapter-go to restart |
| 103 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 104 | ... - delete ONU and MIB-template in KV-store |
| 105 | [Tags] functionalOnuGo ReconcileInitialMibDownloadedOnuGo |
| 106 | [Setup] Run Keywords Start Logging ReconcileInitialMibDownloadedOnuGo |
| 107 | ... AND Setup Test |
| 108 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 109 | Run Keyword If ${no_skip} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 110 | ... Do Reconcile In Determined State initial-mib-downloaded |
| 111 | ... ELSE Pass Execution ${skip_message} skipped |
| 112 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 113 | ... AND Teardown Test |
| 114 | ... AND Stop Logging ReconcileInitialMibDownloadedOnuGo |
| 115 | |
| 116 | Reconcile In Omci-Flows-Pushed |
| 117 | [Documentation] Validates the Reconcile in omci-flows-pushed |
| 118 | ... Former testcase: Reconcile Onu Device in Testsuite Voltha_ONUStateTest.robot |
| 119 | ... Reconcile test during “omci-flows-pushed” in AT&T-workflow: |
| 120 | ... - create and enable one BBSIM-ONU (no MIB-template should be available in KV-store) |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 121 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 122 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 123 | ... - wait for open-onu-adapter-go to restart |
| 124 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 125 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 126 | ... - wait for device corresponding onu reason e.g. “tech-profile-config-delete-success” |
| 127 | ... - check UNI-ports disabled in ONOS |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 128 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 129 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 130 | ... - delete ONU and MIB-template in KV-store |
| 131 | [Tags] functionalOnuGo ReconcileOmciFlowsPushedOnuGo |
| 132 | [Setup] Run Keywords Start Logging ReconcileOmciFlowsPushedOnuGo |
| 133 | ... AND Setup Test |
| 134 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 135 | Run Keyword If ${no_skip} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 136 | ... Do Reconcile In Omci-Flows-Pushed |
| 137 | ... ELSE Pass Execution ${skip_message} skipped |
| 138 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 139 | ... AND Teardown Test |
| 140 | ... AND Stop Logging ReconcileOmciFlowsPushedOnuGo |
| 141 | |
| 142 | Reconcile For Disabled Onu Device |
| 143 | [Documentation] Validates the Reconcile for disabled Onu device |
| 144 | ... Reconcile test for disabled Onu device in AT&T-workflow: |
| 145 | ... - create and enable one BBSIM-ONU (no MIB-template should be available in KV-store) |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 146 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 147 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 148 | ... - wait for device corresponding onu reason e.g. “tech-profile-config-delete-success” |
| 149 | ... - check UNI-ports disabled in ONOS |
| 150 | ... - kill the open-onu-adapter-go |
| 151 | ... - wait for open-onu-adapter-go to restart |
| 152 | ... - check device reason is still the same before restart |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 153 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 154 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 155 | ... - delete ONU and MIB-template in KV-store |
| 156 | [Tags] functionalOnuGo ReconcileDisabledOnuDeviceOnuGo |
| 157 | [Setup] Run Keywords Start Logging ReconcileDisabledOnuDeviceOnuGo |
| 158 | ... AND Setup Test |
| 159 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 160 | Run Keyword If ${no_skip} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 161 | ... Do Reconcile For Disabled Onu Device |
| 162 | ... ELSE Pass Execution ${skip_message} skipped |
| 163 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 164 | ... AND Teardown Test |
| 165 | ... AND Stop Logging ReconcileDisabledOnuDeviceOnuGo |
| 166 | |
| 167 | *** Keywords *** |
| 168 | Setup Suite |
| 169 | [Documentation] Set up the test suite |
| 170 | ${LogInfo}= Catenate |
| 171 | ... \r\nPassed arguments: |
| 172 | ... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup}, |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 173 | ... print2console:${print2console}, usekill2restart:${usekill2restart}, workflow:${workflow} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 174 | Log ${LogInfo} console=yes |
| 175 | Common Test Suite Setup |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 176 | # determine real number of onus |
| 177 | ${num_real_onus}= Determine Number Of ONU |
| 178 | ${no_skip}= Set Variable If '${num_real_onus}'=='1' True False |
| 179 | Set Suite Variable ${no_skip} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 180 | # prepare skip message in yellow for console log |
| 181 | ${skip}= Evaluate "\\033[33mSKIP\\033[0m" |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 182 | ${skipping}= Evaluate |
| 183 | ... "\\033[33m${SPACE*5} ===> Test case above was skipped! Too much ONUs (${num_real_onus})! <=== ${SPACE*5}\\033[0m" |
| 184 | ${skip_message} Catenate ${skipping} | ${skip} | |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 185 | Set Suite Variable ${skip_message} |
| 186 | ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 187 | Set Suite Variable ${onos_ssh_connection} |
| 188 | # delete etcd MIB Template Data |
| 189 | Delete MIB Template Data |
| 190 | |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 191 | |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 192 | Teardown Suite |
| 193 | [Documentation] Replaces the Suite Teardown in utils.robot. |
| 194 | ... Cleans up and checks all ONU ports disabled in ONOS. |
| 195 | ... Furthermore gives the possibility to pause the execution. |
| 196 | Run Keyword If ${pausebeforecleanup} Import Library Dialogs |
| 197 | Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up! |
| 198 | Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes |
| 199 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
| 200 | Run Keyword If ${usekill2restart} Restart Pod ${namespace} open-onu |
| 201 | Validate Onu Data In Etcd 0 |
| 202 | Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM ${timeout} |
| 203 | Close All ONOS SSH Connections |
| 204 | |
| 205 | Setup Test |
| 206 | [Documentation] Pre-test Setup |
| 207 | #test for empty device list |
| 208 | Test Empty Device List |
| 209 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s Openolt is Up |
| 210 | ... ${olt_ssh_ip} ${olt_user} ${olt_pass} |
| 211 | Run Keyword If ${has_dataplane} Sleep 60s |
| 212 | #restart open-onu pod to reset crash loop back off mechansim of kubenetes |
| 213 | Run Keyword If "${firsttest}"=="False" and "${usekill2restart}"=="True" Restart Pod ${namespace} open-onu |
| 214 | Run Keyword If "${firsttest}"=="False" Sleep 35s |
| 215 | ${firsttest} Set Variable False |
| 216 | Set Suite Variable ${firsttest} |
| 217 | # Create a list of olt ids (logical and device_id) |
| 218 | ${olt_ids} Create List |
| 219 | FOR ${I} IN RANGE 0 ${num_olts} |
| 220 | #create/preprovision device |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 221 | ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}" |
TorstenThieme | 4413664 | 2021-02-12 13:41:17 +0000 | [diff] [blame] | 222 | ... Create Device ${list_olts}[${I}][ip] ${list_olts}[${I}][oltport] |
| 223 | ... ELSE Create Device ${list_olts}[${I}][ip] ${list_olts}[${I}][oltport] ${list_olts}[${I}][type] |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 224 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 225 | #validate olt states |
| 226 | Wait Until Keyword Succeeds ${timeout} 5s |
| 227 | ... Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN ${olt_device_id} |
| 228 | Sleep 5s |
| 229 | ${logical_id}= Get Logical Device ID From SN ${olt_serial_number} |
| 230 | ${olt} Create Dictionary device_id ${olt_device_id} logical_id ${logical_id} |
| 231 | ... of_id ${of_id} sn ${olt_serial_number} |
| 232 | Append To List ${olt_ids} ${olt} |
| 233 | END |
| 234 | Set Global Variable ${olt_ids} |
| 235 | |
| 236 | Teardown Test |
| 237 | [Documentation] Post-test Teardown |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 238 | Run Keyword If ${teardown_device} and ${no_skip} Delete All Devices and Verify |
| 239 | ... ELSE IF ${teardown_device} Delete Devices In Voltha Root=true |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 240 | # delete etcd MIB Template Data |
| 241 | Delete MIB Template Data |
| 242 | Sleep 5s |
| 243 | |
| 244 | Do Reconcile In Determined State |
| 245 | [Documentation] This keyword reconciles ONU device when passed reason is reached and |
| 246 | ... check the state afterwards. |
| 247 | ... Following steps will be executed: |
| 248 | ... - enable OLT device |
| 249 | ... - wait for passed openonu reason |
| 250 | ... - restart openonu adaptor |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 251 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 252 | [Arguments] ${expected_onu_reason} |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 253 | ${admin_state} ${oper_status} ${connect_status} ${onu_state_nb} ${onu_state}= Map State |
| 254 | ... ${expected_onu_reason} |
| 255 | Should Be True ${onu_state_nb}<=5 |
| 256 | ... Wrong expected onu reason ${expected_onu_reason}, must be lower than 'omci-flows-pushed'! |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 257 | FOR ${I} IN RANGE 0 ${num_olts} |
| 258 | #get olt serial number |
| 259 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 260 | #validate olt states |
| 261 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 262 | Enable Device ${olt_device_id} |
| 263 | END |
| 264 | Current State Test All Onus ${expected_onu_reason} |
| 265 | Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace} |
| 266 | ... ELSE Restart And Check Onu Adaptor ${namespace} |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 267 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | a36068c | 2021-02-19 09:57:32 +0000 | [diff] [blame] | 268 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Test TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 269 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 270 | |
| 271 | Do Reconcile For Disabled Onu Device |
| 272 | [Documentation] This keyword reconciles ONU device for a disabled onu device and |
| 273 | ... check the state afterwards. |
| 274 | ... Following steps will be executed: |
| 275 | ... - enable OLT device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 276 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 277 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 278 | ... - wait for corresponding openonu reason |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 279 | ... - check UNI-ports disabled in ONOS |
| 280 | ... - restart openonu adaptor |
| 281 | ... - check openonu adaptor is ready again |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 282 | ... - check device reason is still before restart |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 283 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 284 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 285 | FOR ${I} IN RANGE 0 ${num_olts} |
| 286 | #get olt serial number |
| 287 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 288 | #validate olt states |
| 289 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 290 | Enable Device ${olt_device_id} |
| 291 | END |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 292 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | a36068c | 2021-02-19 09:57:32 +0000 | [diff] [blame] | 293 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Test TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 294 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 295 | Disable Onu Device |
TorstenThieme | 3871cf7 | 2021-01-21 14:11:57 +0000 | [diff] [blame] | 296 | ${alternativeonustates}= Create List omci-flows-deleted |
| 297 | Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock |
| 298 | ... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock |
| 299 | ... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 300 | Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace} |
| 301 | ... ELSE Restart And Check Onu Adaptor ${namespace} |
TorstenThieme | 3871cf7 | 2021-01-21 14:11:57 +0000 | [diff] [blame] | 302 | Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock |
| 303 | ... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock |
| 304 | ... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 305 | Wait for all ONU Ports in ONOS Disabled ${onos_ssh_connection} |
| 306 | Enable Onu Device |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 307 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | a36068c | 2021-02-19 09:57:32 +0000 | [diff] [blame] | 308 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Test TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 309 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 310 | |
| 311 | Do Reconcile In Omci-Flows-Pushed |
| 312 | [Documentation] This keyword reconciles ONU device in omci-flows-pushed and check the state afterwards. |
| 313 | ... Reconcile test during “omci-flows-pushed” in AT&T-workflow: |
| 314 | ... - create and enable one BBSIM-ONU (no MIB-template should be available in KV-store) |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 315 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 316 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 317 | ... - wait for open-onu-adapter-go to restart |
| 318 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 319 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 320 | ... - wait for corresponding device reason |
| 321 | ... - check UNI-ports disabled in ONOS |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 322 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 323 | ... - perform sanity test supress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 324 | FOR ${I} IN RANGE 0 ${num_olts} |
| 325 | #get olt serial number |
| 326 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 327 | #validate olt states |
| 328 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 329 | Enable Device ${olt_device_id} |
| 330 | END |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 331 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | a36068c | 2021-02-19 09:57:32 +0000 | [diff] [blame] | 332 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Test TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 333 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 334 | Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace} |
| 335 | ... ELSE Restart And Check Onu Adaptor ${namespace} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 336 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | a36068c | 2021-02-19 09:57:32 +0000 | [diff] [blame] | 337 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Test TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 338 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 339 | Disable Onu Device |
TorstenThieme | 3871cf7 | 2021-01-21 14:11:57 +0000 | [diff] [blame] | 340 | ${alternativeonustates}= Create List omci-flows-deleted |
| 341 | Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock |
| 342 | ... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock |
| 343 | ... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 344 | Wait for all ONU Ports in ONOS Disabled ${onos_ssh_connection} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 345 | Enable Onu Device |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 346 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | a36068c | 2021-02-19 09:57:32 +0000 | [diff] [blame] | 347 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Test TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 348 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |