You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/06/17 13:49:37 UTC

git commit: updated refs/heads/4.4 to 5cc5483

Repository: cloudstack
Updated Branches:
  refs/heads/4.4 c82b61a92 -> 5cc5483a7


CLOUDSTACK-5150 - set the template size from source

Signed-off-by: Daan Hoogland <da...@onecht.net>
(cherry picked from commit 883d8f11196e9ca55324bcf075880e077a2d3df3)


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

Branch: refs/heads/4.4
Commit: 5cc5483a7895e7876e336349323a5ea5598d5137
Parents: c82b61a
Author: Girish chaudhari <gi...@sungard.com>
Authored: Mon May 19 06:16:20 2014 +0000
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Jun 17 13:49:25 2014 +0200

----------------------------------------------------------------------
 .../src/com/cloud/resource/SimulatorStorageProcessor.java          | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5cc5483a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
index 8a78b87..bdb3277 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/resource/SimulatorStorageProcessor.java
@@ -95,9 +95,11 @@ public class SimulatorStorageProcessor implements StorageProcessor {
     @Override
     public Answer createTemplateFromVolume(CopyCommand cmd) {
         DataTO destData = cmd.getDestTO();
+        VolumeObjectTO srcData = (VolumeObjectTO)cmd.getSrcTO();
         TemplateObjectTO template = new TemplateObjectTO();
         template.setPath(template.getName());
         template.setFormat(Storage.ImageFormat.RAW);
+        template.setSize(srcData.getSize());
         DataStoreTO imageStore = destData.getDataStore();
         if (!(imageStore instanceof NfsTO)) {
             return new CopyCmdAnswer("unsupported protocol");