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/cable.hpp b/redfish-core/lib/cable.hpp
index 27ee276..7493b29 100644
--- a/redfish-core/lib/cable.hpp
+++ b/redfish-core/lib/cable.hpp
@@ -91,7 +91,7 @@
{
if (interface == "xyz.openbmc_project.Inventory.Item.Cable")
{
- sdbusplus::asio::getAllProperties(
+ dbus::utility::getAllProperties(
*crow::connections::systemBus, service, cableObjectPath,
interface,
[asyncResp](
@@ -102,9 +102,8 @@
}
else if (interface == "xyz.openbmc_project.Inventory.Item")
{
- sdbusplus::asio::getProperty<bool>(
- *crow::connections::systemBus, service, cableObjectPath,
- interface, "Present",
+ dbus::utility::getProperty<bool>(
+ service, cableObjectPath, interface, "Present",
[asyncResp, cableObjectPath](
const boost::system::error_code& ec, bool present) {
if (ec)