Single FRU VPD collection
This commit implements a Dbus Api to collect VPD of a given FRU
by launching the parser exe asynchronously.
The caller is supposed to update Present property for that FRU
as false on Dbus before calling this Api and need to listen for
Present property change signal to mark the collection of VPD
complete for the FRU.
One of the use case for this api is to collect VPD for FRU
undergoing concurrent maintenance.
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: Idc44d6bc05deb04f3b9097ccf3129f5d2b11eaf0
diff --git a/vpd-manager/manager.hpp b/vpd-manager/manager.hpp
index 13de42e..a0a9ca6 100644
--- a/vpd-manager/manager.hpp
+++ b/vpd-manager/manager.hpp
@@ -117,6 +117,11 @@
*/
void deleteFRUVPD(const sdbusplus::message::object_path& path);
+ /** @brief Api to perform VPD collection for a single fru.
+ * @param[in] path - Dbus object path of that fru.
+ */
+ void collectFRUVPD(const sdbusplus::message::object_path& path);
+
private:
/**
* @brief An api to process some initial requirements.
@@ -158,6 +163,15 @@
void restoreSystemVpd();
/**
+ * @brief An api to trigger vpd collection for a fru by bind/unbind of
+ * driver.
+ * @param[in] singleFru - Json of a single fru inder a given EEPROM path.
+ * @param[in] path - Inventory path.
+ */
+ void triggerVpdCollection(const nlohmann::json& singleFru,
+ const std::string& path);
+
+ /**
* @brief Check for essential fru in the system.
* The api check for the presence of FRUs marked as essential and logs PEL
* in case they are missing.