Change AC Lost to PSU Power Lost
Change AC Lost to PSU Power Lost according to Redfish.
Tested:
Remove AC cable from one PSU, Redfish log will show
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/
1568510552",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-09-15T01:22:32+00:00",
"EntryType": "Event",
"Id": "1568510552",
"Message": "Power supply PSU1 power lost.",
"MessageArgs": [
"PSU1"
],
"MessageId": "OpenBMC.0.1.PowerSupplyPowerLost",
"Name": "System Event Log Entry",
"Severity": "Critical"
},
Plug in AC cable again, Redfish log will show
{
"@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry",
"@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/
1568510553",
"@odata.type": "#LogEntry.v1_4_0.LogEntry",
"Created": "2019-09-15T01:22:33+00:00",
"EntryType": "Event",
"Id": "1568510553",
"Message": "Power supply PSU1 power restored.",
"MessageArgs": [
"PSU1"
],
"MessageId": "OpenBMC.0.1.PowerSupplyPowerRestored",
"Name": "System Event Log Entry",
"Severity": "OK"
},
Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: I481b5c7683220ece278a4973570b33dc93106f8c
diff --git a/src/PSUEvent.cpp b/src/PSUEvent.cpp
index b7cd3ae..6d2a3e6 100644
--- a/src/PSUEvent.cpp
+++ b/src/PSUEvent.cpp
@@ -75,8 +75,8 @@
{"Failure",
{"OpenBMC.0.1.PowerSupplyFailed", "OpenBMC.0.1.PowerSupplyRecovered"}},
{"ACLost",
- {"OpenBMC.0.1.PowerSupplyACLost",
- "OpenBMC.0.1.PowerSupplyACInserted"}},
+ {"OpenBMC.0.1.PowerSupplyPowerLost",
+ "OpenBMC.0.1.PowerSupplyPowerRestored"}},
{"FanFault",
{"OpenBMC.0.1.PowerSupplyFanFailed",
"OpenBMC.0.1.PowerSupplyFanRecovered"}},