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/fan.hpp b/redfish-core/lib/fan.hpp
index 28b995e..4dbe58d 100644
--- a/redfish-core/lib/fan.hpp
+++ b/redfish-core/lib/fan.hpp
@@ -233,8 +233,8 @@
 inline void getFanHealth(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                          const std::string& fanPath, const std::string& service)
 {
-    sdbusplus::asio::getProperty<bool>(
-        *crow::connections::systemBus, service, fanPath,
+    dbus::utility::getProperty<bool>(
+        service, fanPath,
         "xyz.openbmc_project.State.Decorator.OperationalStatus", "Functional",
         [asyncResp](const boost::system::error_code& ec, const bool value) {
             if (ec)
@@ -259,9 +259,8 @@
 inline void getFanState(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                         const std::string& fanPath, const std::string& service)
 {
-    sdbusplus::asio::getProperty<bool>(
-        *crow::connections::systemBus, service, fanPath,
-        "xyz.openbmc_project.Inventory.Item", "Present",
+    dbus::utility::getProperty<bool>(
+        service, fanPath, "xyz.openbmc_project.Inventory.Item", "Present",
         [asyncResp](const boost::system::error_code& ec, const bool value) {
             if (ec)
             {
@@ -285,9 +284,8 @@
 inline void getFanAsset(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                         const std::string& fanPath, const std::string& service)
 {
-    sdbusplus::asio::getAllProperties(
-        *crow::connections::systemBus, service, fanPath,
-        "xyz.openbmc_project.Inventory.Decorator.Asset",
+    dbus::utility::getAllProperties(
+        service, fanPath, "xyz.openbmc_project.Inventory.Decorator.Asset",
         [fanPath, asyncResp{asyncResp}](
             const boost::system::error_code& ec,
             const dbus::utility::DBusPropertiesMap& assetList) {
@@ -344,8 +342,8 @@
                            const std::string& fanPath,
                            const std::string& service)
 {
-    sdbusplus::asio::getProperty<std::string>(
-        *crow::connections::systemBus, service, fanPath,
+    dbus::utility::getProperty<std::string>(
+        service, fanPath,
         "xyz.openbmc_project.Inventory.Decorator.LocationCode", "LocationCode",
         [asyncResp](const boost::system::error_code& ec,
                     const std::string& property) {