[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16225002#comment-16225002
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9602:
--------------------------------------------

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:
us...@infra.apache.org


> Add resource type name in response
> ----------------------------------
>
>                 Key: CLOUDSTACK-9602
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9602
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: API
>            Reporter: Marc-Aurèle Brothier
>            Assignee: Marc-Aurèle Brothier
>
> Output the resource type name along with its id to be more human readable for 
> all API call returning a resource.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to