marcaurele commented on a change in pull request #1554: CLOUDSTACK-9602: API: 
improve resource limits comprehension
URL: https://github.com/apache/cloudstack/pull/1554#discussion_r147710791
 
 

 ##########
 File path: 
api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java
 ##########
 @@ -96,4 +117,24 @@ public void execute() {
         response.setResponseName(getCommandName());
         this.setResponseObject(response);
     }
+
+    private Resource.ResourceType getResourceTypeEnum() {
+        // Map resource type
+        Resource.ResourceType resourceTypeResult = null;
+        if (resourceTypeName != null) {
+            try {
+                resourceTypeResult = 
Resource.ResourceType.valueOf(resourceTypeName);
+            } catch (IllegalArgumentException e) {
+                throw new InvalidParameterValueException("Please specify a 
valid resource type name.");
+            }
+        } else if (resourceType != null) {
+            try {
+                resourceTypeResult = 
Resource.ResourceType.values()[resourceType];
 
 Review comment:
   Correct, I updated the change to use the ordinal value use in the each value.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to