Change the `value` parameter of the `updateConfiguration` API to be required (#10790)

This commit is contained in:
Bernardo De Marco Gonçalves 2026-01-09 05:17:44 -03:00 committed by GitHub
parent 425c4e3312
commit bc3d7c314b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -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;