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/07/30 03:59:26 UTC

[2/2] git commit: updated refs/heads/4.2 to 6533e65

CLOUDSTACK-3107: fix attach upload volume


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

Branch: refs/heads/4.2
Commit: 6533e6559b1221e08cbf3a385a2414d7d619e1e8
Parents: 0f76572
Author: Edison Su <su...@gmail.com>
Authored: Mon Jul 29 18:58:42 2013 -0700
Committer: Edison Su <su...@gmail.com>
Committed: Mon Jul 29 18:59:10 2013 -0700

----------------------------------------------------------------------
 .../com/cloud/hypervisor/guru/VMwareGuru.java   |   11 +-
 .../resource/VmwareStorageProcessor.java        | 2104 +++++++++---------
 2 files changed, 1067 insertions(+), 1048 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6533e655/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
index d1392c4..e9495dc 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java
@@ -307,10 +307,17 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru {
             DataTO destData = cpyCommand.getDestTO();
             DataStoreTO destStoreTO = destData.getDataStore();
 
-            if (!(HypervisorType.VMware == srcData.getHypervisorType() ||
+            if ((HypervisorType.VMware == srcData.getHypervisorType() ||
                     HypervisorType.VMware == destData.getHypervisorType()
             )) {
-                return new Pair<Boolean, Long>(Boolean.FALSE, new Long(hostId));
+                needDelegation = true;
+            }
+
+            if (srcData.getObjectType() == DataObjectType.VOLUME) {
+                VolumeObjectTO volumeObjectTO = (VolumeObjectTO)srcData;
+                if (Storage.ImageFormat.OVA == volumeObjectTO.getFormat()) {
+                    needDelegation = true;
+                }
             }
 
             if (destData.getObjectType() == DataObjectType.VOLUME && destStoreTO.getRole() == DataStoreRole.Primary &&