Add async_method_call to utility
Adding async_method_call in dbus utility gives us a place where we can
intercept method call requests from dbus to potentially add
logging/caching.
An example of logging is in the later commit:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/78265/
We already do this for setProperty, this moves the method calls to
follow a similar pattern.
Tested: Redfish service validator passes.
Change-Id: I6d2c96e2b6b6a023ed2138106a55faebca161592
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index fa003e3..66f49ab 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -4,7 +4,6 @@
#pragma once
#include "app.hpp"
#include "async_resp.hpp"
-#include "dbus_singleton.hpp"
#include "dbus_utility.hpp"
#include "error_messages.hpp"
#include "event_service_manager.hpp"
@@ -298,7 +297,8 @@
"/redfish/v1/EventService/Subscriptions/{}" + id);
memberArray.emplace_back(std::move(member));
}
- crow::connections::systemBus->async_method_call(
+ dbus::utility::async_method_call(
+ asyncResp,
[asyncResp](const boost::system::error_code& ec,
const dbus::utility::ManagedObjectType& resp) {
doSubscriptionCollection(ec, asyncResp, resp);