Repository: cloudstack Updated Branches: refs/heads/4.4-forward b0d726a87 -> 883d8f111
CLOUDSTACK-5150 - set the template size from source Signed-off-by: Daan Hoogland <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/883d8f11 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/883d8f11 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/883d8f11 Branch: refs/heads/4.4-forward Commit: 883d8f11196e9ca55324bcf075880e077a2d3df3 Parents: b0d726a Author: Girish chaudhari <[email protected]> Authored: Mon May 19 06:16:20 2014 +0000 Committer: Daan Hoogland <[email protected]> Committed: Tue Jun 17 13:41:23 2014 +0200 ---------------------------------------------------------------------- .../src/com/cloud/resource/SimulatorStorageProcessor.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/883d8f11/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");
