Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of
generated code, and more importantly, gives us a place where we can log
the requests and responses to help with debugging.
Tested: Redfish service validator passes.
Change-Id: Ic1bf45130b5069cd57f7af26e12c8d3159c87c67
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index 697e3c5..3ee36af 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -555,7 +555,7 @@
{
return;
}
- sdbusplus::asio::getAllProperties(
+ dbus::utility::getAllProperties(
*crow::connections::systemBus, owner, path,
"xyz.openbmc_project.Control.FanRedundancy",
[path, sensorsAsyncResp](
@@ -1375,9 +1375,8 @@
};
// Get the State property for the current LED
- sdbusplus::asio::getProperty<std::string>(
- *crow::connections::systemBus, ledConnection, ledPath,
- "xyz.openbmc_project.Led.Physical", "State",
+ dbus::utility::getProperty<std::string>(
+ ledConnection, ledPath, "xyz.openbmc_project.Led.Physical", "State",
std::move(respHandler));
}
@@ -1544,8 +1543,8 @@
// Get the DeratingFactor property for the PowerSupplyAttributes
// Currently only property on the interface/only one we care about
- sdbusplus::asio::getProperty<uint32_t>(
- *crow::connections::systemBus, psAttributesConnection, psAttributesPath,
+ dbus::utility::getProperty<uint32_t>(
+ psAttributesConnection, psAttributesPath,
"xyz.openbmc_project.Control.PowerSupplyAttributes", "DeratingFactor",
std::move(respHandler));
@@ -2407,7 +2406,7 @@
BMCWEB_LOG_DEBUG("Looking up {}", connectionName);
BMCWEB_LOG_DEBUG("Path {}", sensorPath);
- sdbusplus::asio::getAllProperties(
+ ::dbus::utility::getAllProperties(
*crow::connections::systemBus, connectionName, sensorPath, "",
[asyncResp,
sensorPath](const boost::system::error_code& ec,