diff options
author | George Liu <liuxiwei@inspur.com> | 2023-06-20 12:03:24 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-06-20 19:29:29 +0300 |
commit | 5eb468da982d6b02cafc6d3b7e4413d01b28be80 (patch) | |
tree | 4bc0524b9f38b93dace0a2a191575e8c8a216058 /redfish-core/include | |
parent | c3b3ad033400cc455cdce6601a982fa94405e84a (diff) | |
download | bmcweb-5eb468da982d6b02cafc6d3b7e4413d01b28be80.tar.xz |
Refactor getManagedObjects method
Since the getManagedObjects method has been implemented in
dbus_utility and this commit is to integrate all the places where the
GetManagedObjects method is obtained, and use the method in
dbus_utility uniformly.
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ic13f2bef7b30f805cd3444a75d7df17b031f2eb0
Diffstat (limited to 'redfish-core/include')
-rw-r--r-- | redfish-core/include/redfish_aggregator.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp index 3b48bda092..a6920e86a9 100644 --- a/redfish-core/include/redfish_aggregator.hpp +++ b/redfish-core/include/redfish_aggregator.hpp @@ -756,7 +756,9 @@ class RedfishAggregator handler) { BMCWEB_LOG_DEBUG << "Gathering satellite configs"; - crow::connections::systemBus->async_method_call( + sdbusplus::message::object_path path("/xyz/openbmc_project/inventory"); + dbus::utility::getManagedObjects( + "xyz.openbmc_project.EntityManager", path, [handler{std::move(handler)}]( const boost::system::error_code& ec, const dbus::utility::ManagedObjectType& objects) { @@ -786,10 +788,7 @@ class RedfishAggregator << "No satellite BMCs detected. Redfish Aggregation not enabled"; } handler(ec, satelliteInfo); - }, - "xyz.openbmc_project.EntityManager", - "/xyz/openbmc_project/inventory", - "org.freedesktop.DBus.ObjectManager", "GetManagedObjects"); + }); } // Processes the response returned by a satellite BMC and loads its |