Move preAction postAction to Util

This commit moves  preAction and postFailAction to ibm_read_util,
as we need them as common utility functions, to use it in vpd manager.

Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
Change-Id: Iaade31143b8f114a9adec82a5c4d6ae4e9e2a2d5
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 11db6f7..1432241 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -5,6 +5,7 @@
 #include "types.hpp"
 
 #include <iostream>
+#include <nlohmann/json.hpp>
 
 using namespace std;
 
@@ -261,6 +262,24 @@
 string byteArrayToHexString(const Binary& vec);
 
 /**
+ * @brief Performs any pre-action needed to get the FRU setup for collection.
+ *
+ * @param[in] json - json object
+ * @param[in] file - eeprom file path
+ * @return - success or failure
+ */
+bool executePreAction(const nlohmann::json& json, const string& file);
+
+/**
+ * @brief This API will be called at the end of VPD collection to perform any
+ * post actions.
+ *
+ * @param[in] json - json object
+ * @param[in] file - eeprom file path
+ */
+void executePostFailAction(const nlohmann::json& json, const string& file);
+
+/**
  * @brief Helper function to insert or merge in map.
  *
  * This method checks in the given inventory::InterfaceMap if the given
@@ -279,4 +298,4 @@
                    inventory::PropertyMap&& property);
 
 } // namespace vpd
-} // namespace openpower
\ No newline at end of file
+} // namespace openpower