Add policy::Table class
This class holds the error log policy data defined by
IBM's service people. The raw data is stored in a JSON
file on the BMC, and loaded into the class on construction.
The policy data is a map of error messages (i.e. the
xyz.openbmc_project.Foo.Error.Bar strings) to a list of
policy details structures.
Each details structure has:
* a search modifier - used to find the specific details
entry for a specific error log message.
* a message - a customer facing description of the error
* an event ID - an ID defined by IBM that can be used to
locate information about the error online.
An example of an entry of the JSON data it consumes is:
{
"dtls":[
{
"CEID":"ID 1",
"mod":"mod 1",
"msg":"Error 1"
},
{
"CEID":"ID 2",
"mod":"mod 2",
"msg":"Error 2 "
}
],
"err":"xyz.openbmc_project.Error.Test1"
}
A future commit will add the ability to find an entry.
Change-Id: I9869c15799914acf9cbc9d91ff714edb6e2512ef
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/configure.ac b/configure.ac
index 6b38795..9bbe9fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,9 @@
PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
AC_MSG_ERROR(["Requires openbmc/phosphor-logging package."]))
+AC_CHECK_HEADER(nlohmann/json.hpp, ,
+ [AC_MSG_ERROR([Could not find nlohmann/json.hpp... nlohmann/json package required])])
+
# Checks for typedefs, structures, and compiler characteristics.
AX_CXX_COMPILE_STDCXX_14([noext])
AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])