rohityadavcloud commented on code in PR #8782:
URL: https://github.com/apache/cloudstack/pull/8782#discussion_r1594251304


##########
plugins/metrics/src/main/java/org/apache/cloudstack/api/ListVMsMetricsCmd.java:
##########
@@ -42,20 +44,24 @@
  *     although most of it is not suitable/useful for the API purpose.</li>
  * </ul>
  */
-@APICommand(name = ListVMsMetricsCmd.APINAME, description = "Lists VM 
metrics", responseObject = VmMetricsResponse.class,
+@APICommand(name = "listVirtualMachinesMetrics", description = "Lists VM 
metrics", responseObject = VmMetricsResponse.class,
         requestHasSensitiveInfo = false, responseHasSensitiveInfo = false,  
responseView = ResponseObject.ResponseView.Restricted,
         since = "4.9.3", authorized = {RoleType.ResourceAdmin, 
RoleType.DomainAdmin, RoleType.User})
 public class ListVMsMetricsCmd extends ListVMsCmd implements UserCmd {
-    public static final String APINAME = "listVirtualMachinesMetrics";
 
     @Inject
     private MetricsService metricsService;
 
     @Override
-    public String getCommandName() {
-        return APINAME.toLowerCase() + BaseCmd.RESPONSE_SUFFIX;
+    public EnumSet<ApiConstants.VMDetails> getDetails() throws 
InvalidParameterValueException {
+        if (isViewDetailsEmpty()) {
+            return EnumSet.of(ApiConstants.VMDetails.all);
+        }
+
+        return super.getDetails();
     }
 
+

Review Comment:
   nit - remove extra line



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