stephankruggg commented on code in PR #6812:
URL: https://github.com/apache/cloudstack/pull/6812#discussion_r1032627718


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java:
##########
@@ -156,25 +157,52 @@ public void execute() {
         if (cfg != null) {
             ConfigurationResponse response = 
_responseGenerator.createConfigurationResponse(cfg);
             response.setResponseName(getCommandName());
-            if (getZoneId() != null) {
-                response.setScope("zone");
-            }
-            if (getClusterId() != null) {
-                response.setScope("cluster");
-            }
-            if (getStoragepoolId() != null) {
-                response.setScope("storagepool");
-            }
-            if (getAccountId() != null) {
-                response.setScope("account");
-            }
-            if (getDomainId() != null) {
-                response.setScope("domain");
-            }
-            response.setValue(value);
+
+            response = setResponseScopes(response);
+            response = setResponseValue(response, cfg);
+
             this.setResponseObject(response);
         } else {
             throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed 
to update config");
         }
     }
+
+    /**
+     * Set the configuration value in the response. If the configuration is in 
the `Hidden` or `Secure` categories, the value is encrypted before being set in 
the response.

Review Comment:
   ```suggestion
        * Sets the configuration value in the response. If the configuration is 
in the `Hidden` or `Secure` categories, the value is encrypted before being set 
in the response.
   ```



-- 
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]

Reply via email to