TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +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 | |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 15 | *** Settings *** |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 16 | Documentation Test states of ONU Go adapter with ATT workflows only (not for DT/TT workflow!) |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 17 | Suite Setup Setup Suite |
| 18 | Suite Teardown Teardown Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Library Collections |
| 22 | Library String |
| 23 | Library OperatingSystem |
| 24 | Library XML |
| 25 | Library RequestsLibrary |
| 26 | Library ../../libraries/DependencyLibrary.py |
| 27 | Resource ../../libraries/onos.robot |
| 28 | Resource ../../libraries/voltctl.robot |
| 29 | Resource ../../libraries/voltha.robot |
| 30 | Resource ../../libraries/utils.robot |
| 31 | Resource ../../libraries/k8s.robot |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 32 | Resource ../../libraries/onu_utilities.robot |
TorstenThieme | fe7099e | 2021-01-29 08:41:04 +0000 | [diff] [blame] | 33 | Resource ../../libraries/bbsim.robot |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 34 | Resource ../../variables/variables.robot |
| 35 | |
| 36 | *** Variables *** |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 37 | ${namespace} voltha |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 38 | ${timeout} 60s |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 39 | ${of_id} 0 |
| 40 | ${logical_id} 0 |
| 41 | ${has_dataplane} True |
| 42 | ${external_libs} True |
| 43 | ${teardown_device} True |
| 44 | ${scripts} ../../scripts |
| 45 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 46 | ${container_log_dir} ${None} |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 47 | # state to test variable, can be passed via the command line too, valid values: 1-6 |
| 48 | # 1 -> activating-onu |
| 49 | # 2 -> starting-openomci |
| 50 | # 3 -> discovery-mibsync-complete |
| 51 | # 4 -> initial-mib-downloaded |
| 52 | # 5 -> tech-profile-config-download-success |
| 53 | # 6 -> omci-flows-pushed |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 54 | # example: -v state2test:5 |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 55 | # example: -v state2test:omci-flows-pushed |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 56 | ${state2test} 6 |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 57 | # test mode variable, can be passed via the command line too, valid values: SingleState, Up2State, SingleStateTime |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 58 | # example: -v testmode:SingleStateTime |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 59 | ${testmode} SingleState |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 60 | # used tech profile, can be passed via the command line too, valid values: default (=1T1GEM), 1T4GEM, 1T8GEM |
| 61 | # example: -v techprofile:1T4GEM |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 62 | ${techprofile} default |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 63 | # flag debugmode is used, if true timeout calculation various, can be passed via the command line too |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 64 | # example: -v debugmode:True |
TorstenThieme | 401af43 | 2020-06-11 15:53:53 +0000 | [diff] [blame] | 65 | ${debugmode} False |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 66 | # logging flag to enable Collect Logs, can be passed via the command line too |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 67 | # example: -v logging:True |
TorstenThieme | 5e324e4 | 2020-07-27 09:36:16 +0000 | [diff] [blame] | 68 | ${logging} False |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 69 | # if True execution will be paused before clean up, only use in case of manual testing, do not use in ci pipeline! |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 70 | # example: -v pausebeforecleanup:True |
TorstenThieme | b41007d | 2020-06-22 12:14:12 +0000 | [diff] [blame] | 71 | ${pausebeforecleanup} False |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 72 | # if True some outputs to console are done during running tests e.g. long duration flow test |
| 73 | # example: -v print2console:True |
| 74 | ${print2console} False |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 75 | ${data_dir} ../data |
| 76 | |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 77 | |
| 78 | *** Test Cases *** |
| 79 | ONU State Test |
| 80 | [Documentation] Validates the ONU Go adapter states |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 81 | [Tags] sanityOnuGo StateTestOnuGo |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 82 | [Setup] Run Keywords Start Logging ONUStateTest |
| 83 | ... AND Setup Test |
| 84 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 85 | FOR ${I} IN RANGE 0 ${num_olts} |
| 86 | #get olt serial number |
| 87 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 88 | #validate olt states |
| 89 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 90 | Enable Device ${olt_device_id} |
| 91 | END |
TorstenThieme | 94e4ae4 | 2020-05-18 13:01:42 +0000 | [diff] [blame] | 92 | ${timeStart} = Get Current Date |
| 93 | Set Global Variable ${timeStart} |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 94 | Run Keyword If "${testmode}"=="SingleState" Do ONU Single State Test |
| 95 | ... ELSE IF "${testmode}"=="Up2State" Do ONU Up To State Test |
TorstenThieme | 94e4ae4 | 2020-05-18 13:01:42 +0000 | [diff] [blame] | 96 | ... ELSE IF "${testmode}"=="SingleStateTime" Do ONU Single State Test Time |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 97 | ... ELSE Fail The testmode (${testmode}) is not valid! |
TorstenThieme | 5e324e4 | 2020-07-27 09:36:16 +0000 | [diff] [blame] | 98 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 99 | ... AND Stop Logging ONUStateTest |
| 100 | |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 101 | Check Loaded Tech Profile |
| 102 | [Documentation] Validates the loaded Tech Profile |
| 103 | ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state! |
| 104 | ... Check will be executed only the reached ONU state is 5 (tech-profile-config-download-success) or higher |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 105 | [Tags] functionalOnuGo CheckTechProfileOnuGo |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 106 | [Setup] Start Logging ONUCheckTechProfile |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 107 | Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed' |
| 108 | ... Do Check Tech Profile |
TorstenThieme | 5a205ba | 2020-09-29 08:08:29 +0000 | [diff] [blame] | 109 | ... ELSE Pass Execution ${skip_message} skipped |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 110 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 111 | ... AND Stop Logging ONUCheckTechProfile |
| 112 | |
TorstenThieme | 401af43 | 2020-06-11 15:53:53 +0000 | [diff] [blame] | 113 | Onu Port Check |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 114 | [Documentation] Validates that all the UNI ports show up in ONOS |
TorstenThieme | 0095868 | 2020-06-19 11:29:31 +0000 | [diff] [blame] | 115 | ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state! |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 116 | [Tags] functionalOnuGo PortTestOnuGo |
TorstenThieme | 401af43 | 2020-06-11 15:53:53 +0000 | [diff] [blame] | 117 | [Setup] Start Logging ONUPortTest |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 118 | Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed' |
| 119 | ... Do Onu Port Check |
| 120 | ... ELSE Pass Execution ${skip_message} skipped |
TorstenThieme | 5e324e4 | 2020-07-27 09:36:16 +0000 | [diff] [blame] | 121 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
TorstenThieme | 401af43 | 2020-06-11 15:53:53 +0000 | [diff] [blame] | 122 | ... AND Stop Logging ONUPortTest |
| 123 | |
TorstenThieme | 17756ea | 2020-11-11 14:09:47 +0000 | [diff] [blame] | 124 | Onu Etcd Data Check |
| 125 | [Documentation] Validates ONU data stored in ETCD |
| 126 | ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state! |
| 127 | [Tags] functionalOnuGo EtcdDataOnuGo |
| 128 | [Setup] Start Logging ONUEtcdDataTest |
| 129 | Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed' |
| 130 | ... Do Onu Etcd Data Check |
| 131 | ... ELSE Pass Execution ${skip_message} skipped |
| 132 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 133 | ... AND Stop Logging ONUEtcdDataTest |
| 134 | |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 135 | Onu Flow Check |
| 136 | [Documentation] Validates the onu flows in ONOS and Voltha |
| 137 | ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state! |
mpagenko | c2e7ba5 | 2020-11-12 13:50:57 +0000 | [diff] [blame] | 138 | [Tags] functionalOnuGo FlowTestOnuGo |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 139 | [Setup] Start Logging ONUFlowTest |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 140 | Run Keyword If '${onu_state}'=='omci-flows-pushed' Do Onu Flow Check |
TorstenThieme | 5a205ba | 2020-09-29 08:08:29 +0000 | [diff] [blame] | 141 | ... ELSE Pass Execution ${skip_message} skipped |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 142 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 143 | ... AND Stop Logging ONUFlowTest |
| 144 | |
TorstenThieme | e3841a0 | 2020-09-23 08:20:43 +0000 | [diff] [blame] | 145 | Disable Enable Onu Device |
| 146 | [Documentation] Disables/enables ONU Device and check states |
| 147 | ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state! |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 148 | [Tags] functionalOnuGo DisableEnableOnuGo |
TorstenThieme | e3841a0 | 2020-09-23 08:20:43 +0000 | [diff] [blame] | 149 | [Setup] Start Logging DisableEnableONUDevice |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 150 | Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed' |
| 151 | ... Do Disable Enable Onu Test |
TorstenThieme | 5a205ba | 2020-09-29 08:08:29 +0000 | [diff] [blame] | 152 | ... ELSE Pass Execution ${skip_message} skipped |
TorstenThieme | e3841a0 | 2020-09-23 08:20:43 +0000 | [diff] [blame] | 153 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 154 | ... AND Stop Logging DisableEnableONUDevice |
| 155 | |
TorstenThieme | 5ca1dd1 | 2020-10-16 08:42:16 +0000 | [diff] [blame] | 156 | Power Off Power On Onu Device |
| 157 | [Documentation] Power off and Power on of all ONU Devices and check state |
| 158 | ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state! |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 159 | [Tags] functionalOnuGo PowerOffPowerOnOnuGo |
TorstenThieme | 5ca1dd1 | 2020-10-16 08:42:16 +0000 | [diff] [blame] | 160 | [Setup] Start Logging PowerOffPowerOnONUDevice |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 161 | Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed' |
| 162 | ... Do Power Off Power On Onu Device |
TorstenThieme | 5ca1dd1 | 2020-10-16 08:42:16 +0000 | [diff] [blame] | 163 | ... ELSE Pass Execution ${skip_message} skipped |
| 164 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 165 | ... AND Stop Logging PowerOffPowerOnONUDevice |
| 166 | |
TorstenThieme | 1fbe808 | 2020-10-21 13:27:59 +0000 | [diff] [blame] | 167 | Soft Reboot Onu Device |
| 168 | [Documentation] Reboots softly all ONU Devices and check state |
| 169 | ... Assuming that ONU State Test was executed where all the ONUs are reached the expected state! |
| 170 | [Tags] functionalOnuGo SoftRebootOnuGo |
| 171 | [Setup] Start Logging SoftRebootONUDevice |
| 172 | Run Keyword If '${onu_state}'=='tech-profile-config-download-success' or '${onu_state}'=='omci-flows-pushed' |
| 173 | ... Do Soft Reboot Onu Device |
| 174 | ... ELSE Pass Execution ${skip_message} skipped |
| 175 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 176 | ... AND Stop Logging SoftRebootONUDevice |
| 177 | |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 178 | *** Keywords *** |
| 179 | Setup Suite |
| 180 | [Documentation] Set up the test suite |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 181 | ${LogInfo}= Catenate |
| 182 | ... \r\nPassed arguments: |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 183 | ... state2test:${state2test}, testmode:${testmode}, techprofile:${techprofile}, |
TorstenThieme | 015d5c0 | 2020-09-11 09:53:34 +0000 | [diff] [blame] | 184 | ... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup}, |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 185 | ... print2console:${print2console} |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 186 | Log ${LogInfo} console=yes |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 187 | Common Test Suite Setup |
TorstenThieme | 5a205ba | 2020-09-29 08:08:29 +0000 | [diff] [blame] | 188 | # prepare skip message in yellow for console log |
| 189 | ${skip}= Evaluate "\\033[33mSKIP\\033[0m" |
| 190 | ${skipped}= Evaluate "\\033[33m${SPACE*14} ===> Test case above was skipped! <=== ${SPACE*15}\\033[0m" |
| 191 | ${skip_message} Catenate ${skipped} | ${skip} | |
| 192 | Set Suite Variable ${skip_message} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 193 | ${all_onu_timeout}= Run Keyword If ${num_all_onus}>4 Calculate Timeout ${timeout} |
| 194 | ... ELSE Set Variable ${timeout} |
| 195 | Set Suite Variable ${all_onu_timeout} |
TorstenThieme | 1488d77 | 2020-09-28 10:52:43 +0000 | [diff] [blame] | 196 | ${techprofile}= Set Variable If "${techprofile}"=="1T1GEM" default ${techprofile} |
TorstenThieme | 7385005 | 2020-12-10 12:43:28 +0000 | [diff] [blame] | 197 | Set Suite Variable ${techprofile} |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 198 | Run Keyword If "${techprofile}"=="default" Log To Console \nTechProfile:default (1T1GEM) |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 199 | ... ELSE IF "${techprofile}"=="1T4GEM" Set Tech Profile 1T4GEM |
| 200 | ... ELSE IF "${techprofile}"=="1T8GEM" Set Tech Profile 1T8GEM |
| 201 | ... ELSE Fail The TechProfile (${techprofile}) is not valid! |
| 202 | ${onos_ssh_connection} Open ONOS SSH Connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 203 | Set Suite Variable ${onos_ssh_connection} |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 204 | # map the passed onu state to reached and make it visible for test suite |
| 205 | ${admin_state} ${oper_status} ${connect_status} ${onu_state_nb} ${onu_state}= |
| 206 | ... Map State ${state2test} |
| 207 | Set Suite Variable ${admin_state} |
| 208 | Set Suite Variable ${oper_status} |
| 209 | Set Suite Variable ${connect_status} |
| 210 | Set Suite Variable ${onu_state_nb} |
| 211 | Set Suite Variable ${onu_state} |
TorstenThieme | 5ca1dd1 | 2020-10-16 08:42:16 +0000 | [diff] [blame] | 212 | # delete etcd MIB Template Data |
| 213 | Delete MIB Template Data |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 214 | |
TorstenThieme | b41007d | 2020-06-22 12:14:12 +0000 | [diff] [blame] | 215 | Teardown Suite |
| 216 | [Documentation] Replaces the Suite Teardown in utils.robot. |
| 217 | ... Cleans up and checks all ONU ports disabled in ONOS. |
| 218 | ... Furthermore gives the possibility to pause the execution. |
| 219 | Run Keyword If ${pausebeforecleanup} Import Library Dialogs |
| 220 | Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up! |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 221 | Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes |
TorstenThieme | b41007d | 2020-06-22 12:14:12 +0000 | [diff] [blame] | 222 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
TorstenThieme | fcafba0 | 2020-11-11 16:18:50 +0000 | [diff] [blame] | 223 | Validate Onu Data In Etcd 0 |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 224 | Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM ${timeout} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 225 | Close All ONOS SSH Connections |
TorstenThieme | 87cd620 | 2020-09-09 10:01:28 +0000 | [diff] [blame] | 226 | Remove Tech Profile |
TorstenThieme | b41007d | 2020-06-22 12:14:12 +0000 | [diff] [blame] | 227 | |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 228 | Setup Test |
| 229 | [Documentation] Pre-test Setup |
| 230 | #test for empty device list |
| 231 | Test Empty Device List |
| 232 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s Openolt is Up |
Suchitra Vemuri | b7253a5 | 2020-07-14 22:35:17 -0700 | [diff] [blame] | 233 | ... ${olt_ssh_ip} ${olt_user} ${olt_pass} |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 234 | Run Keyword If ${has_dataplane} Sleep 60s |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 235 | # Create a list of olt ids (logical and device_id) |
| 236 | ${olt_ids} Create List |
| 237 | FOR ${I} IN RANGE 0 ${num_olts} |
| 238 | #create/preprovision device |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 239 | ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}" |
| 240 | ... Create Device ${list_olts}[${I}][ip] ${OLT_PORT} |
| 241 | ... ELSE Create Device ${list_olts}[${I}][ip] ${OLT_PORT} ${list_olts}[${I}][type] |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 242 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 243 | #validate olt states |
| 244 | Wait Until Keyword Succeeds ${timeout} 5s |
| 245 | ... Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN ${olt_device_id} |
| 246 | Sleep 5s |
| 247 | ${logical_id}= Get Logical Device ID From SN ${olt_serial_number} |
| 248 | ${olt} Create Dictionary device_id ${olt_device_id} logical_id ${logical_id} |
| 249 | ... of_id ${of_id} sn ${olt_serial_number} |
| 250 | Append To List ${olt_ids} ${olt} |
| 251 | END |
| 252 | Set Global Variable ${olt_ids} |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 253 | |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 254 | Do ONU Up To State Test |
| 255 | [Documentation] This keyword performs Up2State Test |
| 256 | ... All states up to the passed have to be checked |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 257 | FOR ${I} IN RANGE 0 ${num_all_onus} |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 258 | ${src}= Set Variable ${hosts.src[${I}]} |
| 259 | ${dst}= Set Variable ${hosts.dst[${I}]} |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 260 | Run Keyword If ${onu_state_nb}>=1 |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 261 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 262 | ... Validate Device ENABLED ACTIVATING REACHABLE |
| 263 | ... ${src['onu']} onu=True onu_reason=activating-onu |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 264 | Run Keyword If ${onu_state_nb}>=2 |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 265 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 266 | ... Validate Device ENABLED ACTIVATING REACHABLE |
| 267 | ... ${src['onu']} onu=True onu_reason=starting-openomci |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 268 | Run Keyword If ${onu_state_nb}>=3 |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 269 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 270 | ... Validate Device ENABLED ACTIVATING REACHABLE |
| 271 | ... ${src['onu']} onu=True onu_reason=discovery-mibsync-complete |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 272 | Run Keyword If ${onu_state_nb}>=4 |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 273 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 274 | ... Validate Device ENABLED ACTIVE REACHABLE |
| 275 | ... ${src['onu']} onu=True onu_reason=initial-mib-downloaded |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 276 | Run Keyword If ${onu_state_nb}>=5 |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 277 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 278 | ... Validate Device ENABLED ACTIVE REACHABLE |
| 279 | ... ${src['onu']} onu=True onu_reason=tech-profile-config-download-success |
TorstenThieme | 66c91a8 | 2020-10-19 13:37:53 +0000 | [diff] [blame] | 280 | Run Keyword If ${onu_state_nb}>=6 |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 281 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 282 | ... Validate Device ENABLED ACTIVE REACHABLE |
| 283 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 284 | END |
| 285 | |
| 286 | Do ONU Single State Test |
| 287 | [Documentation] This keyword performs SingleState Test |
| 288 | ... Only the passed state has to be checked |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 289 | FOR ${I} IN RANGE 0 ${num_all_onus} |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 290 | ${src}= Set Variable ${hosts.src[${I}]} |
| 291 | ${dst}= Set Variable ${hosts.dst[${I}]} |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 292 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 015d5c0 | 2020-09-11 09:53:34 +0000 | [diff] [blame] | 293 | ... Validate Device ${admin_state} ${oper_status} ${connect_status} |
| 294 | ... ${src['onu']} onu=True onu_reason=${onu_state} |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 295 | END |
| 296 | |
TorstenThieme | 94e4ae4 | 2020-05-18 13:01:42 +0000 | [diff] [blame] | 297 | Do ONU Single State Test Time |
| 298 | [Documentation] This keyword performs SingleState Test with calculate running time |
| 299 | ... Only the passed state has to be checked and the duration each single onu adapter needed |
| 300 | ... will be calculated and printed out |
TorstenThieme | 17becfc | 2020-10-08 09:46:27 +0000 | [diff] [blame] | 301 | #${ListfinishedONUs} Create List |
| 302 | #Set Global Variable ${ListfinishedONUs} |
TorstenThieme | 94e4ae4 | 2020-05-18 13:01:42 +0000 | [diff] [blame] | 303 | Create File ONU_Startup_Time.txt This file contains the startup times of all ONUs. |
| 304 | ${list_onus} Create List |
TorstenThieme | 401af43 | 2020-06-11 15:53:53 +0000 | [diff] [blame] | 305 | Build ONU SN List ${list_onus} |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 306 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${all_onu_timeout} 50ms |
TorstenThieme | 9949b17 | 2020-06-16 10:00:15 +0000 | [diff] [blame] | 307 | ... Validate ONU Devices MIB State With Duration |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 308 | ... ${onu_state} ${list_onus} ${timeStart} print2console=${print2console} |
TorstenThieme | 401af43 | 2020-06-11 15:53:53 +0000 | [diff] [blame] | 309 | ... output_file=ONU_Startup_Time.txt |
TorstenThieme | 94e4ae4 | 2020-05-18 13:01:42 +0000 | [diff] [blame] | 310 | |
TorstenThieme | 1619db2 | 2020-04-03 12:01:15 +0000 | [diff] [blame] | 311 | Do Onu Port Check |
TorstenThieme | 0095868 | 2020-06-19 11:29:31 +0000 | [diff] [blame] | 312 | [Documentation] Check that all the UNI ports show up in ONOS |
TorstenThieme | fe7099e | 2021-01-29 08:41:04 +0000 | [diff] [blame] | 313 | Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} ${num_all_onus} BBSM ${timeout} |
TorstenThieme | 9949b17 | 2020-06-16 10:00:15 +0000 | [diff] [blame] | 314 | |
TorstenThieme | 17756ea | 2020-11-11 14:09:47 +0000 | [diff] [blame] | 315 | Do Onu Etcd Data Check |
| 316 | [Documentation] Check Onu data stored in etcd |
| 317 | Validate Onu Data In Etcd |
| 318 | |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 319 | Do Onu Flow Check |
TorstenThieme | 52ef839 | 2020-11-10 13:42:26 +0000 | [diff] [blame] | 320 | [Documentation] This keyword iterate all OLTs and performs Do Onu Flow Checks Per OLT |
| 321 | # Check and store vlan rules |
| 322 | ${firstvlanrules}= Run Keyword And Continue On Failure Validate Vlan Rules In Etcd |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 323 | FOR ${J} IN RANGE 0 ${num_olts} |
| 324 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 325 | ${onu_count}= Set Variable ${list_olts}[${J}][onucount] |
| 326 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 327 | ... ${olt_serial_number} |
| 328 | Set Global Variable ${of_id} |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 329 | # Verify Default Meter in ONOS (valid only for ATT) |
| 330 | Do Onu Subscriber Add Per OLT ${of_id} ${olt_serial_number} ${onu_count} |
| 331 | END |
| 332 | FOR ${J} IN RANGE 0 ${num_olts} |
| 333 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 334 | ${onu_count}= Set Variable ${list_olts}[${J}][onucount] |
| 335 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 336 | ... ${olt_serial_number} |
| 337 | Set Global Variable ${of_id} |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 338 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 339 | ... Get NNI Port in ONOS ${of_id} |
| 340 | Set Global Variable ${nni_port} |
| 341 | # Verify Default Meter in ONOS (valid only for ATT) |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 342 | Do Onu Flow Check Per OLT ${of_id} ${nni_port} ${olt_serial_number} ${onu_count} |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 343 | END |
TorstenThieme | 52ef839 | 2020-11-10 13:42:26 +0000 | [diff] [blame] | 344 | #log flows for verification |
| 345 | ${flowsresult}= Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} flows -s |
| 346 | log ${flowsresult} |
| 347 | #check for previous state is kept (normally omci-flows-pushed) |
| 348 | Sleep 10s |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 349 | Run Keyword And Continue On Failure Current State Test All Onus ${state2test} |
TorstenThieme | 52ef839 | 2020-11-10 13:42:26 +0000 | [diff] [blame] | 350 | ${secondvlanrules}= Run Keyword And Continue On Failure Validate Vlan Rules In Etcd nbofcookieslice=3 |
| 351 | ... prevvlanrules=${firstvlanrules} |
| 352 | FOR ${J} IN RANGE 0 ${num_olts} |
| 353 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 354 | ${onu_count}= Set Variable ${list_olts}[${J}][onucount] |
| 355 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 356 | ... ${olt_serial_number} |
| 357 | Set Global Variable ${of_id} |
| 358 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 359 | ... Get NNI Port in ONOS ${of_id} |
| 360 | Set Global Variable ${nni_port} |
| 361 | # Verify Default Meter in ONOS (valid only for ATT) |
| 362 | Do Onu Subscriber Remove Per OLT ${of_id} ${nni_port} ${olt_serial_number} ${onu_count} |
| 363 | END |
| 364 | #check for previous state is kept (normally omci-flows-pushed) |
| 365 | Sleep 10s |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 366 | Run Keyword If ${print2console} Log \r\nStart State Test All Onus. console=yes |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 367 | Run Keyword And Continue On Failure Current State Test All Onus ${state2test} |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 368 | Run Keyword If ${print2console} Log \r\nFinished State Test All Onus. console=yes |
TorstenThieme | 52ef839 | 2020-11-10 13:42:26 +0000 | [diff] [blame] | 369 | Run Keyword And Continue On Failure Validate Vlan Rules In Etcd prevvlanrules=${firstvlanrules} |
| 370 | ... setvidequal=True |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 371 | |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 372 | Do Onu Subscriber Add Per OLT |
| 373 | [Documentation] Add Subscriber per OLT |
| 374 | [Arguments] ${of_id} ${olt_serial_number} ${num_onus} |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 375 | FOR ${I} IN RANGE 0 ${num_all_onus} |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 376 | ${src}= Set Variable ${hosts.src[${I}]} |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 377 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 378 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 379 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 380 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 381 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 382 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 383 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 384 | Run Keyword If ${print2console} Log \r\n[${I}] volt-add-subscriber-access ${of_id} ${onu_port}. |
| 385 | ... console=yes |
| 386 | END |
| 387 | |
| 388 | Do Onu Flow Check Per OLT |
| 389 | [Documentation] Checks all ONU flows show up in ONOS and Voltha |
| 390 | [Arguments] ${of_id} ${nni_port} ${olt_serial_number} ${num_onus} |
| 391 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 392 | ${src}= Set Variable ${hosts.src[${I}]} |
| 393 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 394 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 395 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 396 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 397 | # Verify subscriber access flows are added for the ONU port |
| 398 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 399 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 400 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 401 | ${logoutput} Catenate \r\n[${I}] Verify Subscriber Access Flows Added For |
| 402 | ... ONU ${of_id} ${onu_port} ${src['c_tag']} ${src['s_tag']}. |
| 403 | Run Keyword If ${print2console} Log ${logoutput} console=yes |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 404 | END |
TorstenThieme | 52ef839 | 2020-11-10 13:42:26 +0000 | [diff] [blame] | 405 | |
| 406 | Do Onu Subscriber Remove Per OLT |
| 407 | [Documentation] Removes per OLT subscribers in ONOS and Voltha |
| 408 | [Arguments] ${of_id} ${nni_port} ${olt_serial_number} ${num_onus} |
| 409 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 410 | ${src}= Set Variable ${hosts.src[${I}]} |
| 411 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 412 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
| 413 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 414 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 415 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 416 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 417 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 418 | ... volt-remove-subscriber-access ${of_id} ${onu_port} |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 419 | Run Keyword If ${print2console} Log \r\n[${I}] volt-remove-subscriber-access ${of_id} ${onu_port}. |
| 420 | ... console=yes |
TorstenThieme | 52ef839 | 2020-11-10 13:42:26 +0000 | [diff] [blame] | 421 | END |
TorstenThieme | 109683b | 2020-09-24 12:35:41 +0000 | [diff] [blame] | 422 | |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 423 | Do Check Tech Profile |
| 424 | [Documentation] This keyword checks the loaded TechProfile |
| 425 | ${namespace}= Set Variable default |
Andrea Campanella | 60dde30 | 2020-09-09 18:42:56 +0200 | [diff] [blame] | 426 | ${podname}= Set Variable etcd |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 427 | ${stackname}= Get Stack Name |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 428 | ${commandget} Catenate |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 429 | ... /bin/sh -c 'ETCDCTL_API=3 etcdctl get --prefix service/${stackname}/technology_profiles/XGS-PON/64' |
Holger Hildebrandt | 2314774 | 2020-11-16 10:13:21 +0000 | [diff] [blame] | 430 | ${result}= Exec Pod In Kube ${namespace} ${podname} ${commandget} |
TorstenThieme | e0e5bba | 2020-08-05 11:20:13 +0000 | [diff] [blame] | 431 | ${num_gem_ports}= Set Variable 1 |
| 432 | ${num_gem_ports}= Set Variable If |
| 433 | ... "${techprofile}"=="default" 1 |
| 434 | ... "${techprofile}"=="1T4GEM" 4 |
| 435 | ... "${techprofile}"=="1T8GEM" 8 |
| 436 | @{resultList} Split String ${result} separator=, |
| 437 | ${num_of_count_matches}= Get Match Count ${resultList} "num_gem_ports": ${num_gem_ports} |
| 438 | ... whitespace_insensitive=True |
TorstenThieme | a022194 | 2020-12-09 11:35:03 +0000 | [diff] [blame] | 439 | ${num_of_expected_matches}= Evaluate ${num_all_onus} |
TorstenThieme | a022194 | 2020-12-09 11:35:03 +0000 | [diff] [blame] | 440 | Should Be Equal As Integers ${num_of_expected_matches} ${num_of_count_matches} |
| 441 | ... TechProfile (${TechProfile}) not loaded correctly:${num_of_count_matches} of ${num_of_expected_matches} |
TorstenThieme | 015d5c0 | 2020-09-11 09:53:34 +0000 | [diff] [blame] | 442 | |
| 443 | Do Disable Enable Onu Test |
| 444 | [Documentation] This keyword disables/enables all onus and checks the states. |
TorstenThieme | 1fbe808 | 2020-10-21 13:27:59 +0000 | [diff] [blame] | 445 | [Arguments] ${state2check}=${state2test} ${checkstatebeforedisable}=True |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 446 | ... ${state2checkafterdisable}=tech-profile-config-delete-success |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 447 | Run Keyword If ${checkstatebeforedisable} Current State Test All Onus ${state2check} |
| 448 | Disable Onu Device |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 449 | ${alternative_onu_reason}= Set Variable If |
| 450 | ... '${state2checkafterdisable}'=='tech-profile-config-delete-success' omci-flows-deleted |
| 451 | ... '${state2checkafterdisable}'=='omci-admin-lock' tech-profile-config-delete-success ${EMPTY} |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 452 | ${alternativeonustates}= Create List ${alternative_onu_reason} |
| 453 | Current State Test All Onus ${state2checkafterdisable} alternativeonustate=${alternativeonustates} |
TorstenThieme | 17becfc | 2020-10-08 09:46:27 +0000 | [diff] [blame] | 454 | Log Ports |
| 455 | #check no port is enabled in ONOS |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 456 | Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} 0 BBSM |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 457 | Enable Onu Device |
| 458 | Current State Test All Onus ${state2check} |
TorstenThieme | 17becfc | 2020-10-08 09:46:27 +0000 | [diff] [blame] | 459 | Log Ports onlyenabled=True |
| 460 | #check that all the UNI ports show up in ONOS again |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 461 | Wait for Ports in ONOS for all OLTs ${onos_ssh_connection} ${num_all_onus} BBSM |
TorstenThieme | 015d5c0 | 2020-09-11 09:53:34 +0000 | [diff] [blame] | 462 | |
TorstenThieme | 5ca1dd1 | 2020-10-16 08:42:16 +0000 | [diff] [blame] | 463 | Do Power Off Power On Onu Device |
| 464 | [Documentation] This keyword power off/on all onus and checks the states. |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 465 | Power Off ONU Device ${namespace} |
TorstenThieme | 5ca1dd1 | 2020-10-16 08:42:16 +0000 | [diff] [blame] | 466 | Sleep 5s |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 467 | ${alternativeonustates}= Create List omci-flows-deleted |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 468 | Current State Test All Onus tech-profile-config-delete-success |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 469 | ... ENABLED DISCOVERED UNREACHABLE alternativeonustate=${alternativeonustates} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 470 | Power On ONU Device ${namespace} |
| 471 | Current State Test All Onus ${state2test} |
TorstenThieme | 5ca1dd1 | 2020-10-16 08:42:16 +0000 | [diff] [blame] | 472 | |
TorstenThieme | 1fbe808 | 2020-10-21 13:27:59 +0000 | [diff] [blame] | 473 | Do Soft Reboot Onu Device |
| 474 | [Documentation] This keyword reboots softly all onus and checks the states. |
TorstenThieme | fd7e7ba | 2020-11-06 13:57:57 +0000 | [diff] [blame] | 475 | FOR ${I} IN RANGE 0 ${num_all_onus} |
TorstenThieme | 1fbe808 | 2020-10-21 13:27:59 +0000 | [diff] [blame] | 476 | ${src}= Set Variable ${hosts.src[${I}]} |
| 477 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
TorstenThieme | a0b1160 | 2020-10-30 08:39:24 +0000 | [diff] [blame] | 478 | Reboot ONU ${onu_device_id} False |
TorstenThieme | 1fbe808 | 2020-10-21 13:27:59 +0000 | [diff] [blame] | 479 | END |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 480 | ${alternativeonustates}= Create List omci-flows-deleted |
Matteo Scandolo | c14525a | 2021-02-02 08:34:43 -0800 | [diff] [blame] | 481 | Current State Test All Onus tech-profile-config-delete-success |
| 482 | ... ENABLED DISCOVERED UNREACHABLE alternativeonustate=${alternativeonustates} |
TorstenThieme | 7385005 | 2020-12-10 12:43:28 +0000 | [diff] [blame] | 483 | Sleep 5s |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 484 | Run Keyword If ${has_dataplane} Current State Test All Onus omci-flows-pushed |
TorstenThieme | d4f4896 | 2020-12-08 12:17:19 +0000 | [diff] [blame] | 485 | Do Onu Port Check |