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 *** |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 41 | ${NAMESPACE} voltha |
| 42 | ${INFRA_NAMESPACE} default |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 43 | ${timeout} 60s |
| 44 | ${of_id} 0 |
| 45 | ${logical_id} 0 |
| 46 | ${has_dataplane} True |
| 47 | ${external_libs} True |
| 48 | ${teardown_device} True |
| 49 | ${scripts} ../../scripts |
| 50 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 51 | ${container_log_dir} ${None} |
| 52 | # flag for first test, needed due default timeout in BBSim to mimic OLT reboot of 60 seconds |
| 53 | ${firsttest} True |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 54 | # determines the environment workflow: DT, TT or ATT (default) |
| 55 | # example: -v workflow:DT |
| 56 | ${workflow} ATT |
TorstenThieme | 4798369 | 2021-06-17 10:43:35 +0000 | [diff] [blame] | 57 | # KV Store Prefix |
| 58 | # example: -v kvstoreprefix:voltha_voltha |
| 59 | ${kvstoreprefix} voltha_voltha |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 60 | # flag debugmode is used, if true timeout calculation various, can be passed via the command line too |
| 61 | # example: -v debugmode:True |
| 62 | ${debugmode} False |
| 63 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 64 | # example: -v logging:True |
| 65 | ${logging} False |
| 66 | # if True execution will be paused before clean up, only use in case of manual testing, do not use in ci pipeline! |
| 67 | # example: -v pausebeforecleanup:True |
| 68 | ${pausebeforecleanup} False |
| 69 | # if True some outputs to console are done during running tests e.g. long duration flow test |
| 70 | # example: -v print2console:True |
| 71 | ${print2console} False |
| 72 | # if True (hard) kill will be used to restart onu adapter, else (soft) restart mechanism of k8s will be used |
| 73 | # example: -v usekill2restart:True |
| 74 | ${usekill2restart} False |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 75 | # if True etcd check will be executed in test case teardown, if False etcd check will be executed in suite teardown |
| 76 | # example: -v etcdcheckintestteardown:False |
| 77 | ${etcdcheckintestteardown} True |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 78 | ${data_dir} ../data |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 79 | ${suppressaddsubscriber} True |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 80 | |
Hardik Windlass | b1bda36 | 2021-11-24 11:54:36 +0000 | [diff] [blame] | 81 | # flag to choose the subscriber provisioning command type in ONOS |
| 82 | # TT often provision a single services for a subscriber (eg: hsia, voip, ...) one after the other. |
| 83 | # if set to True, command used is "volt-add-subscriber-unitag" |
| 84 | # if set to False, comand used is "volt-add-subscriber-access" |
| 85 | ${unitag_sub} False |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 86 | |
| 87 | *** Test Cases *** |
| 88 | Reconcile In Starting-OpenOmci |
| 89 | [Documentation] Validates the Reconcile in Starting-OpenOmci |
| 90 | ... Reconcile test during “starting-openomci” in AT&T-workflow: |
| 91 | ... - 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] | 92 | ... - wait for device reason “starting-openomci” |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 93 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 94 | ... - wait for open-onu-adapter-go to restart |
| 95 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 96 | ... - delete ONU and MIB-template in KV-store |
| 97 | [Tags] functionalOnuGo ReconcileStartingOpenOmciOnuGo |
| 98 | [Setup] Run Keywords Start Logging ReconcileStartingOpenOmciOnuGo |
| 99 | ... AND Setup Test |
| 100 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 101 | Do Reconcile In Determined State starting-openomci |
TorstenThieme | 373adfe | 2021-12-16 13:03:04 +0000 | [diff] [blame] | 102 | [Teardown] Run Keywords Printout ONU Serial Number and Device Id print2console=${print2console} |
| 103 | ... AND Run Keyword If ${logging} Get Logical Id of OLT |
TorstenThieme | 3494ceb | 2021-07-19 09:47:24 +0000 | [diff] [blame] | 104 | ... AND Run Keyword If ${logging} Collect Logs |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 105 | ... AND Teardown Test |
| 106 | ... AND Stop Logging ReconcileStartingOpenOmciOnuGo |
| 107 | |
| 108 | Reconcile In Initial-Mib-Downloaded |
| 109 | [Documentation] Validates the Reconcile in initial-mib-downloaded |
| 110 | ... Reconcile test during “initial-mib-downloaded” in AT&T-workflow: |
| 111 | ... - 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] | 112 | ... - wait for device reason “initial-mib-downloaded” |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 113 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 114 | ... - wait for open-onu-adapter-go to restart |
| 115 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 116 | ... - delete ONU and MIB-template in KV-store |
| 117 | [Tags] functionalOnuGo ReconcileInitialMibDownloadedOnuGo |
| 118 | [Setup] Run Keywords Start Logging ReconcileInitialMibDownloadedOnuGo |
| 119 | ... AND Setup Test |
| 120 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 121 | Do Reconcile In Determined State initial-mib-downloaded |
TorstenThieme | 373adfe | 2021-12-16 13:03:04 +0000 | [diff] [blame] | 122 | [Teardown] Run Keywords Printout ONU Serial Number and Device Id print2console=${print2console} |
| 123 | ... AND Run Keyword If ${logging} Get Logical Id of OLT |
TorstenThieme | 3494ceb | 2021-07-19 09:47:24 +0000 | [diff] [blame] | 124 | ... AND Run Keyword If ${logging} Collect Logs |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 125 | ... AND Teardown Test |
| 126 | ... AND Stop Logging ReconcileInitialMibDownloadedOnuGo |
| 127 | |
| 128 | Reconcile In Omci-Flows-Pushed |
| 129 | [Documentation] Validates the Reconcile in omci-flows-pushed |
| 130 | ... Former testcase: Reconcile Onu Device in Testsuite Voltha_ONUStateTest.robot |
| 131 | ... Reconcile test during “omci-flows-pushed” in AT&T-workflow: |
| 132 | ... - 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] | 133 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 134 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 135 | ... - wait for open-onu-adapter-go to restart |
| 136 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 137 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 138 | ... - wait for device corresponding onu reason e.g. “tech-profile-config-delete-success” |
| 139 | ... - check UNI-ports disabled in ONOS |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 140 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 141 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 142 | ... - delete ONU and MIB-template in KV-store |
| 143 | [Tags] functionalOnuGo ReconcileOmciFlowsPushedOnuGo |
| 144 | [Setup] Run Keywords Start Logging ReconcileOmciFlowsPushedOnuGo |
| 145 | ... AND Setup Test |
| 146 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 147 | Do Reconcile In Omci-Flows-Pushed |
TorstenThieme | 373adfe | 2021-12-16 13:03:04 +0000 | [diff] [blame] | 148 | [Teardown] Run Keywords Printout ONU Serial Number and Device Id print2console=${print2console} |
| 149 | ... AND Run Keyword If ${logging} Get Logical Id of OLT |
TorstenThieme | 3494ceb | 2021-07-19 09:47:24 +0000 | [diff] [blame] | 150 | ... AND Run Keyword If ${logging} Collect Logs |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 151 | ... AND Teardown Test |
| 152 | ... AND Stop Logging ReconcileOmciFlowsPushedOnuGo |
| 153 | |
| 154 | Reconcile For Disabled Onu Device |
| 155 | [Documentation] Validates the Reconcile for disabled Onu device |
| 156 | ... Reconcile test for disabled Onu device in AT&T-workflow: |
| 157 | ... - 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] | 158 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 159 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 160 | ... - wait for device corresponding onu reason e.g. “tech-profile-config-delete-success” |
| 161 | ... - check UNI-ports disabled in ONOS |
| 162 | ... - kill the open-onu-adapter-go |
| 163 | ... - wait for open-onu-adapter-go to restart |
| 164 | ... - check device reason is still the same before restart |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 165 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 166 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 167 | ... - delete ONU and MIB-template in KV-store |
| 168 | [Tags] functionalOnuGo ReconcileDisabledOnuDeviceOnuGo |
| 169 | [Setup] Run Keywords Start Logging ReconcileDisabledOnuDeviceOnuGo |
| 170 | ... AND Setup Test |
| 171 | Run Keyword If ${has_dataplane} Clean Up Linux |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 172 | Do Reconcile For Disabled Onu Device |
TorstenThieme | 373adfe | 2021-12-16 13:03:04 +0000 | [diff] [blame] | 173 | [Teardown] Run Keywords Printout ONU Serial Number and Device Id print2console=${print2console} |
| 174 | ... AND Run Keyword If ${logging} Get Logical Id of OLT |
TorstenThieme | 3494ceb | 2021-07-19 09:47:24 +0000 | [diff] [blame] | 175 | ... AND Run Keyword If ${logging} Collect Logs |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 176 | ... AND Teardown Test |
| 177 | ... AND Stop Logging ReconcileDisabledOnuDeviceOnuGo |
| 178 | |
TorstenThieme | 712b296 | 2021-11-17 14:16:15 +0000 | [diff] [blame] | 179 | Olt Deletion After Adapter Restart |
| 180 | [Documentation] Validates the OLT deletion after adapter restart |
| 181 | ... - prefered environment is two ONUs are active on each of two OLTs, but test works also with single ONU/OLT |
| 182 | ... - restart the ONU adapter preferred via "kubectl delete pod" |
| 183 | ... - delete one OLT immediately after the restart has been initiated |
| 184 | ... - wait until the restart of the ONU adapter and the reconcile processing are finished |
| 185 | ... - check whether the ONUs on the remaining OLT have been properly reconciled (if avaialable) |
| 186 | ... - check whether the ONUs at the deleted OLT have disappeared from the device list |
| 187 | ... - KV store data of these ONUs are deleted under: |
| 188 | ... - <kvStorePrefix>/openonu/<deviceId> |
| 189 | ... - <kvStorePrefix>/openonu/pm-data/<deviceId> |
| 190 | ... - check for not deleted device(s) reason is still the same before restart (if available) |
| 191 | ... - delete ONU and MIB-template in KV-store |
| 192 | ... Check [VOL-4443] for more details |
| 193 | [Tags] functionalOnuGo OltDeletionAfterAdapterRestartOnuGo |
| 194 | [Setup] Run Keywords Start Logging OltDeletionAfterAdapterRestartOnuGo |
| 195 | ... AND Setup Test |
| 196 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 197 | Do Olt Deletion After Adapter Restart |
TorstenThieme | 373adfe | 2021-12-16 13:03:04 +0000 | [diff] [blame] | 198 | [Teardown] Run Keywords Printout ONU Serial Number and Device Id print2console=${print2console} |
| 199 | ... AND Run Keyword If ${logging} Get Logical Id of OLT |
TorstenThieme | 712b296 | 2021-11-17 14:16:15 +0000 | [diff] [blame] | 200 | ... AND Run Keyword If ${logging} Collect Logs |
| 201 | ... AND Teardown Test |
| 202 | ... AND Stop Logging OltDeletionAfterAdapterRestartOnuGo |
| 203 | |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 204 | Flow Deletion After Adapter Restart |
| 205 | [Documentation] Validates the flow(s) deletion after adapter restart |
| 206 | ... - perform sanity test include add subscriber |
| 207 | ... - restart the ONU adapter preferred via "kubectl delete pod" |
| 208 | ... - remove flow(s) from one ONU immediately after the restart has been initiated |
| 209 | ... - wait until the restart of the ONU adapter and the reconcile processing are finished |
| 210 | ... - check removed flow(s) from ONU |
| 211 | ... - check for not removed flows still the same before restart (if available) |
| 212 | [Tags] functionalOnuGo FlowDeletionAfterAdapterRestartOnuGo |
| 213 | [Setup] Run Keywords Start Logging FlowDeletionAfterAdapterRestartOnuGo |
| 214 | ... AND Setup Test |
| 215 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 216 | Do Flow Deletion After Adapter Restart |
TorstenThieme | 373adfe | 2021-12-16 13:03:04 +0000 | [diff] [blame] | 217 | [Teardown] Run Keywords Printout ONU Serial Number and Device Id print2console=${print2console} |
| 218 | ... AND Run Keyword If ${logging} Get Logical Id of OLT |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 219 | ... AND Run Keyword If ${logging} Collect Logs |
| 220 | ... AND Teardown Test |
| 221 | ... AND Stop Logging FlowDeletionAfterAdapterRestartOnuGo |
| 222 | |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 223 | *** Keywords *** |
| 224 | Setup Suite |
| 225 | [Documentation] Set up the test suite |
Andrea Campanella | 82add37 | 2021-11-05 12:01:15 +0100 | [diff] [blame] | 226 | Start Logging Setup or Teardown Setup-${SUITE NAME} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 227 | ${LogInfo}= Catenate |
| 228 | ... \r\nPassed arguments: |
| 229 | ... debugmode:${debugmode}, logging:${logging}, pausebeforecleanup:${pausebeforecleanup}, |
TorstenThieme | 4798369 | 2021-06-17 10:43:35 +0000 | [diff] [blame] | 230 | ... print2console:${print2console}, usekill2restart:${usekill2restart}, workflow:${workflow}, |
| 231 | ... kvstoreprefix:${kvstoreprefix} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 232 | Log ${LogInfo} console=yes |
| 233 | Common Test Suite Setup |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 234 | # delete etcd MIB Template Data |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 235 | Delete MIB Template Data ${INFRA_NAMESPACE} |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 236 | # delete etcd onu data |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 237 | Delete ONU Go Adapter ETCD Data namespace=${INFRA_NAMESPACE} validate=True |
Andrea Campanella | 82add37 | 2021-11-05 12:01:15 +0100 | [diff] [blame] | 238 | Run Keyword If ${logging} Collect Logs |
| 239 | Stop Logging Setup or Teardown Setup-${SUITE NAME} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 240 | |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 241 | |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 242 | Teardown Suite |
| 243 | [Documentation] Replaces the Suite Teardown in utils.robot. |
| 244 | ... Cleans up and checks all ONU ports disabled in ONOS. |
| 245 | ... Furthermore gives the possibility to pause the execution. |
Andrea Campanella | 82add37 | 2021-11-05 12:01:15 +0100 | [diff] [blame] | 246 | Start Logging Setup or Teardown Teardown-${SUITE NAME} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 247 | Run Keyword If ${pausebeforecleanup} Import Library Dialogs |
| 248 | Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up! |
| 249 | Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes |
| 250 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 251 | Run Keyword If ${usekill2restart} Restart Pod By Label ${NAMESPACE} app adapter-open-onu |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 252 | Run Keyword Unless ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 253 | ... Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix} without_pm_data=False |
TorstenThieme | 731a759 | 2021-07-01 14:26:54 +0000 | [diff] [blame] | 254 | Wait for Ports in ONOS for all OLTs ${ONOS_SSH_IP} ${ONOS_SSH_PORT} 0 BBSM ${timeout} |
Andrea Campanella | 82add37 | 2021-11-05 12:01:15 +0100 | [diff] [blame] | 255 | Run Keyword If ${logging} Collect Logs |
| 256 | Stop Logging Setup or Teardown Teardown-${SUITE NAME} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 257 | Close All ONOS SSH Connections |
| 258 | |
| 259 | Setup Test |
| 260 | [Documentation] Pre-test Setup |
| 261 | #test for empty device list |
| 262 | Test Empty Device List |
| 263 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s Openolt is Up |
| 264 | ... ${olt_ssh_ip} ${olt_user} ${olt_pass} |
| 265 | Run Keyword If ${has_dataplane} Sleep 60s |
| 266 | #restart open-onu pod to reset crash loop back off mechansim of kubenetes |
TorstenThieme | 3716540 | 2021-09-03 11:39:40 +0000 | [diff] [blame] | 267 | Run Keyword If "${firsttest}"=="False" and "${usekill2restart}"=="True" |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 268 | ... Restart Pod By Label ${NAMESPACE} app adapter-open-onu |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 269 | Run Keyword If "${firsttest}"=="False" Sleep 35s |
| 270 | ${firsttest} Set Variable False |
| 271 | Set Suite Variable ${firsttest} |
| 272 | # Create a list of olt ids (logical and device_id) |
| 273 | ${olt_ids} Create List |
| 274 | FOR ${I} IN RANGE 0 ${num_olts} |
| 275 | #create/preprovision device |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 276 | ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}" |
TorstenThieme | 4413664 | 2021-02-12 13:41:17 +0000 | [diff] [blame] | 277 | ... Create Device ${list_olts}[${I}][ip] ${list_olts}[${I}][oltport] |
| 278 | ... 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] | 279 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 280 | #validate olt states |
| 281 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 8b44649 | 2021-06-10 06:25:23 +0000 | [diff] [blame] | 282 | ... Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN ${olt_device_id} by_dev_id=True |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 283 | Sleep 5s |
| 284 | ${logical_id}= Get Logical Device ID From SN ${olt_serial_number} |
| 285 | ${olt} Create Dictionary device_id ${olt_device_id} logical_id ${logical_id} |
| 286 | ... of_id ${of_id} sn ${olt_serial_number} |
| 287 | Append To List ${olt_ids} ${olt} |
| 288 | END |
| 289 | Set Global Variable ${olt_ids} |
| 290 | |
| 291 | Teardown Test |
| 292 | [Documentation] Post-test Teardown |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 293 | Run Keyword If ${pausebeforecleanup} Import Library Dialogs |
| 294 | Run Keyword If ${pausebeforecleanup} Pause Execution Press OK to continue with clean up! |
| 295 | Run Keyword If ${pausebeforecleanup} Log Teardown will be continued... console=yes |
TorstenThieme | e9017be | 2021-03-05 16:59:31 +0000 | [diff] [blame] | 296 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 297 | # delete etcd MIB Template Data |
Matteo Scandolo | 6b52412 | 2021-10-22 14:34:29 -0700 | [diff] [blame] | 298 | Delete MIB Template Data ${INFRA_NAMESPACE} |
TorstenThieme | b355eb6 | 2021-03-09 14:04:55 +0000 | [diff] [blame] | 299 | # check etcd data are empty |
TorstenThieme | 4507160 | 2021-03-16 12:14:37 +0000 | [diff] [blame] | 300 | Run Keyword If ${etcdcheckintestteardown} Wait Until Keyword Succeeds ${timeout} 1s |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 301 | ... Validate Onu Data In Etcd ${INFRA_NAMESPACE} 0 ${kvstoreprefix} without_pm_data=False |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 302 | Sleep 5s |
| 303 | |
| 304 | Do Reconcile In Determined State |
| 305 | [Documentation] This keyword reconciles ONU device when passed reason is reached and |
| 306 | ... check the state afterwards. |
| 307 | ... Following steps will be executed: |
| 308 | ... - enable OLT device |
| 309 | ... - wait for passed openonu reason |
| 310 | ... - restart openonu adaptor |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 311 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 312 | [Arguments] ${expected_onu_reason} |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 313 | ${admin_state} ${oper_status} ${connect_status} ${onu_state_nb} ${onu_state}= Map State |
| 314 | ... ${expected_onu_reason} |
| 315 | Should Be True ${onu_state_nb}<=5 |
| 316 | ... 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] | 317 | FOR ${I} IN RANGE 0 ${num_olts} |
| 318 | #get olt serial number |
| 319 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 320 | #validate olt states |
| 321 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 322 | Enable Device ${olt_device_id} |
| 323 | END |
| 324 | Current State Test All Onus ${expected_onu_reason} |
TorstenThieme | 96fe9ee | 2021-10-21 10:24:08 +0000 | [diff] [blame] | 325 | Reconcile Onu Adapter ${NAMESPACE} ${usekill2restart} ACTIVE |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 326 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 327 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 328 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 329 | |
| 330 | Do Reconcile For Disabled Onu Device |
| 331 | [Documentation] This keyword reconciles ONU device for a disabled onu device and |
| 332 | ... check the state afterwards. |
| 333 | ... Following steps will be executed: |
| 334 | ... - enable OLT device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 335 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 336 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 337 | ... - wait for corresponding openonu reason |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 338 | ... - check UNI-ports disabled in ONOS |
| 339 | ... - restart openonu adaptor |
| 340 | ... - check openonu adaptor is ready again |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 341 | ... - check device reason is still before restart |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 342 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 343 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 344 | FOR ${I} IN RANGE 0 ${num_olts} |
| 345 | #get olt serial number |
| 346 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 347 | #validate olt states |
| 348 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 349 | Enable Device ${olt_device_id} |
| 350 | END |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 351 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 352 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 353 | ... ELSE Perform Sanity Test |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 354 | Disable Onu Device |
TorstenThieme | 0ec95eb | 2021-11-23 14:56:26 +0000 | [diff] [blame] | 355 | Current State Test All Onus tech-profile-config-delete-success |
TorstenThieme | 96fe9ee | 2021-10-21 10:24:08 +0000 | [diff] [blame] | 356 | Reconcile Onu Adapter ${NAMESPACE} ${usekill2restart} UNKNOWN |
TorstenThieme | 0ec95eb | 2021-11-23 14:56:26 +0000 | [diff] [blame] | 357 | Current State Test All Onus tech-profile-config-delete-success |
TorstenThieme | 731a759 | 2021-07-01 14:26:54 +0000 | [diff] [blame] | 358 | Wait for all ONU Ports in ONOS Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 359 | Enable Onu Device |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 360 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 361 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 362 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 363 | |
| 364 | Do Reconcile In Omci-Flows-Pushed |
| 365 | [Documentation] This keyword reconciles ONU device in omci-flows-pushed and check the state afterwards. |
| 366 | ... Reconcile test during “omci-flows-pushed” in AT&T-workflow: |
| 367 | ... - 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] | 368 | ... - perform sanity test include add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 369 | ... - kill the open-onu-adapter-go |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 370 | ... - wait for open-onu-adapter-go to restart |
| 371 | ... - perform sanity test suppress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 372 | ... - disable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 373 | ... - wait for corresponding device reason |
| 374 | ... - check UNI-ports disabled in ONOS |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 375 | ... - enable onu device |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 376 | ... - perform sanity test supress add subscriber |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 377 | FOR ${I} IN RANGE 0 ${num_olts} |
| 378 | #get olt serial number |
| 379 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 380 | #validate olt states |
| 381 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 382 | Enable Device ${olt_device_id} |
| 383 | END |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 384 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 385 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
TorstenThieme | c3c2323 | 2021-01-13 13:06:31 +0000 | [diff] [blame] | 386 | ... ELSE Perform Sanity Test |
TorstenThieme | 96fe9ee | 2021-10-21 10:24:08 +0000 | [diff] [blame] | 387 | Reconcile Onu Adapter ${NAMESPACE} ${usekill2restart} ACTIVE |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 388 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 389 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 390 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 391 | Disable Onu Device |
TorstenThieme | 0ec95eb | 2021-11-23 14:56:26 +0000 | [diff] [blame] | 392 | Current State Test All Onus tech-profile-config-delete-success |
TorstenThieme | 731a759 | 2021-07-01 14:26:54 +0000 | [diff] [blame] | 393 | Wait for all ONU Ports in ONOS Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
TorstenThieme | 440b7c0 | 2020-12-18 15:42:57 +0000 | [diff] [blame] | 394 | Enable Onu Device |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 395 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT ${suppressaddsubscriber} |
TorstenThieme | 136ebf7 | 2021-02-26 14:27:07 +0000 | [diff] [blame] | 396 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT ${suppressaddsubscriber} |
TorstenThieme | 70bc526 | 2021-01-19 12:12:55 +0000 | [diff] [blame] | 397 | ... ELSE Perform Sanity Test ${suppressaddsubscriber} |
TorstenThieme | 712b296 | 2021-11-17 14:16:15 +0000 | [diff] [blame] | 398 | |
| 399 | |
| 400 | Do Olt Deletion After Adapter Restart |
| 401 | [Documentation] This keyword deletes OLT after adapter restart and checks deleted device(s) and data |
| 402 | ... - prefered environment is two ONUs are active on each of two OLTs, but test works also with single ONU/OLT |
| 403 | ... - restart the ONU adapter preferred via "kubectl delete pod" |
| 404 | ... - delete one OLT immediately after the restart has been initiated |
| 405 | ... - wait until the restart of the ONU adapter and the reconcile processing are finished |
| 406 | ... - check whether the ONUs on the remaining OLT have been properly reconciled (if avaialable) |
| 407 | ... - check whether the ONUs at the deleted OLT have disappeared from the device list |
| 408 | ... - KV store data of these ONUs are deleted under: |
| 409 | ... - <kvStorePrefix>/openonu/<deviceId> |
| 410 | ... - <kvStorePrefix>/openonu/pm-data/<deviceId> |
| 411 | ... - check for not deleted device(s) reason is still the same before restart (if available) |
| 412 | ... - delete ONU and MIB-template in KV-store |
| 413 | ... Check [VOL-4443] for more details |
| 414 | FOR ${I} IN RANGE 0 ${num_olts} |
| 415 | #get olt serial number |
| 416 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 417 | #validate olt states |
| 418 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 419 | Enable Device ${olt_device_id} |
| 420 | END |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 421 | # bring all onus to active -> OMCI-Flows-Pushed |
TorstenThieme | 712b296 | 2021-11-17 14:16:15 +0000 | [diff] [blame] | 422 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
| 423 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
| 424 | ... ELSE Perform Sanity Test |
| 425 | # OLT#1 will be deleted, get its SN |
| 426 | ${olt_to_be_deleted}= Set Variable ${olts[0]['serial']} |
| 427 | ${olt_to_be_deleted_device_id}= Get OLTDeviceID From OLT List ${olt_to_be_deleted} |
| 428 | # collect all ONU device ids belonging to OLT to be deleted |
| 429 | ${onu_device_id_list_should_be_deleted} Create List |
| 430 | Build ONU Device Id List ${onu_device_id_list_should_be_deleted} ${olt_to_be_deleted} |
| 431 | Log ${onu_device_id_list_should_be_deleted} |
| 432 | Reconcile Onu Adapter ${NAMESPACE} ${usekill2restart} ACTIVE ${olt_to_be_deleted} |
| 433 | # validate OLT and all corresponding ONUs are removed |
| 434 | Validate all ONUS for OLT Removed ${num_all_onus} ${hosts} ${olt_to_be_deleted} ${timeout} |
| 435 | Validate Device Removed ${olt_to_be_deleted} |
| 436 | # validate for alle removed ONUs KV store date deleted |
| 437 | FOR ${onu_device_id} IN @{onu_device_id_list_should_be_deleted} |
| 438 | Log ${onu_device_id} |
| 439 | Wait Until Keyword Succeeds ${timeout} 1s Validate Onu Data In Etcd Removed ${INFRA_NAMESPACE} |
| 440 | ... ${onu_device_id} ${kvstoreprefix} without_pm_data=False |
| 441 | END |
| 442 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 443 | ${src}= Set Variable ${hosts.src[${I}]} |
| 444 | Continue For Loop If "${olt_to_be_deleted}"=="${src['olt']}" |
| 445 | Current State Test omci-flows-pushed ${src['onu']} |
| 446 | END |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 447 | |
| 448 | Do Flow Deletion After Adapter Restart |
| 449 | [Documentation] This keyword removes flow(s) after adapter restart and checks removed flow(s) |
| 450 | ... - perform sanity test include add subscriber |
| 451 | ... - restart the ONU adapter preferred via "kubectl delete pod" |
| 452 | ... - remove flow(s) from one ONU immediately after the restart has been initiated |
| 453 | ... - wait until the restart of the ONU adapter and the reconcile processing are finished |
| 454 | ... - check removed flow(s) from ONU |
| 455 | ... - check for not removed flows still the same before restart (if available) |
| 456 | FOR ${I} IN RANGE 0 ${num_olts} |
| 457 | #get olt serial number |
| 458 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 459 | #validate olt states |
| 460 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 461 | Enable Device ${olt_device_id} |
| 462 | END |
| 463 | # bring all onus to active -> OMCI-Flows-Pushed |
| 464 | Run Keyword If "${workflow}"=="DT" Perform Sanity Test DT |
| 465 | ... ELSE IF "${workflow}"=="TT" Perform Sanity Tests TT |
| 466 | ... ELSE Perform Sanity Test |
| 467 | # log ONOS flows before remove |
| 468 | ${flow}= Execute ONOS CLI Command use single connection |
| 469 | ... ${ONOS_SSH_IP} ${ONOS_SSH_PORT} flows -s any ${of_id} |
| 470 | Log ${flow} |
| 471 | # validate OLT flows before remove |
| 472 | ${onu_device_id_list} Create List |
| 473 | Build ONU Device Id List ${onu_device_id_list} |
| 474 | Log ${onu_device_id_list} |
| 475 | FOR ${onu_device_id} IN @{onu_device_id_list} |
| 476 | Log ${onu_device_id} |
| 477 | ${rc} ${output}= Run and Return Rc and Output |
Andrea Campanella | 28989d1 | 2022-01-11 09:49:21 +0100 | [diff] [blame] | 478 | ... voltctl -c ${VOLTCTL_CONFIG} device flows ${onu_device_id} -m 32MB -o json |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 479 | Should Be Equal As Integers ${rc} 0 |
| 480 | ${jsondata}= To Json ${output} |
| 481 | Log ${jsondata} |
| 482 | END |
| 483 | # Collect data for remove flow(s) |
| 484 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${hosts.src[0]['olt']} |
| 485 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${hosts.src[0]['onu']} |
| 486 | ... ${of_id} ${hosts.src[0]['uni_id']} |
| 487 | ${params_for_remove_flow}= Create Dictionary of_id=${of_id} onu_port=${onu_port} |
| 488 | # Collect number of flows for comparing after Reconcile |
| 489 | ${olt_flows_list} Create List |
| 490 | FOR ${I} IN RANGE 0 ${num_olts} |
| 491 | ${olt_of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${list_olts}[${I}][sn] |
| 492 | ${flows}= Count flows ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${olt_of_id} added |
| 493 | ${olt_flows}= Create Dictionary olt=${olt_of_id} flows=${flows} |
| 494 | Append To List ${olt_flows_list} ${olt_flows} |
| 495 | END |
| 496 | ${flows_onu}= Count flows ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} added ${onu_port} |
| 497 | # Restart onu adapter with deleting flows from first onu |
| 498 | Reconcile Onu Adapter ${NAMESPACE} ${usekill2restart} ACTIVE flow_delete_params=${params_for_remove_flow} |
| 499 | # validate flows in ONOS after remove |
| 500 | ${flow}= Execute ONOS CLI Command use single connection |
| 501 | ... ${ONOS_SSH_IP} ${ONOS_SSH_PORT} flows -s any ${of_id} |
| 502 | Log ${flow} |
| 503 | ${expected_flows_onu}= Set Variable If "${workflow}"=="ATT" 1 0 |
| 504 | Wait Until Keyword Succeeds ${timeout} 2s Validate number of flows ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 505 | ... ${expected_flows_onu} ${of_id} any ${onu_port} |
TorstenThieme | d649288 | 2021-12-16 08:10:02 +0000 | [diff] [blame] | 506 | ${flow}= Execute ONOS CLI Command use single connection |
| 507 | ... ${ONOS_SSH_IP} ${ONOS_SSH_PORT} flows -s any ${of_id} |
| 508 | Log ${flow} |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 509 | # Beside onu port specific flows additional flows deleted depending on workflow |
| 510 | ${additional_flows_deleted}= Set Variable If |
| 511 | ... "${workflow}"=="DT" 1 |
| 512 | ... "${workflow}"=="TT" 3 |
| 513 | ... "${workflow}"=="ATT" 0 |
| 514 | FOR ${I} IN RANGE 0 ${num_olts} |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 515 | ${expected_flows}= Run Keyword If "${of_id}"=="${olt_flows_list}[${I}][olt]" |
| 516 | ... Evaluate ${olt_flows_list}[${I}][flows]-${flows_onu}-${additional_flows_deleted} |
| 517 | ... ELSE Set Variable ${olt_flows_list}[${I}][flows] |
TorstenThieme | d649288 | 2021-12-16 08:10:02 +0000 | [diff] [blame] | 518 | Wait Until Keyword Succeeds ${timeout} 2s Validate ONOS Flows per OLT ${list_olts}[${I}][sn] |
| 519 | ... ${expected_flows} |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 520 | END |
TorstenThieme | d649288 | 2021-12-16 08:10:02 +0000 | [diff] [blame] | 521 | ${flow}= Execute ONOS CLI Command use single connection |
| 522 | ... ${ONOS_SSH_IP} ${ONOS_SSH_PORT} flows -s any ${of_id} |
| 523 | Log ${flow} |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 524 | # validate etcd data |
| 525 | ${List_ONU_Serial} Create List |
| 526 | Build ONU SN List ${List_ONU_Serial} |
| 527 | ${onu_sn_no_flows}= Set Variable ${hosts.src[0]['onu']} |
| 528 | FOR ${onu_sn} IN @{List_ONU_Serial} |
| 529 | ${must_exist}= Set Variable If "${onu_sn}"=="${onu_sn_no_flows}" False True |
TorstenThieme | d649288 | 2021-12-16 08:10:02 +0000 | [diff] [blame] | 530 | Wait Until Keyword Succeeds ${timeout} 2s Validate Tech Profiles and Flows in ETCD Data Per Onu |
| 531 | ... ${onu_sn} ${INFRA_NAMESPACE} ${kvstoreprefix} ${must_exist} |
TorstenThieme | f7cd2be | 2021-12-06 14:30:11 +0000 | [diff] [blame] | 532 | END |
| 533 | ${onu_device_id_no_flows}= Get Device ID From SN ${hosts.src[0]['onu']} |
| 534 | FOR ${onu_device_id} IN @{onu_device_id_list} |
| 535 | Log ${onu_device_id} |
| 536 | ${must_exist}= Set Variable If "${onu_device_id}"=="${onu_device_id_no_flows}" False True |
| 537 | Validate OLT Flows Per Onu ${onu_device_id} ${must_exist} |
| 538 | END |