cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtutkow...@apache.org
Subject git commit: updated refs/heads/master to de6a311
Date Fri, 29 Aug 2014 05:19:18 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 0e79cd117 -> de6a3112b


Update to volume-resize logic

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

Branch: refs/heads/master
Commit: de6a3112b6b80952d1598acaa112ac50a3ef9d32
Parents: 0e79cd1
Author: Mike Tutkowski <mike.tutkowski@solidfire.com>
Authored: Thu Aug 28 23:19:04 2014 -0600
Committer: Mike Tutkowski <mike.tutkowski@solidfire.com>
Committed: Thu Aug 28 23:19:04 2014 -0600

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/de6a3112/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 0c7c6e5..c662165 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -710,7 +710,11 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
         _accountMgr.checkAccess(CallContext.current().getCallingAccount(), null, true, volume);
 
         DiskOfferingVO diskOffering = _diskOfferingDao.findById(volume.getDiskOfferingId());
-        DiskOfferingVO newDiskOffering = _diskOfferingDao.findById(cmd.getNewDiskOfferingId());
+        DiskOfferingVO newDiskOffering = null;
+
+        if (cmd.getNewDiskOfferingId() != null && volume.getDiskOfferingId() != cmd.getNewDiskOfferingId())
{
+            newDiskOffering = _diskOfferingDao.findById(cmd.getNewDiskOfferingId());
+        }
 
         /* Only works for KVM/XenServer/VMware (or "Any") for now, and volumes with 'None'
since they're just allocated in DB */
 


Mime
View raw message