You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ni...@apache.org on 2013/08/19 13:46:53 UTC

git commit: updated refs/heads/4.2 to 836ee4b

Updated Branches:
  refs/heads/4.2 a22d92f1b -> 836ee4b13


CLOUDSTACK-4386
KVM - Create template from volume
Vmware - Create template from volume / Create template from snapshot
send the physical size in the copycommand which accordingly will populate template store ref and the usage_event tables with the right physical size
Signed off by : nitin mehta<ni...@citrix.com>


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

Branch: refs/heads/4.2
Commit: 836ee4b13937a242b69ead7470a0c3f6e3e3a8b0
Parents: a22d92f
Author: Nitin Mehta <ni...@citrix.com>
Authored: Mon Aug 19 17:16:38 2013 +0530
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Mon Aug 19 17:16:38 2013 +0530

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java  | 1 +
 .../src/com/cloud/storage/resource/VmwareStorageProcessor.java     | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/836ee4b1/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
index 81ab6aa..95a426a 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
@@ -529,6 +529,7 @@ public class KVMStorageProcessor implements StorageProcessor {
             TemplateObjectTO newTemplate = new TemplateObjectTO();
             newTemplate.setPath(templateFolder + File.separator + templateName + ".qcow2");
             newTemplate.setSize(info.virtualSize);
+            newTemplate.setPhysicalSize(info.size);
             newTemplate.setFormat(ImageFormat.QCOW2);
             return new CopyCmdAnswer(newTemplate);
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/836ee4b1/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index 8fd419a..38b2a67 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -738,6 +738,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
             newTemplate.setPath(result.first());
             newTemplate.setFormat(ImageFormat.OVA);
             newTemplate.setSize(result.third());
+            newTemplate.setPhysicalSize(result.second());
             return new CopyCmdAnswer(newTemplate);
 
         } catch (Throwable e) {
@@ -933,6 +934,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
 
             TemplateObjectTO newTemplate = new TemplateObjectTO();
             newTemplate.setPath(result.first());
+            newTemplate.setPhysicalSize(result.second());
             newTemplate.setSize(result.third());
             newTemplate.setFormat(ImageFormat.OVA);
             return new CopyCmdAnswer(newTemplate);