George Keishing | e7e9171 | 2021-09-03 11:28:44 -0500 | [diff] [blame] | 1 | #!/usr/bin/env python3 |
Rahul Maheshwari | a17a339 | 2020-03-02 04:51:52 -0600 | [diff] [blame] | 2 | |
| 3 | r""" |
| 4 | Contains PEL related constants. |
| 5 | """ |
| 6 | |
| 7 | PEL_DETAILS = { |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 8 | "CreatorID": "BMC", |
| 9 | "CompID": "0x1000", |
| 10 | "Subsystem": "Platform Firmware", |
| 11 | "Message": "This is a test error", |
| 12 | "SRC": "BD8D1002", |
| 13 | "Sev": "Unrecoverable Error", |
| 14 | } |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 15 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 16 | ERROR_LOG_CREATE_BASE_CMD = ( |
| 17 | "busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging " |
| 18 | " xyz.openbmc_project.Logging.Create Create ssa{ss} " |
| 19 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 20 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 21 | CMD_INTERNAL_FAILURE = ( |
| 22 | ERROR_LOG_CREATE_BASE_CMD |
| 23 | + "xyz.openbmc_project.Common.Error.InternalFailure " |
| 24 | " xyz.openbmc_project.Logging.Entry.Level.Error 0" |
| 25 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 26 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 27 | CMD_FRU_CALLOUT = ( |
| 28 | ERROR_LOG_CREATE_BASE_CMD |
| 29 | + "xyz.openbmc_project.Sensor.Device.Error.ReadFailure " |
| 30 | ' xyz.openbmc_project.Logging.Entry.Level.Error 2 "TIMEOUT_IN_MSEC" "5"' |
| 31 | ' "CALLOUT_INVENTORY_PATH" ' |
| 32 | ' "/xyz/openbmc_project/inventory/system/chassis/motherboard"' |
| 33 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 34 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 35 | CMD_PROCEDURAL_SYMBOLIC_FRU_CALLOUT = ( |
George Keishing | 7899a45 | 2023-02-15 02:46:54 -0600 | [diff] [blame] | 36 | ERROR_LOG_CREATE_BASE_CMD + "org.open_power.Logging.Error.TestError1 " |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 37 | " xyz.openbmc_project.Logging.Entry.Level.Error 0" |
| 38 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 39 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 40 | CMD_INFORMATIONAL_ERROR = ( |
| 41 | ERROR_LOG_CREATE_BASE_CMD |
| 42 | + "xyz.openbmc_project.Common.Error.TestError2 " |
| 43 | " xyz.openbmc_project.Logging.Entry.Level.Informational 0" |
| 44 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 45 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 46 | CMD_INVENTORY_PREFIX = ( |
| 47 | "busctl get-property xyz.openbmc_project.Inventory.Manager " |
| 48 | " /xyz/openbmc_project/inventory/system/chassis/motherboard" |
| 49 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 50 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 51 | CMD_UNRECOVERABLE_ERROR = ( |
George Keishing | 7899a45 | 2023-02-15 02:46:54 -0600 | [diff] [blame] | 52 | ERROR_LOG_CREATE_BASE_CMD + "org.open_power.Logging.Error.TestError1 " |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 53 | " xyz.openbmc_project.Logging.Entry.Level.Error 0" |
| 54 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 55 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 56 | CMD_PREDICTIVE_ERROR = ( |
| 57 | ERROR_LOG_CREATE_BASE_CMD |
| 58 | + "xyz.openbmc_project.Sensor.Threshold.Error.TemperatureWarningLow " |
| 59 | " xyz.openbmc_project.Logging.Entry.Level.Warning 0" |
| 60 | ) |
Rahul Maheshwari | b8580dd | 2021-05-10 00:57:33 -0500 | [diff] [blame] | 61 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 62 | CMD_UNRECOVERABLE_HOST_ERROR = ( |
George Keishing | 7899a45 | 2023-02-15 02:46:54 -0600 | [diff] [blame] | 63 | ERROR_LOG_CREATE_BASE_CMD + "xyz.openbmc_project.Host.Error.Event " |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 64 | " xyz.openbmc_project.Logging.Entry.Level.Error 1 RAWPEL" |
| 65 | " /tmp/FILE_NBMC_UNRECOVERABLE" |
| 66 | ) |
manashsarma | 4baa6a7 | 2020-12-16 07:13:37 -0600 | [diff] [blame] | 67 | |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 68 | CMD_INFORMATIONAL_HOST_ERROR = ( |
George Keishing | 7899a45 | 2023-02-15 02:46:54 -0600 | [diff] [blame] | 69 | ERROR_LOG_CREATE_BASE_CMD + "xyz.openbmc_project.Host.Error.Event " |
Patrick Williams | 20f3871 | 2022-12-08 06:18:26 -0600 | [diff] [blame] | 70 | " xyz.openbmc_project.Logging.Entry.Level.Error 1 RAWPEL" |
| 71 | " /tmp/FILE_HOST_INFORMATIONAL" |
| 72 | ) |