You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/02/14 02:11:25 UTC

[46/50] [abbrv] git commit: refs/heads/storage_refactor - use correct disk offering id

use correct disk offering id


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

Branch: refs/heads/storage_refactor
Commit: e8cadf5624d0f9c778c4dcd21ff26f8bedf5c319
Parents: a0df54b
Author: Edison Su <su...@gmail.com>
Authored: Thu Feb 7 14:57:06 2013 -0800
Committer: Edison Su <su...@gmail.com>
Committed: Wed Feb 13 15:28:44 2013 -0800

----------------------------------------------------------------------
 .../storage/motion/AncientDataMotionStrategy.java  |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e8cadf56/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
index d686336..70f65c7 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
@@ -282,10 +282,10 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
     }
     
     protected String cloneVolume(DataObject template, DataObject volume) {
-        
-        DiskOfferingVO offering = diskOfferingDao.findById(volume.getId());
-        VMTemplateStoragePoolVO  tmpltStoredOn =  templatePoolDao.findByPoolTemplate(template.getDataStore().getId(), template.getId());
         VolumeInfo volInfo = (VolumeInfo)volume;
+        DiskOfferingVO offering = diskOfferingDao.findById(volInfo.getDiskOfferingId());
+        VMTemplateStoragePoolVO  tmpltStoredOn =  templatePoolDao.findByPoolTemplate(template.getDataStore().getId(), template.getId());
+        
         DiskProfile diskProfile = new DiskProfile(volInfo, offering,
                 null);
         CreateCommand cmd = new CreateCommand(diskProfile,