From bc3d7c314bb61af7dfb822a644c3032ff8d5c0aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernardo=20De=20Marco=20Gon=C3=A7alves?= Date: Fri, 9 Jan 2026 05:17:44 -0300 Subject: [PATCH] Change the `value` parameter of the `updateConfiguration` API to be required (#10790) --- .../com/cloud/configuration/ConfigurationManagerImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java index 705e7dea158..e6abc21e7da 100644 --- a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java @@ -1031,6 +1031,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati category = config.getCategory(); } + if (value == null) { + throw new InvalidParameterValueException(String.format("The new value for the [%s] configuration must be given.", name)); + } + validateIpAddressRelatedConfigValues(name, value); validateConflictingConfigValue(name, value); @@ -1039,10 +1043,6 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati throw new CloudRuntimeException("Only Root Admin is allowed to edit this configuration."); } - if (value == null) { - return _configDao.findByName(name); - } - ConfigKey.Scope scope = null; Long id = null; int paramCountCheck = 0;