CLOUDSTACK-3107: fix attach upload volume

This commit is contained in:
Edison Su 2013-07-29 18:58:42 -07:00
parent 9278b2c343
commit f0f55226de
2 changed files with 937 additions and 918 deletions

View File

@ -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 &&