mirror of https://github.com/apache/cloudstack.git
Fix HypervisorType dispatch in addFullClone flag helper
Replace invalid switch on Hypervisor.HypervisorType (not a Java enum) with equality checks so cloud-engine-storage-datamotion compiles.
This commit is contained in:
parent
06c6651d36
commit
f3cafb98d0
|
|
@ -280,14 +280,14 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
|
|||
if (dataTO == null) {
|
||||
return dataTO;
|
||||
}
|
||||
switch (dataTO.getHypervisorType()) {
|
||||
case VMware:
|
||||
return addFullCloneAndDiskprovisiongStrictnessFlagOnVMwareDest(dataTO);
|
||||
case XenServer:
|
||||
return addFullCloneAndDiskprovisiongStrictnessFlagOnXenServerDest(dataTO);
|
||||
default:
|
||||
return dataTO;
|
||||
Hypervisor.HypervisorType hypervisorType = dataTO.getHypervisorType();
|
||||
if (Hypervisor.HypervisorType.VMware.equals(hypervisorType)) {
|
||||
return addFullCloneAndDiskprovisiongStrictnessFlagOnVMwareDest(dataTO);
|
||||
}
|
||||
if (Hypervisor.HypervisorType.XenServer.equals(hypervisorType)) {
|
||||
return addFullCloneAndDiskprovisiongStrictnessFlagOnXenServerDest(dataTO);
|
||||
}
|
||||
return dataTO;
|
||||
}
|
||||
|
||||
protected Answer copyObject(DataObject srcData, DataObject destData) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue