diff options
author | Carson Labrado <clabrado@google.com> | 2022-06-06 22:40:56 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-06-15 03:22:52 +0300 |
commit | 3ba0007367777144f474fdf99439ae8c03633486 (patch) | |
tree | 4b2d561630a44a0f2859a2b55f2c2c6b28780252 /redfish-core/lib/certificate_service.hpp | |
parent | a7a80296f731ef1069d3ecfbd3069668fb71cd68 (diff) | |
download | bmcweb-3ba0007367777144f474fdf99439ae8c03633486.tar.xz |
Expose AsyncResp shared_ptr when handling response
For Redfish Aggregation, we need a common point to check the D-Bus
for satellite configs. If they are available then we perform the
aggregation operations. The functions in query.hpp are used by all
endpoints making them the logical location. The aggregation code
requires a shared_ptr to the AsyncResp so these functions need to be
able to supply that.
This patch is broken out of a future patch for routing Redfish
Aggregation requests
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/53310
The follow commands can be used to perform most of the replacements:
find . -type f | xargs sed -i 's/setUpRedfishRoute(app, req, asyncResp->res/setUpRedfishRoute(app, req, asyncResp/g'
find . -type f | xargs sed -i 's/setUpRedfishRouteWithDelegation(app, req, asyncResp->res/setUpRedfishRouteWithDelegation(app, req, asyncResp/g'
Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I4f4f9f22cdcfb14a3bd94b9a8f3d64aae34e57bc
Diffstat (limited to 'redfish-core/lib/certificate_service.hpp')
-rw-r--r-- | redfish-core/lib/certificate_service.hpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/redfish-core/lib/certificate_service.hpp b/redfish-core/lib/certificate_service.hpp index efd18ea1d7..c0ae4b34c8 100644 --- a/redfish-core/lib/certificate_service.hpp +++ b/redfish-core/lib/certificate_service.hpp @@ -49,7 +49,7 @@ inline void requestRoutesCertificateService(App& app) .methods(boost::beast::http::verb::get)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -251,7 +251,7 @@ inline void requestRoutesCertificateActionGenerateCSR(App& app) .methods(boost::beast::http::verb::post)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -672,7 +672,7 @@ inline void requestRoutesCertificateActionsReplaceCertificate(App& app) .methods(boost::beast::http::verb::post)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -800,7 +800,7 @@ inline void requestRoutesHTTPSCertificate(App& app) get)([&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string& param) -> void { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -836,7 +836,7 @@ inline void requestRoutesHTTPSCertificateCollection(App& app) .methods(boost::beast::http::verb::get)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -884,7 +884,7 @@ inline void requestRoutesHTTPSCertificateCollection(App& app) .methods(boost::beast::http::verb::post)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -989,7 +989,7 @@ inline void requestRoutesCertificateLocations(App& app) .methods(boost::beast::http::verb::get)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -1030,7 +1030,7 @@ inline void requestRoutesLDAPCertificateCollection(App& app) .methods(boost::beast::http::verb::get)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -1079,7 +1079,7 @@ inline void requestRoutesLDAPCertificateCollection(App& app) .methods(boost::beast::http::verb::post)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -1137,7 +1137,7 @@ inline void requestRoutesLDAPCertificate(App& app) [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string&) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -1168,7 +1168,7 @@ inline void requestRoutesTrustStoreCertificateCollection(App& app) .methods(boost::beast::http::verb::get)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -1215,7 +1215,7 @@ inline void requestRoutesTrustStoreCertificateCollection(App& app) .methods(boost::beast::http::verb::post)( [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -1273,7 +1273,7 @@ inline void requestRoutesTrustStoreCertificate(App& app) [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string&) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } @@ -1303,7 +1303,7 @@ inline void requestRoutesTrustStoreCertificate(App& app) [&app](const crow::Request& req, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, const std::string& param) { - if (!redfish::setUpRedfishRoute(app, req, asyncResp->res)) + if (!redfish::setUpRedfishRoute(app, req, asyncResp)) { return; } |