cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanjaytripa...@apache.org
Subject git commit: updated refs/heads/master to 9044a02
Date Fri, 19 Jun 2015 10:29:58 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 92a9ee097 -> 9044a02d9


VM Snapshot Usage for DATA disk is reported as the size of the DATA disk instead of the actual
snapshot size.
This closes #485


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9044a02d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9044a02d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9044a02d

Branch: refs/heads/master
Commit: 9044a02d9aa7f07ab2aef50e29abce9b5d59327b
Parents: 92a9ee0
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Fri Jun 19 15:53:38 2015 +0530
Committer: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Committed: Fri Jun 19 15:55:21 2015 +0530

----------------------------------------------------------------------
 .../hypervisor/xenserver/resource/CitrixResourceBase.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9044a02d/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
index aa02d00..8ed4ffc 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
@@ -3162,6 +3162,15 @@ public abstract class CitrixResourceBase implements ServerResource,
HypervisorRe
     }
 
     public long getVMSnapshotChainSize(final Connection conn, final VolumeObjectTO volumeTo,
final String vmName) throws BadServerResponse, XenAPIException, XmlRpcException {
+        if (volumeTo.getVolumeType() == Volume.Type.DATADISK) {
+            VDI dataDisk = VDI.getByUuid(conn, volumeTo.getPath());
+            if (dataDisk != null) {
+                String dataDiskName = dataDisk.getNameLabel(conn);
+                if (dataDiskName != null && !dataDiskName.isEmpty()) {
+                    volumeTo.setName(dataDiskName);
+                }
+            }
+        }
         final Set<VDI> allvolumeVDIs = VDI.getByNameLabel(conn, volumeTo.getName());
         long size = 0;
         for (final VDI vdi : allvolumeVDIs) {


Mime
View raw message