diff options
author | Ed Tanous <edtanous@google.com> | 2023-05-15 22:44:27 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-05-19 19:33:34 +0300 |
commit | 4a40441f944aaff8d7bb2040e4d88ebfcebbab11 (patch) | |
tree | ba73990635d35a2872b4cdf2e7c85dca6ecd4012 | |
parent | e6feae518c5a153af2dc64d3810fd029f0875366 (diff) | |
download | bmcweb-4a40441f944aaff8d7bb2040e4d88ebfcebbab11.tar.xz |
Remove redfish-post-to-old-updateservice
It is now Q2 2023, and this option has been deprecated. Maintainers
have not had any reports of this behavior breaking people.
Tested: Code delete only. Code compiles.
Change-Id: I9c1fe26e497806c6bc602fb019bafe0fc80d7619
Signed-off-by: Ed Tanous <edtanous@google.com>
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | meson_options.txt | 10 | ||||
-rw-r--r-- | redfish-core/lib/update_service.hpp | 30 |
3 files changed, 0 insertions, 41 deletions
diff --git a/meson.build b/meson.build index 152a2fd550..05e5e2effa 100644 --- a/meson.build +++ b/meson.build @@ -83,7 +83,6 @@ feature_map = { 'redfish-new-powersubsystem-thermalsubsystem' : '-DBMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM', 'redfish-oem-manager-fan-data' : '-DBMCWEB_ENABLE_REDFISH_OEM_MANAGER_FAN_DATA', 'redfish-provisioning-feature' : '-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE', - 'redfish-post-to-old-updateservice' : '-DBMCWEB_ENABLE_REDFISH_UPDATESERVICE_OLD_POST_URL', 'redfish' : '-DBMCWEB_ENABLE_REDFISH', 'rest' : '-DBMCWEB_ENABLE_DBUS_REST', 'session-auth' : '-DBMCWEB_ENABLE_SESSION_AUTHENTICATION', diff --git a/meson_options.txt b/meson_options.txt index 0bf2c3507a..8a440f98c9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -218,16 +218,6 @@ option( ) option( - 'redfish-post-to-old-updateservice', - type: 'feature', - value: 'disabled', - description: '''Allows POST to /redfish/v1/UpdateService, counter to - the redfish specification. Option provided to allow - potential users to move away from using this endpoint. - Option will be removed Q2 2023.''' -) - -option( 'redfish-oem-manager-fan-data', type: 'feature', value: 'enabled', diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp index 5f46d0aef7..7c8ce01a01 100644 --- a/redfish-core/lib/update_service.hpp +++ b/redfish-core/lib/update_service.hpp @@ -723,15 +723,6 @@ inline void requestRoutesUpdateService(App& app) asyncResp->res.jsonValue["Description"] = "Service for Software Update"; asyncResp->res.jsonValue["Name"] = "Update Service"; -#ifdef BMCWEB_ENABLE_REDFISH_UPDATESERVICE_OLD_POST_URL - // See note about later on in this file about why this is neccesary - // This is "Wrong" per the standard, but is done temporarily to - // avoid noise in failing tests as people transition to having this - // option disabled - asyncResp->res.addHeader(boost::beast::http::field::allow, - "GET, PATCH, HEAD"); -#endif - asyncResp->res.jsonValue["HttpPushUri"] = "/redfish/v1/UpdateService/update"; asyncResp->res.jsonValue["MultipartHttpPushUri"] = @@ -829,27 +820,6 @@ inline void requestRoutesUpdateService(App& app) } }); -// The "old" behavior of the update service URI causes redfish-service validator -// failures when the Allow header is supported, given that in the spec, -// UpdateService does not allow POST. in openbmc, we unfortunately reused that -// resource as our HttpPushUri as well. A number of services, including the -// openbmc tests, and documentation have hardcoded that erroneous API, instead -// of relying on HttpPushUri as the spec requires. This option will exist -// temporarily to allow the old behavior until Q4 2022, at which time it will be -// removed. -#ifdef BMCWEB_ENABLE_REDFISH_UPDATESERVICE_OLD_POST_URL - BMCWEB_ROUTE(app, "/redfish/v1/UpdateService/") - .privileges(redfish::privileges::postUpdateService) - .methods(boost::beast::http::verb::post)( - [&app](const crow::Request& req, - const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { - asyncResp->res.addHeader( - boost::beast::http::field::warning, - "299 - \"POST to /redfish/v1/UpdateService is deprecated. Use " - "the value contained within HttpPushUri.\""); - handleUpdateServicePost(app, req, asyncResp); - }); -#endif BMCWEB_ROUTE(app, "/redfish/v1/UpdateService/update/") .privileges(redfish::privileges::postUpdateService) .methods(boost::beast::http::verb::post)( |