used sdbusplus::unpackPropertiesNoThrow part 8

used sdbusplus::unpackPropertiesNoThrow in other places, also replaced
all usages of "GetAll" with sdbusplus::asio::getAllProperties

    bmcweb size: 2697640 -> 2685336 (-12304)
compressed size: 1129728 -> 1126078 (-3650)

Tested:
  - Executed redfish service validator, no new errors detected

Change-Id: I916e462e004fcbde67c209daef295de8f5fb68eb
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index cecaeab..47f0c5d 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -23,6 +23,7 @@
 #include <dbus_utility.hpp>
 #include <query.hpp>
 #include <registries/privilege_registry.hpp>
+#include <sdbusplus/asio/property.hpp>
 
 namespace redfish
 {
@@ -288,11 +289,11 @@
                 }
             };
 
-            crow::connections::systemBus->async_method_call(
-                std::move(valueHandler), "xyz.openbmc_project.Settings",
+            sdbusplus::asio::getAllProperties(
+                *crow::connections::systemBus, "xyz.openbmc_project.Settings",
                 "/xyz/openbmc_project/control/host0/power_cap",
-                "org.freedesktop.DBus.Properties", "GetAll",
-                "xyz.openbmc_project.Control.Power.Cap");
+                "xyz.openbmc_project.Control.Power.Cap",
+                std::move(valueHandler));
         };
 
         crow::connections::systemBus->async_method_call(