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/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index f67af8e9..c312ada 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -501,7 +501,8 @@
sdbusplus::message::object_path path(
"/xyz/openbmc_project/VirtualMedia/Legacy");
path /= name;
- crow::connections::systemBus->async_method_call(
+ dbus::utility::async_method_call(
+ asyncResp,
[asyncResp](const boost::system::error_code& ec, bool success) {
if (ec)
{
@@ -670,7 +671,8 @@
// Legacy mount requires parameter with image
if (legacy)
{
- crow::connections::systemBus->async_method_call(
+ dbus::utility::async_method_call(
+ asyncResp,
[asyncResp](const boost::system::error_code& ec) {
if (ec)
{
@@ -685,7 +687,8 @@
}
else // proxy
{
- crow::connections::systemBus->async_method_call(
+ dbus::utility::async_method_call(
+ asyncResp,
[asyncResp](const boost::system::error_code& ec) {
if (ec)
{