eSEL: Add severity and callout to the error metadata
The sensor number in the eSEL data is mapped to the inventory
object path and the callout association is added to the error
metadata. The mappings are generated from the MRW. The severity
of the eSEL is inferred from the eSEL data and the corresponding
error level is updated in the metadata. This implementation is
moved from phosphor-ipmi-host to this repository, since this is
OpenPower specific.
Change-Id: I0bf0fe3776b593c6d38a958a23a140aeae71e754
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/Makefile.am b/Makefile.am
index 3d369a0..ede9703 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,10 +4,14 @@
liboemhandler_la_SOURCES = oemhandler.cpp \
host-interface.cpp \
local_users.cpp \
- org/open_power/OCC/Metrics/error.cpp
+ org/open_power/OCC/Metrics/error.cpp \
+ inventory-sensor.cpp
BUILT_SOURCES = org/open_power/OCC/Metrics/error.hpp \
- org/open_power/OCC/Metrics/error.cpp
+ org/open_power/OCC/Metrics/error.cpp \
+ inventory-sensor.cpp
+
+CLEANFILES = $(BUILT_SOURCES)
liboemhandler_la_LDFLAGS = $(SYSTEMD_LIBS)\
$(SDBUSPLUS_LIBS) \
@@ -28,3 +32,6 @@
org/open_power/OCC/Metrics/error.cpp: ${top_srcdir}/org/open_power/OCC/Metrics.errors.yaml
@mkdir -p `dirname $@`
$(SDBUSPLUSPLUS) -r $(top_srcdir) error exception-cpp org.open_power.OCC.Metrics > $@
+
+inventory-sensor.cpp:
+ $(AM_V_GEN)@INVSENSORGEN@ -o $(top_builddir) generate-cpp