Skip to content

Commit 8ad0dc1

Browse files
make value parameter of the updateConfiguration API required
1 parent 2df1ac5 commit 8ad0dc1

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class UpdateCfgCmd extends BaseCmd {
4848
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the configuration")
4949
private String cfgName;
5050

51-
@Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "the value of the configuration", length = 4096)
51+
@Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, required = true, description = "the value of the configuration", length = 4096)
5252
private String value;
5353

5454
@Parameter(name = ApiConstants.ZONE_ID,

server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -975,10 +975,6 @@ public Configuration updateConfiguration(final UpdateCfgCmd cmd) throws InvalidP
975975
throw new CloudRuntimeException("Only Root Admin is allowed to edit this configuration.");
976976
}
977977

978-
if (value == null) {
979-
return _configDao.findByName(name);
980-
}
981-
982978
String scope = null;
983979
Long id = null;
984980
int paramCountCheck = 0;

0 commit comments

Comments
 (0)