Editor implementation for VPD manager
This commit implements editor class for VPD manager app.
This calss holds responsibility of handling and editing
vpd data related requests on behalf of manager app and
updating the cache with new data if required.
This commit also changes parser class to implement api
needed to validate vpd header file in case of write call.
Steps to build:
meson <build_directory>
ninja -C <directory_path>
-Tested with sample json and sample vpd file
sample command to test
busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager
com.ibm.VPD.Manager WriteKeyword sssay
<"inventory_path"> <"Record_Name"> <"Keyword_Name">
<no. of bytes to update> <array_of_bytes>
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I569f03e329b0f62937c6e143a344d8e4ff02db6f
diff --git a/parser.hpp b/parser.hpp
index 097b14a..1379f90 100644
--- a/parser.hpp
+++ b/parser.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "const.hpp"
#include "store.hpp"
#include <vector>
@@ -17,5 +18,18 @@
*/
Store parse(Binary&& vpd);
+namespace keyword
+{
+namespace editor
+{
+using namespace openpower::vpd::constants;
+/** @brief API to check vpd header
+ * @param [in] vpd - VPDheader in binary format
+ */
+void processHeader(Binary&& vpd);
+
+} // namespace editor
+} // namespace keyword
+
} // namespace vpd
} // namespace openpower