vpd-tool: Do not enumerate Power supplies
There are outstanding issues with enumerating
power supply objects in the vpd tool.
Skip those for now.
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
Change-Id: I450fe93627ec061e7e408b9f6e432a589ba9c4cf
diff --git a/vpd_tool_impl.cpp b/vpd_tool_impl.cpp
index 37fede1..fa1f57e 100644
--- a/vpd_tool_impl.cpp
+++ b/vpd_tool_impl.cpp
@@ -22,27 +22,6 @@
fru.erase(0, sizeof(INVENTORY_PATH) - 1);
}
-void VpdTool::getPowerSupplyFruPath(vector<string>& powSuppFrus)
-{
- auto bus = sdbusplus::bus::new_default();
- auto properties = bus.new_method_call(
- OBJECT_MAPPER_SERVICE, OBJECT_MAPPER_OBJECT,
- "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths");
- properties.append(INVENTORY_PATH);
- properties.append(0);
- properties.append(array<const char*, 1>{POWER_SUPPLY_TYPE_INTERFACE});
-
- auto result = bus.call(properties);
-
- if (result.is_method_error())
- {
- throw runtime_error(
- "GetSubTreePaths api in ObjectMapper service is failed.");
- }
-
- result.read(powSuppFrus);
-}
-
void VpdTool::debugger(json output)
{
cout << output.dump(4) << '\n';
@@ -277,17 +256,6 @@
char flag = 'I';
json output = json::array({});
output.emplace_back(parseInvJson(jsObject, flag, ""));
-
- vector<string> powSuppFrus;
-
- getPowerSupplyFruPath(powSuppFrus);
-
- for (const auto& fru : powSuppFrus)
- {
- output.emplace_back(
- getVINIProperties(fru, nlohmann::detail::value_t::null));
- }
-
debugger(output);
}
@@ -295,20 +263,7 @@
{
char flag = 'O';
json output = json::array({});
- vector<string> powSuppFrus;
-
- getPowerSupplyFruPath(powSuppFrus);
-
- if (find(powSuppFrus.begin(), powSuppFrus.end(), fruPath) !=
- powSuppFrus.end())
- {
- output.emplace_back(
- getVINIProperties(fruPath, nlohmann::detail::value_t::null));
- }
- else
- {
- output.emplace_back(parseInvJson(jsObject, flag, fruPath));
- }
+ output.emplace_back(parseInvJson(jsObject, flag, fruPath));
debugger(output);
}
diff --git a/vpd_tool_impl.hpp b/vpd_tool_impl.hpp
index 6aec28c..852638c 100644
--- a/vpd_tool_impl.hpp
+++ b/vpd_tool_impl.hpp
@@ -105,15 +105,6 @@
json parseInvJson(const json& jsObject, char flag, std::string fruPath);
/**
- * @brief getPowerSupplyFruPath
- * Get the power supply fru paths from Object mapper service.
- *
- * @param[out] powSuppFrus - Reference to a vector which has the power
- * supply fruPaths.
- */
- void getPowerSupplyFruPath(std::vector<std::string>& powSuppFrus);
-
- /**
* @brief eraseInventoryPath
* Remove the INVENTORY_PATH - "/xyz/openbmc_project/inventory"
* for code convenience.