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