Steven Sombar | a3f0439 | 2018-10-01 15:38:21 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Utilities for eSEL testing. |
| 3 | |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/utils.robot |
| 6 | Variables ../data/variables.py |
| 7 | |
| 8 | |
| 9 | *** Variables *** |
| 10 | |
| 11 | ${RAW_PREFIX} raw 0x3a 0xf0 0x |
| 12 | |
| 13 | ${RESERVE_ID} raw 0x0a 0x42 |
| 14 | |
| 15 | ${RAW_SUFFIX} 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 |
Steven Sombar | 31b6bd0 | 2019-03-06 10:58:07 -0600 | [diff] [blame] | 16 | ... 0xdf 0x00 0x00 0x00 0x00 0x20 0x00 0x04 0x12 0x65 0x6f 0xaa 0x00 0x00 |
Steven Sombar | a3f0439 | 2018-10-01 15:38:21 -0500 | [diff] [blame] | 17 | |
| 18 | ${RAW_SEL_COMMIT} raw 0x0a 0x44 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x20 |
| 19 | ... 0x00 0x04 0x12 0xA6 0x6f 0x02 0x00 0x01 |
| 20 | |
| 21 | |
| 22 | *** Keywords *** |
| 23 | |
| 24 | Create eSEL |
| 25 | [Documentation] Create an eSEL. |
| 26 | Open Connection And Log In |
| 27 | ${Resv_id}= Run Inband IPMI Standard Command ${RESERVE_ID} |
| 28 | ${cmd}= Catenate |
| 29 | ... ${RAW_PREFIX}${Resv_id.strip().rsplit(' ', 1)[0]} ${RAW_SUFFIX} |
| 30 | Run Inband IPMI Standard Command ${cmd} |
| 31 | Run Inband IPMI Standard Command ${RAW_SEL_COMMIT} |
| 32 | |
| 33 | |
| 34 | Count eSEL Entries |
| 35 | [Documentation] Count eSEL entries logged. |
| 36 | ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY} |
| 37 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 38 | ${jsondata}= To JSON ${resp.content} |
| 39 | ${count}= Get Length ${jsondata["data"]} |
| 40 | [Return] ${count} |
| 41 | |
| 42 | |
| 43 | Verify eSEL Entries |
| 44 | [Documentation] Verify eSEL entries logged. |
| 45 | ${elog_entry}= Get URL List ${BMC_LOGGING_ENTRY} |
| 46 | ${resp}= OpenBMC Get Request ${elog_entry[0]} |
| 47 | # "data": { |
| 48 | # "AdditionalData": [ |
| 49 | # "ESEL=00 00 df 00 00 00 00 20 00 04 12 35 6f aa 00 00 " |
| 50 | # ], |
| 51 | # "Id": 1, |
| 52 | # "Message": "org.open_power.Host.Error.Event", |
| 53 | # "Severity": "xyz.openbmc_project.Logging.Entry.Level.Error", |
| 54 | # "Timestamp": 1485904869061 |
| 55 | # } |
George Keishing | 34c8f17 | 2019-01-09 11:27:09 -0600 | [diff] [blame] | 56 | ${entry_id}= Read Attribute ${elog_entry[0]} Message |
Steven Sombar | a3f0439 | 2018-10-01 15:38:21 -0500 | [diff] [blame] | 57 | Should Be Equal ${entry_id} |
| 58 | ... org.open_power.Host.Error.Event |
| 59 | |
| 60 | ${entry_id}= Read Attribute ${elog_entry[0]} Severity |
| 61 | # Could be either xyz.openbmc_project.Logging.Entry.Level.Error |
| 62 | # or xyz.openbmc_project.Logging.Entry.Level.Warning. |
| 63 | Should Contain ${entry_id} xyz.openbmc_project.Logging.Entry.Level |