Get Inventory list using unexpanded location code
This commit implements an api to get inventory list with respect to
a given location code in un-expanded format.
Along with location code node also needs to be passed.
In case no inventory is found at the given location or location code
is not correct, corresponding error is returned to the caller.
Tested on simics.
This api is under com.ibm.vpd.Manager interface. So vpd-manager app
needs to be running for this api to work.
Sample command for simics:
busctl call com.ibm.VPD.Manager /com/ibm/VPD/Manager com.ibm.VPD.Manager
GetFRUsByUnexpandedLocationCode sq <location_code> <node_number>
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
Change-Id: I87159d2a3c293e82c9e82d21a9d281bd176a30e7
diff --git a/vpd-manager/manager.hpp b/vpd-manager/manager.hpp
index 455cd11..6846c6e 100644
--- a/vpd-manager/manager.hpp
+++ b/vpd-manager/manager.hpp
@@ -6,7 +6,6 @@
#include <com/ibm/VPD/Manager/server.hpp>
#include <map>
#include <nlohmann/json.hpp>
-#include <sdbusplus/server.hpp>
namespace sdbusplus
{
@@ -86,7 +85,7 @@
* @return inventoryList[std::vector<sdbusplus::message::object_path>] -
* List of all the FRUs D-Bus object paths for the given location code.
*/
- std::vector<sdbusplus::message::object_path>
+ inventory::ListOfPaths
getFRUsByUnexpandedLocationCode(const std::string locationCode,
const uint16_t nodeNumber);
@@ -100,7 +99,7 @@
* @return inventoryList[std::vector<sdbusplus::message::object_path>] -
* List of all the FRUs D-Bus object path for the given location code.
*/
- std::vector<sdbusplus::message::object_path>
+ inventory::ListOfPaths
getFRUsByExpandedLocationCode(const std::string locationCode);
/** @brief Implementation for GetExpandedLocationCode