Source:
<code>protected boolean performImageVdsmOperation() { setDestinationImageId(Guid.newGuid()); newDiskImage = cloneDiskImage(getDestinationImageId()); newDiskImage.setId(Guid.newGuid()); Guid storagePoolID = newDiskImage.getStoragePoolId() != null ? newDiskImage .getStoragePoolId() : Guid.Empty; <START> VDSReturnValue vdsReturnValue = null; <END> if (isDataOperationsByHSM()) { CopyImageGroupWithDataCommandParameters p = new CopyImageGroupWithDataCommandParameters( storagePoolID, getParameters().getStorageDomainId(), getDestinationStorageDomainId(), getDiskImage().getId(), getImage().getImageId(), newDiskImage.getId(), getDestinationImageId(), newDiskImage.getVolumeFormat(), true); p.setParentParameters(getParameters()); p.setParentCommand(getActionType()); p.setEndProcedure(VdcActionParametersBase.EndProcedure.COMMAND_MANAGED); runInternalAction(VdcActionType.CopyImageGroupWithData, p); return true; } else { Guid taskId = persistAsyncTaskPlaceHolder(VdcActionType.AddVmFromTemplate); try { vdsReturnValue = runVdsCommand(VDSCommandType.CopyImage, PostZeroHandler.fixParametersWithPostZero( new CopyImageVDSCommandParameters(storagePoolID, getParameters().getStorageDomainId(), getVmTemplateId(), getDiskImage().getId(), getImage().getImageId(), newDiskImage.getId(), getDestinationImageId(), "", getDestinationStorageDomainId(), CopyVolumeType.LeafVol, newDiskImage.getVolumeFormat(), newDiskImage.getVolumeType(), getDiskImage().isWipeAfterDelete(), false))); } catch (EngineException e) { log.error("Failed creating snapshot from image id '{}'", getImage().getImageId()); throw e; } if (vdsReturnValue.getSucceeded()) { getTaskIdList().add( createTask(taskId, vdsReturnValue.getCreationInfo(), VdcActionType.AddVmFromTemplate, VdcObjectType.Storage, getParameters().getStorageDomainId(), getDestinationStorageDomainId())); } return vdsReturnValue.getSucceeded(); } }</code><technical_language>definition move else block</technical_language>

Target:
protected boolean performImageVdsmOperation() { setDestinationImageId(Guid.newGuid()); newDiskImage = cloneDiskImage(getDestinationImageId()); newDiskImage.setId(Guid.newGuid()); Guid storagePoolID = newDiskImage.getStoragePoolId() != null ? newDiskImage .getStoragePoolId() : Guid.Empty; if (isDataOperationsByHSM()) { CopyImageGroupWithDataCommandParameters p = new CopyImageGroupWithDataCommandParameters( storagePoolID, getParameters().getStorageDomainId(), getDestinationStorageDomainId(), getDiskImage().getId(), getImage().getImageId(), newDiskImage.getId(), getDestinationImageId(), newDiskImage.getVolumeFormat(), true); p.setParentParameters(getParameters()); p.setParentCommand(getActionType()); p.setEndProcedure(VdcActionParametersBase.EndProcedure.COMMAND_MANAGED); runInternalAction(VdcActionType.CopyImageGroupWithData, p); return true; } else { Guid taskId = persistAsyncTaskPlaceHolder(VdcActionType.AddVmFromTemplate); VDSReturnValue vdsReturnValue; try { vdsReturnValue = runVdsCommand(VDSCommandType.CopyImage, PostZeroHandler.fixParametersWithPostZero( new CopyImageVDSCommandParameters(storagePoolID, getParameters().getStorageDomainId(), getVmTemplateId(), getDiskImage().getId(), getImage().getImageId(), newDiskImage.getId(), getDestinationImageId(), "", getDestinationStorageDomainId(), CopyVolumeType.LeafVol, newDiskImage.getVolumeFormat(), newDiskImage.getVolumeType(), getDiskImage().isWipeAfterDelete(), false))); } catch (EngineException e) { log.error("Failed creating snapshot from image id '{}'", getImage().getImageId()); throw e; } if (vdsReturnValue.getSucceeded()) { getTaskIdList().add( createTask(taskId, vdsReturnValue.getCreationInfo(), VdcActionType.AddVmFromTemplate, VdcObjectType.Storage, getParameters().getStorageDomainId(), getDestinationStorageDomainId())); } return vdsReturnValue.getSucceeded(); } }