Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 1 | #Copyright 2017-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 *** |
| 16 | Documentation This test raises alarms using bbsimctl and verifies them using voltctl |
| 17 | Suite Setup Setup Suite |
| 18 | Suite Teardown Teardown Suite |
| 19 | Library Collections |
| 20 | Library String |
| 21 | Library OperatingSystem |
| 22 | Library XML |
| 23 | Library RequestsLibrary |
| 24 | Library ../../libraries/DependencyLibrary.py |
| 25 | Resource ../../libraries/onos.robot |
| 26 | Resource ../../libraries/voltctl.robot |
| 27 | Resource ../../libraries/utils.robot |
| 28 | Resource ../../libraries/k8s.robot |
Hardik Windlass | d75b93b | 2021-10-28 06:03:23 +0000 | [diff] [blame] | 29 | Resource ../../libraries/voltha.robot |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 30 | Resource ../../variables/variables.robot |
| 31 | |
| 32 | *** Variables *** |
| 33 | ${timeout} 60s |
| 34 | ${long_timeout} 420s |
| 35 | ${of_id} 0 |
| 36 | ${logical_id} 0 |
| 37 | ${has_dataplane} True |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 38 | ${setup_device} True |
| 39 | ${teardown_device} True |
| 40 | ${VOLTCTL_NAMESPACE} default |
| 41 | ${BBSIMCTL_NAMESPACE} voltha |
| 42 | ${VOLTCTL_POD_NAME} voltctl |
| 43 | ${BBSIMCTL_POD_NAME} bbsim |
| 44 | |
| 45 | *** Test Cases *** |
| 46 | Ensure required pods Running |
| 47 | [Documentation] Ensure the bbsim and voltctl pods are in Running state |
| 48 | [Tags] active |
| 49 | Validate Pod Status ${BBSIMCTL_POD_NAME} ${BBSIMCTL_NAMESPACE} Running |
| 50 | Validate Pod Status ${VOLTCTL_POD_NAME} ${VOLTCTL_NAMESPACE} Running |
| 51 | |
| 52 | ONU Discovery |
| 53 | [Documentation] Discover lists of ONUS, their Serial Numbers and device id, and pick one for subsequent tests |
| 54 | [Tags] active |
| 55 | #build onu sn list |
| 56 | ${List_ONU_Serial} Create List |
| 57 | Set Suite Variable ${List_ONU_Serial} |
| 58 | Build ONU SN List ${List_ONU_Serial} |
| 59 | Log ${List_ONU_Serial} |
| 60 | #validate onu states |
| 61 | Wait Until Keyword Succeeds ${long_timeout} 20s |
| 62 | ... Validate ONU Devices ENABLED ACTIVE REACHABLE ${List_ONU_Serial} |
| 63 | # Pick an ONU to use for subsequent test cases |
| 64 | ${onu_sn} Set Variable ${List_ONU_Serial}[0] |
| 65 | Set Suite Variable ${onu_sn} |
| 66 | ${onu_id} Get Device ID From SN ${onu_sn} |
| 67 | Set Suite Variable ${onu_id} |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 68 | ${parent_id} Get Parent ID From Device ID ${onu_id} |
| 69 | Set Suite Variable ${parent_id} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 70 | |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 71 | Test RaiseDriftOfWindowAlarm |
| 72 | [Documentation] Raise Drift Of Window Alarm and verify event received |
| 73 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 74 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_DRIFT_OF_WINDOW |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 75 | ... ${onu_sn} ONU_DRIFT_OF_WINDOW_RAISE_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 76 | Verify Header ${header} Voltha.openolt.ONU_DRIFT_OF_WINDOW\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 77 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_DRIFT_OF_WINDOW_RAISE_EVENT |
| 78 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 79 | |
| 80 | Test ClearDriftOfWindowAlarm |
| 81 | [Documentation] Clear Drift Of Window Alarm and verify event received |
| 82 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 83 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_DRIFT_OF_WINDOW |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 84 | ... ${onu_sn} ONU_DRIFT_OF_WINDOW_CLEAR_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 85 | Verify Header ${header} Voltha.openolt.ONU_DRIFT_OF_WINDOW\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 86 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_DRIFT_OF_WINDOW_CLEAR_EVENT |
| 87 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 88 | |
| 89 | Test RaiseDyingGaspAlarm |
| 90 | [Documentation] Raise Dying Gasp Alarm and verify event received |
| 91 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 92 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event DYING_GASP |
Mahir Gunyel | 18bcffc | 2023-12-20 13:40:45 -0800 | [diff] [blame^] | 93 | ... ${onu_sn} ONU_DYING_GASP_RAISE_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 94 | Verify Header ${header} Voltha.openolt.ONU_DYING\.(\\d+) ONU |
Mahir Gunyel | 18bcffc | 2023-12-20 13:40:45 -0800 | [diff] [blame^] | 95 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_DYING_GASP_RAISE_EVENT |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 96 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 97 | |
| 98 | Test RaiseLopcMissAlarm |
| 99 | [Documentation] Raise LOPC_MISS Alarm and verify event received |
| 100 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 101 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_ALARM_LOPC_MISS |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 102 | ... ${onu_sn} ONU_LOPC_MISS_RAISE_EVENT |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 103 | Verify Header ${header} Voltha.openolt.ONU_LOPC_MISS\.(\\d+) ONU |
| 104 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOPC_MISS_RAISE_EVENT |
| 105 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 106 | |
| 107 | Test ClearLopcMissAlarm |
| 108 | [Documentation] Clear LOPC_MISS Alarm and verify event received |
| 109 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 110 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_ALARM_LOPC_MISS |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 111 | ... ${onu_sn} ONU_LOPC_MISS_CLEAR_EVENT |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 112 | Verify Header ${header} Voltha.openolt.ONU_LOPC_MISS\.(\\d+) ONU |
| 113 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOPC_MISS_CLEAR_EVENT |
| 114 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 115 | |
| 116 | Test RaiseLopcMicErrorAlarm |
| 117 | [Documentation] Raise LOPC_MISS Alarm and verify event received |
| 118 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 119 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_ALARM_LOPC_MIC_ERROR |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 120 | ... ${onu_sn} ONU_LOPC_MIC_ERROR_RAISE_EVENT |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 121 | Verify Header ${header} Voltha.openolt.ONU_LOPC_MIC_ERROR\.(\\d+) ONU |
| 122 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOPC_MIC_ERROR_RAISE_EVENT |
| 123 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 124 | |
| 125 | Test ClearLopcMicErrorAlarm |
| 126 | [Documentation] Clear LOPC_MISS Alarm and verify event received |
| 127 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 128 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_ALARM_LOPC_MIC_ERROR |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 129 | ... ${onu_sn} ONU_LOPC_MIC_ERROR_CLEAR_EVENT |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 130 | Verify Header ${header} Voltha.openolt.ONU_LOPC_MIC_ERROR\.(\\d+) ONU |
| 131 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOPC_MIC_ERROR_CLEAR_EVENT |
| 132 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 133 | |
| 134 | Test RaiseLossOfBurstAlarm |
| 135 | [Documentation] Raise Loss Of Burst Alarm and verify event received |
| 136 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 137 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_ALARM_LOB |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 138 | ... ${onu_sn} ONU_LOSS_OF_BURST_RAISE_EVENT |
| 139 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_BURST\.(\\d+) ONU |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 140 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_BURST_RAISE_EVENT |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 141 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 142 | |
| 143 | Test ClearLossOfBurstAlarm |
| 144 | [Documentation] Clear Loss Of Burst Alarm and verify event received |
| 145 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 146 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_ALARM_LOB |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 147 | ... ${onu_sn} ONU_LOSS_OF_BURST_CLEAR_EVENT |
| 148 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_BURST\.(\\d+) ONU |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 149 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_BURST_CLEAR_EVENT |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 150 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 151 | |
| 152 | Test RaiseLossOfFrameAlarm |
| 153 | [Documentation] Raise Loss Of Frame Alarm and verify event received |
| 154 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 155 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_ALARM_LOFI |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 156 | ... ${onu_sn} ONU_LOSS_OF_FRAME_RAISE_EVENT |
| 157 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_FRAME\.(\\d+) ONU |
| 158 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_FRAME_RAISE_EVENT |
| 159 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 160 | |
| 161 | Test ClearLossOfFrameAlarm |
| 162 | [Documentation] Clear Loss Of Frame Alarm and verify event received |
| 163 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 164 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_ALARM_LOFI |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 165 | ... ${onu_sn} ONU_LOSS_OF_FRAME_CLEAR_EVENT |
| 166 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_FRAME\.(\\d+) ONU |
| 167 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_FRAME_CLEAR_EVENT |
| 168 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 169 | |
| 170 | Test RaiseLossOfKeySyncFailureAlarm |
| 171 | [Documentation] Raise Loss Of Key Sync Alarm and verify event received |
| 172 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 173 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_LOSS_OF_KEY_SYNC_FAILURE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 174 | ... ${onu_sn} ONU_LOSS_OF_KEY_SYNC_RAISE_EVENT |
| 175 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_KEY_SYNC\.(\\d+) ONU |
| 176 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_KEY_SYNC_RAISE_EVENT |
| 177 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 178 | |
| 179 | Test ClearLossOfKeySyncFailureAlarm |
| 180 | [Documentation] Clear Loss Of Key Sync Alarm and verify event received |
| 181 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 182 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_LOSS_OF_KEY_SYNC_FAILURE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 183 | ... ${onu_sn} ONU_LOSS_OF_KEY_SYNC_CLEAR_EVENT |
| 184 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_KEY_SYNC\.(\\d+) ONU |
| 185 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_KEY_SYNC_CLEAR_EVENT |
| 186 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 187 | |
| 188 | Test RaiseLossOfOmciChannelAlarm |
| 189 | [Documentation] Raise Loss Of Omci Channel Alarm and verify event received |
| 190 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 191 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_LOSS_OF_OMCI_CHANNEL |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 192 | ... ${onu_sn} ONU_LOSS_OF_OMCI_CHANNEL_RAISE_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 193 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_OMCI_CHANNEL\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 194 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_OMCI_CHANNEL_RAISE_EVENT |
| 195 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 196 | |
| 197 | Test ClearLossOfOmciChannelAlarm |
| 198 | [Documentation] Clear Loss Of Omci Channel Alarm and verify event received |
| 199 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 200 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_LOSS_OF_OMCI_CHANNEL |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 201 | ... ${onu_sn} ONU_LOSS_OF_OMCI_CHANNEL_CLEAR_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 202 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_OMCI_CHANNEL\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 203 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_OMCI_CHANNEL_CLEAR_EVENT |
| 204 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 205 | |
| 206 | Test RaiseLossOfPloamAlarm |
| 207 | [Documentation] Raise Loss Of Ploam Alarm and verify event received |
| 208 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 209 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_ALARM_LOAMI |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 210 | ... ${onu_sn} ONU_LOSS_OF_PLOAM_RAISE_EVENT |
| 211 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_PLOAM\.(\\d+) ONU |
| 212 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_PLOAM_RAISE_EVENT |
| 213 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 214 | |
| 215 | Test ClearLossOfPloamAlarm |
| 216 | [Documentation] Clear Loss Of Ploam Alarm and verify event received |
| 217 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 218 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_ALARM_LOAMI |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 219 | ... ${onu_sn} ONU_LOSS_OF_PLOAM_CLEAR_EVENT |
| 220 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_PLOAM\.(\\d+) ONU |
| 221 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_PLOAM_CLEAR_EVENT |
| 222 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 223 | |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 224 | # NOTE: ONU_ALARM_LOS a bit touchy as it seems to be automatically suppressed if |
| 225 | # multiples are sent in a row. It seems like the bbsim state machine is interacting |
| 226 | # with alarms, sometimes causing an ONU_ALARM_LOS to be sent, which then causes |
| 227 | # this test to be a duplicate, which in turn is suppressed and fails. So what we |
| 228 | # do is issue a CLEAR right before the RAISE. |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 229 | Test RaiseLossOfSignalAlarm |
| 230 | [Documentation] Raise Loss Of Signal Alarm and verify event received |
| 231 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 232 | Clear Onu Alarm ONU_ALARM_LOS ${onu_sn} |
| 233 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_ALARM_LOS |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 234 | ... ${onu_sn} ONU_LOSS_OF_SIGNAL_RAISE_EVENT |
| 235 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_SIGNAL\.(\\d+) ONU |
| 236 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_SIGNAL_RAISE_EVENT |
| 237 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 238 | |
| 239 | Test ClearLossOfSignalAlarm |
| 240 | [Documentation] Clear Loss Of Signal Alarm and verify event received |
| 241 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 242 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_ALARM_LOS |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 243 | ... ${onu_sn} ONU_LOSS_OF_SIGNAL_CLEAR_EVENT |
| 244 | Verify Header ${header} Voltha.openolt.ONU_LOSS_OF_SIGNAL\.(\\d+) ONU |
| 245 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_LOSS_OF_SIGNAL_CLEAR_EVENT |
| 246 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 247 | |
| 248 | Test RaisePonLossOfSignalAlarm |
| 249 | [Documentation] Raise Loss Of Signal Alarm and verify event received |
| 250 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 251 | ${header} ${deviceEvent} Raise Olt Alarm And Get Event OLT_PON_LOS |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 252 | ... 0 OLT_LOSS_OF_SIGNAL_RAISE_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 253 | Verify Header ${header} Voltha.openolt.OLT_LOSS_OF_SIGNAL\.(\\d+) PON |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 254 | Should Be Equal ${deviceEvent}[deviceEventName] OLT_LOSS_OF_SIGNAL_RAISE_EVENT |
| 255 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 256 | |
| 257 | Test ClearPonLossOfSignalAlarm |
| 258 | [Documentation] Clear Loss Of Signal Alarm and verify event received |
| 259 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 260 | ${header} ${deviceEvent} Clear Olt Alarm And Get Event OLT_PON_LOS |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 261 | ... 0 OLT_LOSS_OF_SIGNAL_CLEAR_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 262 | Verify Header ${header} Voltha.openolt.OLT_LOSS_OF_SIGNAL\.(\\d+) PON |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 263 | Should Be Equal ${deviceEvent}[deviceEventName] OLT_LOSS_OF_SIGNAL_CLEAR_EVENT |
| 264 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 265 | |
| 266 | Test RaiseProcessingErrorAlarm |
| 267 | # Not Implemented |
| 268 | [Documentation] Raise Processing Error Alarm and verify event received |
| 269 | [Tags] not-active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 270 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_PROCESSING_ERROR |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 271 | ... ${onu_sn} ONU_PROCESSING_ERROR_RAISE_EVENT |
| 272 | Verify Header ${header} Voltha.openolt.ONU_PROCESSING_ERROR\.(\\d+) ONU |
| 273 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_PROCESSING_ERROR_RAISE_EVENT |
| 274 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 275 | |
| 276 | Test ClearProcessingErrorAlarm |
| 277 | # Not Implemented |
| 278 | [Documentation] Clear Processing Error Alarm and verify event received |
| 279 | [Tags] not-active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 280 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_PROCESSING_ERROR |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 281 | ... ${onu_sn} ONU_PROCESSING_ERROR_CLEAR_EVENT |
| 282 | Verify Header ${header} Voltha.openolt.ONU_PROCESSING_ERROR\.(\\d+) ONU |
| 283 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_PROCESSING_ERROR_CLEAR_EVENT |
| 284 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 285 | |
| 286 | Test RaiseSignalDegradeAlarm |
| 287 | [Documentation] Raise Signal Degrade Alarm and verify event received |
| 288 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 289 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_SIGNAL_DEGRADE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 290 | ... ${onu_sn} ONU_SIGNAL_DEGRADE_RAISE_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 291 | Verify Header ${header} Voltha.openolt.ONU_SIGNAL_DEGRADE\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 292 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_SIGNAL_DEGRADE_RAISE_EVENT |
| 293 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 294 | |
| 295 | Test ClearSignalDegradeAlarm |
| 296 | [Documentation] Clear Signal Degrade Alarm and verify event received |
| 297 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 298 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_SIGNAL_DEGRADE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 299 | ... ${onu_sn} ONU_SIGNAL_DEGRADE_CLEAR_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 300 | Verify Header ${header} Voltha.openolt.ONU_SIGNAL_DEGRADE\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 301 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_SIGNAL_DEGRADE_CLEAR_EVENT |
| 302 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 303 | |
| 304 | Test RaiseSignalsFailureAlarm |
| 305 | [Documentation] Raise Signals Fail Alarm and verify event received |
| 306 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 307 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_SIGNALS_FAILURE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 308 | ... ${onu_sn} ONU_SIGNALS_FAIL_RAISE_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 309 | Verify Header ${header} Voltha.openolt.ONU_SIGNALS_FAIL\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 310 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_SIGNALS_FAIL_RAISE_EVENT |
| 311 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 312 | |
| 313 | Test ClearSignalsFailureAlarm |
| 314 | [Documentation] Clear Signals Fail Alarm and verify event received |
| 315 | [Tags] active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 316 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_SIGNALS_FAILURE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 317 | ... ${onu_sn} ONU_SIGNALS_FAIL_CLEAR_EVENT |
Andrea Campanella | ff8abb2 | 2021-02-22 16:00:40 +0100 | [diff] [blame] | 318 | Verify Header ${header} Voltha.openolt.ONU_SIGNALS_FAIL\.(\\d+) ONU |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 319 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_SIGNALS_FAIL_CLEAR_EVENT |
| 320 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 321 | |
| 322 | Test RaiseStartupFailureAlarm |
| 323 | # Not Implemented |
| 324 | [Documentation] Raise Startup Failure Alarm and verify event received |
| 325 | [Tags] not-active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 326 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_STARTUP_FAILURE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 327 | ... ${onu_sn} ONU_STARTUP_FAILURE_RAISE_EVENT |
| 328 | Verify Header ${header} Voltha.openolt.ONU_STARTUP_FAILURE\.(\\d+) ONU |
| 329 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_STARTUP_FAILURE_RAISE_EVENT |
| 330 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 331 | |
| 332 | Test ClearStartupFailureAlarm |
| 333 | # Not Implemented |
| 334 | [Documentation] Clear Startup Failure Alarm and verify event received |
| 335 | [Tags] not-active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 336 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_STARTUP_FAILURE |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 337 | ... ${onu_sn} ONU_STARTUP_FAILURE_CLEAR_EVENT |
| 338 | Verify Header ${header} Voltha.openolt.ONU_STARTUP_FAILURE\.(\\d+) ONU |
| 339 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_STARTUP_FAILURE_CLEAR_EVENT |
| 340 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 341 | |
| 342 | Test RaiseTransmissionInterferenceAlarm |
| 343 | # Not Implemented |
| 344 | [Documentation] Raise Transmission Interference Alarm and verify event received |
| 345 | [Tags] not-active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 346 | ${header} ${deviceEvent} Raise Onu Alarm And Get Event ONU_TRANSMISSION_INTERFERENCE_WARNING |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 347 | ... ${onu_sn} ONU_TRANSMISSION_INTERFERENCE_RAISE_EVENT |
| 348 | Verify Header ${header} Voltha.openolt.ONU_TRANSMISSION_INTERFERENCE\.(\\d+) ONU |
| 349 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_TRANSMISSION_INTERFERENCE_RAISE_EVENT |
| 350 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 351 | |
| 352 | Test ClearTransmissionInterferenceAlarm |
| 353 | # Not Implemented |
| 354 | [Documentation] Clear Transmission Interference Alarm and verify event received |
| 355 | [Tags] not-active |
Scott Baker | e784000 | 2020-03-23 16:50:27 -0700 | [diff] [blame] | 356 | ${header} ${deviceEvent} Clear Onu Alarm And Get Event ONU_TRANSMISSION_INTERFERENCE_WARNING |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 357 | ... ${onu_sn} ONU_TRANSMISSION_INTERFERENCE_CLEAR_EVENT |
| 358 | Verify Header ${header} Voltha.openolt.ONU_TRANSMISSION_INTERFERENCE\.(\\d+) ONU |
| 359 | Should Be Equal ${deviceEvent}[deviceEventName] ONU_TRANSMISSION_INTERFERENCE_CLEAR_EVENT |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 360 | Should Be Equal ${deviceEvent}[resourceId] ${parent_id} |
| 361 | |
| 362 | *** Keywords *** |
| 363 | Setup Suite |
| 364 | [Documentation] Set up the test suite |
| 365 | Common Test Suite Setup |
| 366 | # Ensure the voltctl pod is deployed and running |
| 367 | Apply Kubernetes Resources ./voltctl.yaml ${VOLTCTL_NAMESPACE} |
| 368 | Wait Until Keyword Succeeds ${timeout} 5s |
| 369 | ... Validate Pod Status ${VOLTCTL_POD_NAME} ${VOLTCTL_NAMESPACE} Running |
| 370 | # Call Setup keyword in utils library to create and enable device |
| 371 | Run Keyword If ${setup_device} Setup |
| 372 | |
| 373 | Teardown Suite |
| 374 | [Documentation] Clean up devices if desired |
| 375 | ... kills processes and cleans up interfaces on src+dst servers |
TorstenThieme | 30f08aa | 2022-06-21 11:46:19 +0000 | [diff] [blame] | 376 | Delete Kubernetes Resources ./voltctl.yaml ${VOLTCTL_NAMESPACE} |
| 377 | Wait Until Keyword Succeeds ${timeout} 5s Pod Does Not Exist ${VOLTCTL_NAMESPACE} ${VOLTCTL_POD_NAME} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 378 | Get ONOS Status ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 379 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | f8462be | 2020-11-05 13:38:42 -0800 | [diff] [blame] | 380 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 381 | Run Keyword If ${teardown_device} Test Empty Device List |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 382 | Run Keyword If ${teardown_device} Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 383 | ... device-remove ${of_id} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 384 | Close All ONOS SSH Connections |
Hardik Windlass | 8137522 | 2021-12-02 10:48:01 +0000 | [diff] [blame] | 385 | Run Keyword If ${has_dataplane} Clean Up All Nodes |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 386 | |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 387 | # Onu Alarms |
| 388 | |
| 389 | Raise Onu Alarm And Get Event |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 390 | [Documentation] Raise an Alarm and return event |
| 391 | [Arguments] ${name} ${sn} ${deviceEventName} |
| 392 | ${since} Get Current Time |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 393 | Raise Onu Alarm ${name} ${sn} |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 394 | ${header} ${deviceEvent} Get Device Event ${deviceEventName} ${since} |
Scott Baker | ee67555 | 2020-02-11 10:43:34 -0800 | [diff] [blame] | 395 | ${LastEventPostTimestamp} Set Variable ${since} |
| 396 | Set Suite Variable ${LastEventPostTimestamp} |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 397 | [return] ${header} ${deviceEvent} |
| 398 | |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 399 | Clear Onu Alarm And Get Event |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 400 | [Documentation] Clear an Alarm and return event |
| 401 | [Arguments] ${name} ${sn} ${deviceEventName} |
| 402 | ${since} Get Current Time |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 403 | Clear Onu Alarm ${name} ${sn} |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 404 | ${header} ${deviceEvent} Get Device Event ${deviceEventName} ${since} |
Scott Baker | ee67555 | 2020-02-11 10:43:34 -0800 | [diff] [blame] | 405 | ${LastEventPostTimestamp} Set Variable ${since} |
| 406 | Set Suite Variable ${LastEventPostTimestamp} |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 407 | [return] ${header} ${deviceEvent} |
| 408 | |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 409 | Raise Onu Alarm |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 410 | [Documentation] Raise an Alarm |
| 411 | [Arguments] ${name} ${sn} |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 412 | ${raiseOutput} Exec Pod ${BBSIMCTL_NAMESPACE} ${BBSIMCTL_POD_NAME} |
| 413 | ... bbsimctl onu alarms raise ${name} ${sn} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 414 | Should Contain ${raiseOutput} Alarm Indication Sent |
| 415 | |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 416 | Clear Onu Alarm |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 417 | [Documentation] Raise an Alarm |
| 418 | [Arguments] ${name} ${sn} |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 419 | ${raiseOutput} Exec Pod ${BBSIMCTL_NAMESPACE} ${BBSIMCTL_POD_NAME} |
| 420 | ... bbsimctl onu alarms clear ${name} ${sn} |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 421 | Should Contain ${raiseOutput} Alarm Indication Sent |
| 422 | |
| 423 | # Olt Alarms |
| 424 | |
| 425 | Raise Olt Alarm And Get Event |
| 426 | [Documentation] Raise an Alarm and return event |
| 427 | [Arguments] ${name} ${intf_id} ${deviceEventName} |
| 428 | ${since} Get Current Time |
| 429 | Raise Olt Alarm ${name} ${intf_id} |
| 430 | ${header} ${deviceEvent} Get Device Event ${deviceEventName} ${since} |
| 431 | ${LastEventPostTimestamp} Set Variable ${since} |
| 432 | Set Suite Variable ${LastEventPostTimestamp} |
| 433 | [return] ${header} ${deviceEvent} |
| 434 | |
| 435 | Clear Olt Alarm And Get Event |
| 436 | [Documentation] Clear an Alarm and return event |
| 437 | [Arguments] ${name} ${intf_id} ${deviceEventName} |
| 438 | ${since} Get Current Time |
| 439 | Clear Olt Alarm ${name} ${intf_id} |
| 440 | ${header} ${deviceEvent} Get Device Event ${deviceEventName} ${since} |
| 441 | ${LastEventPostTimestamp} Set Variable ${since} |
| 442 | Set Suite Variable ${LastEventPostTimestamp} |
| 443 | [return] ${header} ${deviceEvent} |
| 444 | |
| 445 | Raise Olt Alarm |
| 446 | [Documentation] Raise an Alarm |
| 447 | [Arguments] ${name} ${intf_id} |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 448 | ${raiseOutput} Exec Pod ${BBSIMCTL_NAMESPACE} ${BBSIMCTL_POD_NAME} |
| 449 | ... bbsimctl olt alarms raise ${name} ${intf_id} |
Scott Baker | ee03dd0 | 2020-03-12 11:48:06 -0700 | [diff] [blame] | 450 | Should Contain ${raiseOutput} Alarm Indication Sent |
| 451 | |
| 452 | Clear Olt Alarm |
| 453 | [Documentation] Raise an Alarm |
| 454 | [Arguments] ${name} ${intf_id} |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 455 | ${raiseOutput} Exec Pod ${BBSIMCTL_NAMESPACE} ${BBSIMCTL_POD_NAME} |
| 456 | ... bbsimctl olt alarms clear ${name} ${intf_id} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 457 | Should Contain ${raiseOutput} Alarm Indication Sent |
| 458 | |
| 459 | Get Device Event |
| 460 | [Documentation] Get the most recent alarm event from voltha.events |
| 461 | [Arguments] ${deviceEventName} ${since} |
| 462 | ${output} ${raiseErr} Exec Pod Separate Stderr ${VOLTCTL_NAMESPACE} ${VOLTCTL_POD_NAME} |
Girish Gowdra | 698a04b | 2020-11-23 10:24:43 -0800 | [diff] [blame] | 463 | ... voltctl event listen --show-body -t 1 -o json -f Titles=${deviceEventName} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 464 | ${json} To Json ${output} |
| 465 | ${count} Get Length ${json} |
| 466 | # If there is more than one event (which could happen if we quickly do a raise and a clear), |
| 467 | # then return the most recent one. |
| 468 | Should Be Larger Than ${count} 0 |
| 469 | ${lastIndex} Evaluate ${count}-1 |
| 470 | ${lastItem} Set Variable ${json}[${lastIndex}] |
| 471 | ${header} Set Variable ${lastItem}[header] |
| 472 | ${deviceEvent} Set Variable ${lastItem}[deviceEvent] |
| 473 | Log ${header} |
| 474 | Log ${deviceEvent} |
| 475 | [return] ${header} ${deviceEvent} |
| 476 | |
| 477 | Verify Header |
| 478 | [Documentation] Verify that a DeviceEvent's header is sane and the id matches regex |
Scott Baker | 27d04db | 2020-02-06 18:03:21 -0800 | [diff] [blame] | 479 | [Arguments] ${header} ${id} ${subCategory} |
| 480 | ${headerSubCategory} Evaluate $header.get("subCategory", "") |
| 481 | Should Be Equal ${headerSubCategory} ${subCategory} |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 482 | Should Be Equal ${header}[type] DEVICE_EVENT |
| 483 | Should Match Regexp ${header}[id] ${id} |
Scott Baker | ee67555 | 2020-02-11 10:43:34 -0800 | [diff] [blame] | 484 | # TODO Timestamps are now RFC3339 date strings. Add Verification |
| 485 | ${reportedTs} Set Variable ${header}[reportedTs] |
| 486 | ${raisedTs} Set Variable ${header}[raisedTs] |
| 487 | Should Be Newer Than Or Equal To ${reportedTs} ${LastEventPostTimestamp} |
| 488 | Should Be Newer Than Or Equal To ${raisedTs} ${LastEventPostTimestamp} |