1#!/usr/bin/env python3 2 3r""" 4Contains PEL related constants. 5""" 6 7PEL_DETAILS = { 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} 15 16ERROR_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) 20 21CMD_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) 26 27CMD_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) 34 35CMD_PROCEDURAL_SYMBOLIC_FRU_CALLOUT = ( 36 ERROR_LOG_CREATE_BASE_CMD + "org.open_power.Logging.Error.TestError1 " 37 " xyz.openbmc_project.Logging.Entry.Level.Error 0" 38) 39 40CMD_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) 45 46CMD_INVENTORY_PREFIX = ( 47 "busctl get-property xyz.openbmc_project.Inventory.Manager " 48 " /xyz/openbmc_project/inventory/system/chassis/motherboard" 49) 50 51CMD_UNRECOVERABLE_ERROR = ( 52 ERROR_LOG_CREATE_BASE_CMD + "org.open_power.Logging.Error.TestError1 " 53 " xyz.openbmc_project.Logging.Entry.Level.Error 0" 54) 55 56CMD_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) 61 62CMD_UNRECOVERABLE_HOST_ERROR = ( 63 ERROR_LOG_CREATE_BASE_CMD + "xyz.openbmc_project.Host.Error.Event " 64 " xyz.openbmc_project.Logging.Entry.Level.Error 1 RAWPEL" 65 " /tmp/FILE_NBMC_UNRECOVERABLE" 66) 67 68CMD_INFORMATIONAL_HOST_ERROR = ( 69 ERROR_LOG_CREATE_BASE_CMD + "xyz.openbmc_project.Host.Error.Event " 70 " xyz.openbmc_project.Logging.Entry.Level.Error 1 RAWPEL" 71 " /tmp/FILE_HOST_INFORMATIONAL" 72) 73