Implementation of priming in wait-vpd-parsers
As part of PST priming system inventory and FRUs VPD collection will be
part of systemd target, instead of being triggered internally by
vpd-manager.
This commit implements priming system blueprint in wait-vpd-parsers
application and removes the priming from vpd-manager initialization
flow.
```
Testing performed:
1. Removed PIM cache path in the system.
2. Restarted PIM service.
systemctl restart xyz.openbmc_project.Inventory.Manager
3. Observed inventory paths are removed under PIM using below command
busctl tree xyz.openbmc_project.Inventory.Manager
3. Restarted wait-vpd-parsers service
systemctl restart wait-vpd-parsers
4. Observed that system is primed again with all inventory object paths, using below command
busctl tree xyz.openbmc_project.Inventory.Manager
```
Change-Id: Ic93f54e909a247587208082830c5ebbe48f69f50
Signed-off-by: Anupama B R <anupama.b.r1@ibm.com>
diff --git a/wait-vpd-parser/include/prime_inventory.hpp b/wait-vpd-parser/include/prime_inventory.hpp
index 8dab2f8..4666ab5 100644
--- a/wait-vpd-parser/include/prime_inventory.hpp
+++ b/wait-vpd-parser/include/prime_inventory.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "logger.hpp"
#include "types.hpp"
#include <nlohmann/json.hpp>
@@ -57,11 +58,13 @@
/**
* @brief API to prime inventory Objects.
*
- * @param[in] i_vpdFilePath - EEPROM file path.
+ * @param[out] o_objectInterfaceMap - Interface and its properties map.
+ * @param[in] i_fruJsonObj - FRU json object.
*
* @return true if the prime inventory is success, false otherwise.
*/
- bool primeInventory(const std::string& i_vpdFilePath) const noexcept;
+ bool primeInventory(vpd::types::ObjectMap& o_objectInterfaceMap,
+ const nlohmann::json& i_fruJsonObj) const noexcept;
/**
* @brief API to populate all required interface for a FRU.
@@ -129,4 +132,6 @@
// Parsed JSON file.
nlohmann::json m_sysCfgJsonObj{};
+
+ std::shared_ptr<vpd::Logger> m_logger;
};