regulators: Implements support for compare_vpd action
Enhance the configuration file parser to support the compare_vpd
action element.
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: Ia8766a0d2f893898c5ff2655a757d60f7cdcc7df
diff --git a/phosphor-regulators/src/config_file_parser.hpp b/phosphor-regulators/src/config_file_parser.hpp
index 706c609..205f43a 100644
--- a/phosphor-regulators/src/config_file_parser.hpp
+++ b/phosphor-regulators/src/config_file_parser.hpp
@@ -19,6 +19,7 @@
#include "and_action.hpp"
#include "chassis.hpp"
#include "compare_presence_action.hpp"
+#include "compare_vpd_action.hpp"
#include "configuration.hpp"
#include "device.hpp"
#include "i2c_compare_bit_action.hpp"
@@ -237,6 +238,19 @@
parseComparePresence(const nlohmann::json& element);
/**
+ * Parses a JSON element containing a compare_vpd action.
+ *
+ * Returns the corresponding C++ CompareVPDAction object.
+ *
+ * Throws an exception if parsing fails.
+ *
+ * @param element JSON element
+ * @return CompareVPDAction object
+ */
+std::unique_ptr<CompareVPDAction>
+ parseCompareVPD(const nlohmann::json& element);
+
+/**
* Parses a JSON element containing a configuration.
*
* Returns the corresponding C++ Configuration object.