-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/25435/#review52693
-----------------------------------------------------------


Thanks for updating it.


api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java
<https://reviews.apache.org/r/25435/#comment91672>

    Let's keep the coding convention for annotation consistent with others, 
keep 'em in same line.
    
    https://cwiki.apache.org/confluence/display/CLOUDSTACK/Coding+conventions


By using variable type to CommandType.STRING, we run the risk of blowing up 
inner layers if they are UUIDs. If there are other places where STRING is used 
instead of UUID, they must be fixed too. By using the commandtype UUID, the 
apidocs will get this information right and also clients using listApis such as 
cloudmonkey's sync and it sfuzzy parameter completer. You simply need to change 
the type to CommandType.UUID, the variable is still a String. You may read in 
detail why it should be UUID, 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+API+refactoring

- Rohit Yadav


On Sept. 9, 2014, 7:58 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25435/
> -----------------------------------------------------------
> 
> (Updated Sept. 9, 2014, 7:58 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Kishan Kavala, and Sheng 
> Yang.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Working with Usage server and usage records very often I need to get only 
> records for that particular usage ID. For example when filtering out 
> network_bytes_received/sent with big amount of data it's not very fast to 
> process hundreds of objects looking for the only one you need.
> It would be useful to have an ability to filter out usage records only for 
> specific resource ID.
> 
> This parch brings that to the API.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java 6baa95c 
>   
> api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java 
> 21a7e4a 
>   server/src/com/cloud/usage/UsageServiceImpl.java d1f62aa 
> 
> Diff: https://reviews.apache.org/r/25435/diff/
> 
> 
> Testing
> -------
> 
> Tested cases:
> - usageid is specified w/o "type": an exception is thrown (correct)
> - provided usageid is not exists: an empty response is returned (since no 
> records were found, correct)
> - no usageid specified: work as is
> - an existing usageid specified (with type, for example type=4 or type=5): 
> only records for that usage type is returned
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>

Reply via email to