diff options
author | Ed Tanous <edtanous@google.com> | 2021-10-04 21:43:24 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2021-10-07 18:42:51 +0300 |
commit | 44fad2aa3ba9e28bb52c0ff21ba2cdbd2812b199 (patch) | |
tree | 9d456b68e345be5a642c12d6b4b6ca22c5f55ac3 | |
parent | c5967048de7c5361b1537af47768a87ffb463d28 (diff) | |
download | bmcweb-44fad2aa3ba9e28bb52c0ff21ba2cdbd2812b199.tar.xz |
Remove dead hostname code
The original code said we'd remove this in Q4 2021, and it's now Q4
2021. So far as I've heard, no user has reported this, and no system
has needed to enable this for backward compatibility. The original
author of the patch has stated that it's no longer used, so this is
effectively dead code, lets remove it.
Also, added a missing return in what was previously a #ifdef
Tested:
Code builds.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1d58efb92ed06b7632d57440072834a1d02e87dd
-rw-r--r-- | meson.build | 10 | ||||
-rw-r--r-- | meson_options.txt | 1 | ||||
-rw-r--r-- | redfish-core/lib/network_protocol.hpp | 25 |
3 files changed, 1 insertions, 35 deletions
diff --git a/meson.build b/meson.build index 650a5ec688..66258a8c14 100644 --- a/meson.build +++ b/meson.build @@ -211,16 +211,6 @@ if( get_option('bmcweb-logging').enabled() or \ },section : 'Enabled Features') endif -if( get_option('redfish-allow-deprecated-hostname-patch').enabled()) - add_project_arguments([ - '-DBMCWEB_ALLOW_DEPRECATED_HOSTNAME_PATCH' - ], - language : 'cpp') - - summary({'hostname-patch' :'-DBMCWEB_ALLOW_DEPRECATED_HOSTNAME_PATCH' - },section : 'Enabled Features') -endif - if( get_option('redfish-allow-deprecated-power-thermal').enabled()) add_project_arguments([ '-DBMCWEB_ALLOW_DEPRECATED_POWER_THERMAL' diff --git a/meson_options.txt b/meson_options.txt index ff5b8877dd..ada1957e8b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -29,7 +29,6 @@ option('mutual-tls-auth', type : 'feature', value : 'enabled', description : ''' option('ibm-management-console', type : 'feature', value : 'disabled', description : 'Enable the IBM management console specific functionality. Paths are under \'/ibm/v1/\'') option('google-api', type : 'feature', value : 'disabled', description : 'Enable the Google specific functionality. Paths are under \'/google/v1/\'') option('http-body-limit', type: 'integer', min : 0, max : 512, value : 30, description : 'Specifies the http request body length limit') -option('redfish-allow-deprecated-hostname-patch', type : 'feature', value : 'disabled', description : 'Enable/disable Managers/bmc/NetworkProtocol HostName PATCH commands. The default condition is to prevent HostName changes from this URI, following the Redfish schema. Enabling this switch permits the HostName to be PATCHed at this URI. In Q4 2021 this feature will be removed, and the Redfish schema enforced, making the HostName read-only.') option('redfish-new-powersubsystem-thermalsubsystem', type : 'feature', value : 'disabled', description : 'Enable/disable the new PowerSubsystem, ThermalSubsystem, and all children schemas. This includes displaying all sensors in the SensorCollection. At a later date, this feature will be defaulted to enabled.') option('redfish-allow-deprecated-power-thermal', type : 'feature', value : 'enabled', description : 'Enable/disable the old Power / Thermal. The default condition is allowing the old Power / Thermal.') option ('https_port', type : 'integer', min : 1, max : 65535, value : 443, description : 'HTTPS Port number.') diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp index a9f5005142..a06611fa5a 100644 --- a/redfish-core/lib/network_protocol.hpp +++ b/redfish-core/lib/network_protocol.hpp @@ -209,26 +209,6 @@ inline void getNetworkData(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp, } } // namespace redfish -#ifdef BMCWEB_ALLOW_DEPRECATED_HOSTNAME_PATCH -inline void - handleHostnamePatch(const std::string& hostName, - const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) -{ - crow::connections::systemBus->async_method_call( - [asyncResp](const boost::system::error_code ec) { - if (ec) - { - messages::internalError(asyncResp->res); - return; - } - }, - "xyz.openbmc_project.Network", "/xyz/openbmc_project/network/config", - "org.freedesktop.DBus.Properties", "Set", - "xyz.openbmc_project.Network.SystemConfiguration", "HostName", - std::variant<std::string>(hostName)); -} -#endif - inline void handleNTPProtocolEnabled( const bool& ntpEnabled, const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) { @@ -391,11 +371,8 @@ inline void requestRoutesNetworkProtocol(App& app) asyncResp->res.result(boost::beast::http::status::no_content); if (newHostName) { -#ifdef BMCWEB_ALLOW_DEPRECATED_HOSTNAME_PATCH - handleHostnamePatch(*newHostName, asyncResp); -#else messages::propertyNotWritable(asyncResp->res, "HostName"); -#endif + return; } if (ntp) |