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 |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 71 | # if True etcd check will be executed in test case teardown, if False etcd check will be executed in suite teardown |
| 72 | # example: -v etcdcheckintestteardown:False |
| 73 | ${etcdcheckintestteardown} True |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 74 | ${data_dir} ../data |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 75 | ${suppressaddsubscriber} True |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 76 | |
| 77 | |
| 78 | *** Test Cases *** |
| 79 | Reconcile In Starting-OpenOmci |
| 80 | [Documentation] Validates the Reconcile in Starting-OpenOmci |
| 81 | ... Reconcile test during “starting-openomci” in AT&T-workflow: |
| 82 | ... - 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] | 83 | ... - wait for device reason “starting-openomci” |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 84 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 85 | ... - wait for open-onu-adapter-go to restart |
| 86 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 87 | ... - delete ONU and MIB-template in KV-store |
| 88 | [Tags] functionalOnuGo ReconcileStartingOpenOmciOnuGo |
| 89 | [Setup] Run Keywords Start Logging ReconcileStartingOpenOmciOnuGo |
| 90 | ... AND Setup Test |
| 91 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 92 | Do Reconcile In Determined State starting-openomci |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 93 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 94 | ... AND Teardown Test |
| 95 | ... AND Stop Logging ReconcileStartingOpenOmciOnuGo |
| 96 | |
| 97 | Reconcile In Initial-Mib-Downloaded |
| 98 | [Documentation] Validates the Reconcile in initial-mib-downloaded |
| 99 | ... Reconcile test during “initial-mib-downloaded” in AT&T-workflow: |
| 100 | ... - 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] | 101 | ... - wait for device reason “initial-mib-downloaded” |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 102 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 103 | ... - wait for open-onu-adapter-go to restart |
| 104 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 105 | ... - delete ONU and MIB-template in KV-store |
| 106 | [Tags] functionalOnuGo ReconcileInitialMibDownloadedOnuGo |
| 107 | [Setup] Run Keywords Start Logging ReconcileInitialMibDownloadedOnuGo |
| 108 | ... AND Setup Test |
| 109 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 110 | Do Reconcile In Determined State initial-mib-downloaded |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 111 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 112 | ... AND Teardown Test |
| 113 | ... AND Stop Logging ReconcileInitialMibDownloadedOnuGo |
| 114 | |
| 115 | Reconcile In Omci-Flows-Pushed |
| 116 | [Documentation] Validates the Reconcile in omci-flows-pushed |
| 117 | ... Former testcase: Reconcile Onu Device in Testsuite Voltha_ONUStateTest.robot |
| 118 | ... Reconcile test during “omci-flows-pushed” in AT&T-workflow: |
| 119 | ... - 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] | 120 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 121 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 122 | ... - wait for open-onu-adapter-go to restart |
| 123 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 124 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 125 | ... - wait for device corresponding onu reason e.g. “tech-profile-config-delete-success” |
| 126 | ... - check UNI-ports disabled in ONOS |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 127 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 128 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 129 | ... - delete ONU and MIB-template in KV-store |
| 130 | [Tags] functionalOnuGo ReconcileOmciFlowsPushedOnuGo |
| 131 | [Setup] Run Keywords Start Logging ReconcileOmciFlowsPushedOnuGo |
| 132 | ... AND Setup Test |
| 133 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 134 | Do Reconcile In Omci-Flows-Pushed |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 135 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 136 | ... AND Teardown Test |
| 137 | ... AND Stop Logging ReconcileOmciFlowsPushedOnuGo |
| 138 | |
| 139 | Reconcile For Disabled Onu Device |
| 140 | [Documentation] Validates the Reconcile for disabled Onu device |
| 141 | ... Reconcile test for disabled Onu device in AT&T-workflow: |
| 142 | ... - 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] | 143 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 144 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 145 | ... - wait for device corresponding onu reason e.g. “tech-profile-config-delete-success” |
| 146 | ... - check UNI-ports disabled in ONOS |
| 147 | ... - kill the open-onu-adapter-go |
| 148 | ... - wait for open-onu-adapter-go to restart |
| 149 | ... - check device reason is still the same before restart |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 150 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 151 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 152 | ... - delete ONU and MIB-template in KV-store |
| 153 | [Tags] functionalOnuGo ReconcileDisabledOnuDeviceOnuGo |
| 154 | [Setup] Run Keywords Start Logging ReconcileDisabledOnuDeviceOnuGo |
| 155 | ... AND Setup Test |
| 156 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 157 | Do Reconcile For Disabled Onu Device |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 158 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 159 | ... AND Teardown Test |
| 160 | ... AND Stop Logging ReconcileDisabledOnuDeviceOnuGo |
| 161 | |
| 162 | *** Keywords *** |
| 163 | Setup Suite |
| 164 | [Documentation] Set up the test suite |
| 165 | ${LogInfo}= Catenate |
| 166 | ... \r\nPassed arguments: |
| 167 | ... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup}, |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 168 | ... print2console:${print2console}, usekill2restart:${usekill2restart}, workflow:${workflow} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 169 | Log ${LogInfo} console=yes |
| 170 | Common Test Suite Setup |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 171 | ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 172 | Set Suite Variable ${onos_ssh_connection} |
| 173 | # delete etcd MIB Template Data |
| 174 | Delete MIB Template Data |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 175 | # delete etcd onu data |
| 176 | Delete ONU Go Adapter ETCD Data validate=True |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 177 | |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 178 | |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 179 | Teardown Suite |
| 180 | [Documentation] Replaces the Suite Teardown in utils.robot. |
| 181 | ... Cleans up and checks all ONU ports disabled in ONOS. |
| 182 | ... Furthermore gives the possibility to pause the execution. |
| 183 | Run Keyword If ${pausebeforecleanup} Import Library Dialogs |
| 184 | Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up! |
| 185 | Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes |
| 186 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
| 187 | Run Keyword If ${usekill2restart} Restart Pod ${namespace} open-onu |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 188 | Run Keyword Unless ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s |
| 189 | ... Validate Onu Data In Etcd 0 without_pm_data=False |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 190 | Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM ${timeout} |
| 191 | Close All ONOS SSH Connections |
| 192 | |
| 193 | Setup Test |
| 194 | [Documentation] Pre-test Setup |
| 195 | #test for empty device list |
| 196 | Test Empty Device List |
| 197 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s Openolt is Up |
| 198 | ... ${olt_ssh_ip} ${olt_user} ${olt_pass} |
| 199 | Run Keyword If ${has_dataplane} Sleep 60s |
| 200 | #restart open-onu pod to reset crash loop back off mechansim of kubenetes |
| 201 | Run Keyword If "${firsttest}"=="False" and "${usekill2restart}"=="True" Restart Pod ${namespace} open-onu |
| 202 | Run Keyword If "${firsttest}"=="False" Sleep 35s |
| 203 | ${firsttest} Set Variable False |
| 204 | Set Suite Variable ${firsttest} |
| 205 | # Create a list of olt ids (logical and device_id) |
| 206 | ${olt_ids} Create List |
| 207 | FOR ${I} IN RANGE 0 ${num_olts} |
| 208 | #create/preprovision device |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 209 | ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}" |
TorstenThieme | 4413664 | 2021-02-12 13:41:17 +0000 | [diff] [blame] | 210 | ... Create Device ${list_olts}[${I}][ip] ${list_olts}[${I}][oltport] |
| 211 | ... 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] | 212 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 213 | #validate olt states |
| 214 | Wait Until Keyword Succeeds ${timeout} 5s |
| 215 | ... Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN ${olt_device_id} |
| 216 | Sleep 5s |
| 217 | ${logical_id}= Get Logical Device ID From SN ${olt_serial_number} |
| 218 | ${olt} Create Dictionary device_id ${olt_device_id} logical_id ${logical_id} |
| 219 | ... of_id ${of_id} sn ${olt_serial_number} |
| 220 | Append To List ${olt_ids} ${olt} |
| 221 | END |
| 222 | Set Global Variable ${olt_ids} |
| 223 | |
| 224 | Teardown Test |
| 225 | [Documentation] Post-test Teardown |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 226 | Run Keyword If ${pausebeforecleanup} Import Library Dialogs |
| 227 | Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up! |
| 228 | Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 229 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 230 | # delete etcd MIB Template Data |
| 231 | Delete MIB Template Data |
TorstenThieme | b355eb6 | 2021-03-09 14:04:55 +0000 | [diff] [blame] | 232 | # check etcd data are empty |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 233 | Run Keyword If ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s |
| 234 | ... Validate Onu Data In Etcd 0 without_pm_data=False |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 235 | Sleep 5s |
| 236 | |
| 237 | Do Reconcile In Determined State |
| 238 | [Documentation] This keyword reconciles ONU device when passed reason is reached and |
| 239 | ... check the state afterwards. |
| 240 | ... Following steps will be executed: |
| 241 | ... - enable OLT device |
| 242 | ... - wait for passed openonu reason |
| 243 | ... - restart openonu adaptor |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 244 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 245 | [Arguments] ${expected_onu_reason} |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 246 | ${admin_state} ${oper_status} ${connect_status} ${onu_state_nb} ${onu_state}= Map State |
| 247 | ... ${expected_onu_reason} |
| 248 | Should Be True ${onu_state_nb}<=5 |
| 249 | ... 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] | 250 | FOR ${I} IN RANGE 0 ${num_olts} |
| 251 | #get olt serial number |
| 252 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 253 | #validate olt states |
| 254 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 255 | Enable Device ${olt_device_id} |
| 256 | END |
| 257 | Current State Test All Onus ${expected_onu_reason} |
| 258 | Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace} |
| 259 | ... ELSE Restart And Check Onu Adaptor ${namespace} |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 260 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 261 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 262 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 263 | |
| 264 | Do Reconcile For Disabled Onu Device |
| 265 | [Documentation] This keyword reconciles ONU device for a disabled onu device and |
| 266 | ... check the state afterwards. |
| 267 | ... Following steps will be executed: |
| 268 | ... - enable OLT device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 269 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 270 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 271 | ... - wait for corresponding openonu reason |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 272 | ... - check UNI-ports disabled in ONOS |
| 273 | ... - restart openonu adaptor |
| 274 | ... - check openonu adaptor is ready again |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 275 | ... - check device reason is still before restart |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 276 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 277 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 278 | FOR ${I} IN RANGE 0 ${num_olts} |
| 279 | #get olt serial number |
| 280 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 281 | #validate olt states |
| 282 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 283 | Enable Device ${olt_device_id} |
| 284 | END |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 285 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 286 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 287 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 288 | Disable Onu Device |
TorstenThieme | 3871cf7 | 2021-01-21 14:11:57 +0000 | [diff] [blame] | 289 | ${alternativeonustates}= Create List omci-flows-deleted |
| 290 | Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock |
| 291 | ... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock |
| 292 | ... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 293 | Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace} |
| 294 | ... ELSE Restart And Check Onu Adaptor ${namespace} |
TorstenThieme | 3871cf7 | 2021-01-21 14:11:57 +0000 | [diff] [blame] | 295 | Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock |
| 296 | ... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock |
| 297 | ... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 298 | Wait for all ONU Ports in ONOS Disabled ${onos_ssh_connection} |
| 299 | Enable Onu Device |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 300 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 301 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 302 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 303 | |
| 304 | Do Reconcile In Omci-Flows-Pushed |
| 305 | [Documentation] This keyword reconciles ONU device in omci-flows-pushed and check the state afterwards. |
| 306 | ... Reconcile test during “omci-flows-pushed” in AT&T-workflow: |
| 307 | ... - 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] | 308 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 309 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 310 | ... - wait for open-onu-adapter-go to restart |
| 311 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 312 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 313 | ... - wait for corresponding device reason |
| 314 | ... - check UNI-ports disabled in ONOS |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 315 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 316 | ... - perform sanity test supress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 317 | FOR ${I} IN RANGE 0 ${num_olts} |
| 318 | #get olt serial number |
| 319 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 320 | #validate olt states |
| 321 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 322 | Enable Device ${olt_device_id} |
| 323 | END |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 324 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 325 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 326 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 327 | Run Keyword If ${usekill2restart} Kill And Check Onu Adaptor ${namespace} |
| 328 | ... ELSE Restart And Check Onu Adaptor ${namespace} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 329 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 330 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 331 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 332 | Disable Onu Device |
TorstenThieme | 3871cf7 | 2021-01-21 14:11:57 +0000 | [diff] [blame] | 333 | ${alternativeonustates}= Create List omci-flows-deleted |
| 334 | Run Keyword If "${workflow}"=="DT" Current State Test All Onus omci-admin-lock |
| 335 | ... ELSE IF "${workflow}"=="TT" Current State Test All Onus omci-admin-lock |
| 336 | ... ELSE Current State Test All Onus omci-admin-lock alternativeonustate=${alternativeonustates} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 337 | Wait for all ONU Ports in ONOS Disabled ${onos_ssh_connection} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 338 | Enable Onu Device |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 339 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 340 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 341 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |