PranaliM commented on a change in pull request #2257: 
CLOUDSTACK-10060:ListUsage API always displays the Virtual size as '0' for 
Usage type=9 (snapshot)
URL: https://github.com/apache/cloudstack/pull/2257#discussion_r139394784
 
 

 ##########
 File path: usage/src/com/cloud/usage/parser/StorageUsageParser.java
 ##########
 @@ -182,7 +182,10 @@ private static void createUsageRecord(long zoneId, int 
type, long runningTime, D
                 break;
         }
         // Create the usage record
-        usageDesc += "Id:" + storageId + " Size:" + size + "VirtualSize:" + 
virtualSize;
+        usageDesc += "Id:" + storageId + " Size:" + size;
+        if(type != StorageTypes.SNAPSHOT) {
+        usageDesc +=  " VirtualSize:" + virtualSize;
 
 Review comment:
   @rhtyd - Fixed indentation
 
----------------------------------------------------------------
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