Add a default message for IPMI SEL entries added by command

This change adds a default message to the Redfish hooks so that
all Add SEL Entry or Platform Event commands will go to Redfish
instead of to the SEL.

SEL entries that can be parsed will show their specific message,
all other entries will show the default message which includes
the raw IPMI data sent in the command. This will allow using only
Redfish for external events without losing any data from
unexpected entries.

Since this change elminates the need for logging to the IPMI SEL,
this change also simplifies the overrides of the commands and
converts the Add SEL Entry command to the new IPMI API in the
process.

Tested:
Ran the following IPMI commands and verified that they each added
a new Redfish default log entry:
ipmitool raw 0xa 0x44 0x00 0x00 0xc0 0 0 0 0 1 2 3 4 5 6 7 8 9
ipmitool raw 0x4 0x2 0x81 0x4 0x1 0x6 0x1 0xa4

Change-Id: Ic60b89b1541e5ec789406c1c1e005b723db8d106
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/src/sensorcommands.cpp b/src/sensorcommands.cpp
index ba64fe4..ab654f7 100644
--- a/src/sensorcommands.cpp
+++ b/src/sensorcommands.cpp
@@ -312,38 +312,11 @@
         return ipmi::responseReqDataLenInvalid();
     }
 
-    // Send this request to the Redfish hooks to see if it should be a
-    // Redfish message instead.  If so, no need to add it to the SEL, so
-    // just return success.
-    if (intel_oem::ipmi::sel::checkRedfishHooks(
-            generatorID, evmRev, sensorType, sensorNum, eventType, eventData1,
-            eventData2.value_or(0xFF), eventData3.value_or(0xFF)))
-    {
-        return ipmi::responseSuccess();
-    }
-
-    bool assert = eventType & directionMask ? false : true;
-    std::vector<uint8_t> eventData;
-    eventData.push_back(eventData1);
-    eventData.push_back(eventData2.value_or(0xFF));
-    eventData.push_back(eventData3.value_or(0xFF));
-
-    std::string sensorPath = getPathFromSensorNumber(sensorNum);
-    std::string service =
-        ipmi::getService(dbus, ipmiSELAddInterface, ipmiSELPath);
-    sdbusplus::message::message writeSEL = dbus.new_method_call(
-        service.c_str(), ipmiSELPath, ipmiSELAddInterface, "IpmiSelAdd");
-    writeSEL.append(ipmiSELAddMessage, sensorPath, eventData, assert,
-                    static_cast<uint16_t>(generatorID));
-    try
-    {
-        dbus.call(writeSEL);
-    }
-    catch (sdbusplus::exception_t &e)
-    {
-        phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
-        return ipmi::responseUnspecifiedError();
-    }
+    // Send this request to the Redfish hooks to log it as a Redfish message
+    // instead.  There is no need to add it to the SEL, so just return success.
+    intel_oem::ipmi::sel::checkRedfishHooks(
+        generatorID, evmRev, sensorType, sensorNum, eventType, eventData1,
+        eventData2.value_or(0xFF), eventData3.value_or(0xFF));
 
     return ipmi::responseSuccess();
 }