Add default event ID and error description
Add the ID and description to use when an entry isn't
found in the policy table.
The final values for these are still being considered
by the IBM service team.
Change-Id: I2ce3f16ed168994599fb48aaba999a1d92856193
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/policy_table.hpp b/policy_table.hpp
index a44bf0b..07226e6 100644
--- a/policy_table.hpp
+++ b/policy_table.hpp
@@ -83,7 +83,38 @@
const std::string& error,
const std::string& modifier) const;
+ /**
+ * The default event ID to use when a match in the table
+ * wasn't found.
+ *
+ * @return std::string
+ */
+ inline std::string defaultEID() const
+ {
+ return defaultPolicyEID;
+ }
+
+ /**
+ * The default error message to use when a match in the table
+ * wasn't found.
+ *
+ * @return std::string
+ */
+ inline std::string defaultMsg() const
+ {
+ return defaultPolicyMessage;
+ }
+
private:
+ /**
+ * The default event ID
+ */
+ const std::string defaultPolicyEID{DEFAULT_POLICY_EID};
+
+ /**
+ * The default event message
+ */
+ const std::string defaultPolicyMessage{DEFAULT_POLICY_MSG};
/**
* Loads the JSON data into the PolicyMap map