@Override
public void copyAsync(Map<VolumeInfo, DataStore> volumeMap, VirtualMachineTO vmTo, Host srcHost, Host destHost,
AsyncCompletionCallback<CopyCommandResult> callback) {
DataMotionStrategy strategy = storageStrategyFactory.getDataMotionStrategy(volumeMap, srcHost, destHost);
if (strategy == null) {
List<String> volumeIds = new LinkedList<String>();
for (final VolumeInfo volumeInfo : volumeMap.keySet()) {
volumeIds.add(volumeInfo.getUuid());
}
throw new CloudRuntimeException("Can't find strategy to move data. "+
"Source Host: "+srcHost.getName()+", Destination Host: "+destHost.getName()+
", Volume UUIDs: "+StringUtils.join(volumeIds, ","));
}
strategy.copyAsync(volumeMap, vmTo, srcHost, destHost, callback);
}