Add Configuration Error Event
Add configuration error event to PSU Event. And correct AC Lost event.
Tested:
Insert two different kind of PSU, redfish log show
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/
1563892413_1",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-07-23T14:33:33+00:00",
"EntryType": "Event",
"Id": "1563892413_1",
"Message": "Power supply PSU2 configuration error.",
"MessageArgs": [
"PSU2"
],
"MessageId": "OpenBMC.0.1.PowerSupplyConfigurationError",
"Name": "System Event Log Entry",
"Severity": "Critical"
},
Remove AC cable from one PSU, redfish log show
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1563892413",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-07-23T14:33:33+00:00",
"EntryType": "Event",
"Id": "1563892413",
"Message": "Power supply PSU2 AC power lost.",
"MessageArgs": [
"PSU2"
],
"MessageId": "OpenBMC.0.1.PowerSupplyACLost",
"Name": "System Event Log Entry",
"Severity": "Critical"
},
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: I9bb93afd3e4bf172fea1abff9870c20d72233467
diff --git a/src/PSUEvent.cpp b/src/PSUEvent.cpp
index fd929b3..7c6fbea 100644
--- a/src/PSUEvent.cpp
+++ b/src/PSUEvent.cpp
@@ -70,7 +70,8 @@
{"PredictiveFailure", "OpenBMC.0.1.PowerSupplyFailurePredicted"},
{"Failure", "OpenBMC.0.1.PowerSupplyFailed"},
{"ACLost", "OpenBMC.0.1.PowerSupplyACLost"},
- {"FanFault", "OpenBMC.0.1.PowerSupplyFanFailed"}};
+ {"FanFault", "OpenBMC.0.1.PowerSupplyFanFailed"},
+ {"ConfigureError", "OpenBMC.0.1.PowerSupplyConfigurationError"}};
PSUSubEvent::PSUSubEvent(
std::shared_ptr<sdbusplus::asio::dbus_interface> eventInterface,