bernardodemarco commented on code in PR #10790:
URL: https://github.com/apache/cloudstack/pull/10790#discussion_r2486523453
##########
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java:
##########
@@ -1030,6 +1030,10 @@ public Configuration updateConfiguration(final
UpdateCfgCmd cmd) throws InvalidP
category = config.getCategory();
}
+ if (value == null) {
+ throw new InvalidParameterValueException(String.format("A value
for the [%s] configuration must be informed.", name));
Review Comment:
@DaanHoogland, actually, the `value` parameter can be empty, for example:
```
(lab) 🐱 > update configuration name="alert.email.addresses" value=""
{
"configuration": {
"category": "Alert",
"component": "management-server",
"description": "Comma separated list of email addresses which are going
to receive alert emails.",
"displaytext": "Alert email addresses",
"group": "Management Server",
"isdynamic": false,
"name": "alert.email.addresses",
"subgroup": "Alerts",
"type": "CSV",
"value": ""
}
}
```
Empty values are used to clear configuration values. The error message will
be returned only when the `value` parameter is not specified, for example:
```
(lab) 🐱 > update configuration name="alert.email.addresses"
🙈 Error: (HTTP 431, error code 4350) A value for the [alert.email.addresses]
configuration must be informed.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]