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