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

bhaisaab 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 4b38d36  CLOUDSTACK-9915  ListSnapshots API does not provide virtual 
size information of the snapshots (#2101)
4b38d36 is described below

commit 4b38d362842aab1ff459d76f75e09c19fe0fa6f0
Author: vedulasantosh <[email protected]>
AuthorDate: Thu Aug 24 16:51:13 2017 +0530

    CLOUDSTACK-9915  ListSnapshots API does not provide virtual size 
information of the snapshots (#2101)
---
 api/src/org/apache/cloudstack/api/ApiConstants.java              | 1 +
 api/src/org/apache/cloudstack/api/response/SnapshotResponse.java | 8 ++++++++
 server/src/com/cloud/api/ApiResponseHelper.java                  | 1 +
 3 files changed, 10 insertions(+)

diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java 
b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 6421fb3..b77b83a 100644
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -653,6 +653,7 @@ public class ApiConstants {
     public static final String OVM3_CLUSTER = "ovm3cluster";
     public static final String OVM3_VIP = "ovm3vip";
     public static final String CLEAN_UP_DETAILS = "cleanupdetails";
+    public static final String VIRTUAL_SIZE = "virtualsize";
     public static final String NETSCALER_CONTROLCENTER_ID = 
"netscalercontrolcenterid";
     public static final String NETSCALER_SERVICEPACKAGE_ID = 
"netscalerservicepackageid";
 
diff --git a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java 
b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
index a49a4e3..bb2ff7f 100644
--- a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java
@@ -112,6 +112,10 @@ public class SnapshotResponse extends BaseResponse 
implements ControlledEntityRe
     @Param(description = "display name of the os on volume")
     private String osDisplayName;
 
+    @SerializedName(ApiConstants.VIRTUAL_SIZE)
+    @Param(description = "virtual size of backedup snapshot on image store")
+    private long virtualSize;
+
     @Override
     public String getObjectId() {
         return this.getId();
@@ -221,4 +225,8 @@ public class SnapshotResponse extends BaseResponse 
implements ControlledEntityRe
     public void setOsDisplayName(String osDisplayName) {
         this.osDisplayName = osDisplayName;
     }
+
+    public void setVirtualSize(long virtualSize) {
+        this.virtualSize = virtualSize;
+    }
 }
\ No newline at end of file
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java 
b/server/src/com/cloud/api/ApiResponseHelper.java
index 80633e1..82f9397 100644
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -480,6 +480,7 @@ public class ApiResponseHelper implements ResponseGenerator 
{
             snapshotResponse.setVolumeId(volume.getUuid());
             snapshotResponse.setVolumeName(volume.getName());
             snapshotResponse.setVolumeType(volume.getVolumeType().name());
+            snapshotResponse.setVirtualSize(volume.getSize());
             DataCenter zone = 
ApiDBUtils.findZoneById(volume.getDataCenterId());
             if (zone != null) {
                 snapshotResponse.setZoneId(zone.getUuid());

-- 
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].

Reply via email to