Repository: cloudstack Updated Branches: refs/heads/master 7c15f148d -> 591148c46
CLOUDSTACK-5150 - set the template size from source Signed-off-by: Daan Hoogland <[email protected]> (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/591148c4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/591148c4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/591148c4 Branch: refs/heads/master Commit: 591148c4641fd079d7b9b85d30e0c297212984e1 Parents: 7c15f14 Author: Girish chaudhari <[email protected]> Authored: Mon May 19 06:16:20 2014 +0000 Committer: Daan Hoogland <[email protected]> Committed: Tue Jun 17 13:44:04 2014 +0200 ---------------------------------------------------------------------- .../src/com/cloud/resource/SimulatorStorageProcessor.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/591148c4/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");
