You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2019/07/31 07:09:21 UTC

[cloudstack] branch master updated: server: Add size to listUsageRecords response for VMSnapShotOnPrimary (type 27) (#3529)

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new cf0649d  server: Add size to listUsageRecords response for VMSnapShotOnPrimary (type 27) (#3529)
cf0649d is described below

commit cf0649def10a5f283732efc4176106c7118a1465
Author: Anurag Awasthi <an...@shapeblue.com>
AuthorDate: Wed Jul 31 12:39:10 2019 +0530

    server: Add size to listUsageRecords response for VMSnapShotOnPrimary (type 27) (#3529)
    
    Add size to list usage records for VMSnapShotOnPrimary (type 27).
    The size was included in description but missing from response.
---
 server/src/main/java/com/cloud/api/ApiResponseHelper.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/src/main/java/com/cloud/api/ApiResponseHelper.java b/server/src/main/java/com/cloud/api/ApiResponseHelper.java
index 20bfb96..90d4ff0 100644
--- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java
@@ -3684,6 +3684,7 @@ public class ApiResponseHelper implements ResponseGenerator {
                 usageRecResponse.setDescription(builder.toString());
             }
         } else if (usageRecord.getUsageType() == UsageTypes.VM_SNAPSHOT_ON_PRIMARY) {
+            usageRecResponse.setSize(usageRecord.getVirtualSize());
             if (!oldFormat) {
                 final StringBuilder builder = new StringBuilder();
                 builder.append("VMSnapshot on primary storage usage");