Add build and runtime flags to enable memory capacity configuration. Google-Bug-Id:541287798 PiperOrigin-RevId: 980005588 Change-Id: Id1f3fdaf3865f51d93d7364e5c68542b5829e8cc
diff --git a/config/bmcweb_config.h.in b/config/bmcweb_config.h.in index 440bbe7..7b5868e 100644 --- a/config/bmcweb_config.h.in +++ b/config/bmcweb_config.h.in
@@ -47,6 +47,7 @@ constexpr bool enableTlbmcSensorOverride = @ENABLE_TLBMC_SENSOR_OVERRIDE@ == 1; constexpr bool enableRedfishSystemBootNumber = @ENABLE_REDFISH_SYSTEM_BOOTNUMBER@ == 1; constexpr bool enableConfigureCoreCount = @ENABLE_CONFIGURE_CORE_COUNT@ == 1; +constexpr bool enableConfigureMemoryCapacity = @ENABLE_CONFIGURE_MEMORY_CAPACITY@ == 1; constexpr bool enableRedfishConfigureIfs = @ENABLE_REDFISH_CONFIGURE_IFS@ == 1; // Credential paths for gRPC
diff --git a/config/meson.build b/config/meson.build index 16ef745..1d58bf6 100644 --- a/config/meson.build +++ b/config/meson.build
@@ -29,6 +29,7 @@ conf_data.set10('ENABLE_TLBMC_SENSOR_OVERRIDE', get_option('tlbmc-sensor-override').enabled()) conf_data.set10('ENABLE_REDFISH_SYSTEM_BOOTNUMBER', get_option('enable-redfish-system-bootnumber').enabled()) conf_data.set10('ENABLE_CONFIGURE_CORE_COUNT', get_option('enable-configure-core-count').enabled()) +conf_data.set10('ENABLE_CONFIGURE_MEMORY_CAPACITY', get_option('enable-configure-memory-capacity').enabled()) conf_data.set10('ENABLE_REDFISH_CONFIGURE_IFS', get_option('redfish-configure-ifs').enabled()) # Credential flags
diff --git a/include/webserver_main_setup.hpp b/include/webserver_main_setup.hpp index 1a6e5e9..9f5e0cf 100644 --- a/include/webserver_main_setup.hpp +++ b/include/webserver_main_setup.hpp
@@ -80,6 +80,7 @@ ABSL_DECLARE_FLAG(std::string, server_cert_path); ABSL_DECLARE_FLAG(std::string, server_private_key_path); ABSL_DECLARE_FLAG(bool, enable_configure_core_count); +ABSL_DECLARE_FLAG(bool, enable_configure_memory_capacity); ABSL_DECLARE_FLAG(bool, enable_redfish_configure_ifs); ABSL_DECLARE_FLAG(std::string, smbios_single_host_file_path); ABSL_DECLARE_FLAG(std::string, smbios_multihost_host_file_path_prefix);
diff --git a/meson.build b/meson.build index 9ee60cb..8ee47c7 100644 --- a/meson.build +++ b/meson.build
@@ -128,6 +128,7 @@ 'really-graceful-shutdown' : '-DBMCWEB_ENABLE_REALLY_GRACEFUL_SHUTDOWN', 'enable-standby-offline' : '-DBMCWEB_ENABLE_STANDBY_OFFLINE', 'enable-configure-core-count' : '-DENABLE_CONFIGURE_CORE_COUNT', + 'enable-configure-memory-capacity' : '-DENABLE_CONFIGURE_MEMORY_CAPACITY', 'redfish-configure-ifs' : '-DENABLE_REDFISH_CONFIGURE_IFS', 'allow-arbitrary-command-to-rot' : '-DBMCWEB_ENABLE_ALLOW_ARBITRARY_COMMAND_TO_ROT', }
diff --git a/meson_options.txt b/meson_options.txt index ad0b3e0..8d37762 100644 --- a/meson_options.txt +++ b/meson_options.txt
@@ -942,6 +942,11 @@ value: 'disabled', description: 'Enable configuration of core count via Redfish.') +option('enable-configure-memory-capacity', + type: 'feature', + value: 'disabled', + description: 'Enable configuration of memory capacity via Redfish.') + option('restrict-redfish-routes-from-insecure-transport', type: 'feature', value: 'disabled',
diff --git a/src/webserver_main_setup.cpp b/src/webserver_main_setup.cpp index d68b906..856671f 100644 --- a/src/webserver_main_setup.cpp +++ b/src/webserver_main_setup.cpp
@@ -70,6 +70,8 @@ "Path to private key file used by gRPC server."); ABSL_FLAG(bool, enable_configure_core_count, enableConfigureCoreCount, "Enable configuring core count"); +ABSL_FLAG(bool, enable_configure_memory_capacity, enableConfigureMemoryCapacity, + "Enable configuring memory capacity"); ABSL_FLAG(bool, enable_redfish_configure_ifs, enableRedfishConfigureIfs, "Enable redfish configure ifs flag"); ABSL_FLAG(std::string, smbios_single_host_file_path, "/var/lib/smbios/smbios2",