Source:
protected void executeCommand() { lockImage(); VDSReturnValue vdsReturnValue = null; Guid sourceDomainId = getParameters().getSourceDomainId() != null ? getParameters().getSourceDomainId() .getValue() : getDiskImage().getstorage_ids().get(0); if (getParameters().getUseCopyCollapse()) { vdsReturnValue = runVdsCommand( VDSCommandType.CopyImage, new CopyImageVDSCommandParameters(getStorageDomain().getstorage_pool_id() .getValue(), sourceDomainId, getParameters() .getContainerId(), getParameters().getImageGroupID(), getParameters() .getImageId(), getParameters().getDestImageGroupId(), getParameters().getDestinationImageId(), "", getParameters().getStorageDomainId(), getParameters() .getCopyVolumeType(), getParameters().getVolumeFormat(), getParameters() .getVolumeType(), getParameters().getWipeAfterDelete(), getParameters() .getForceOverride(), getStoragePool().getcompatibility_version().toString())); } else { vdsReturnValue = runVdsCommand( VDSCommandType.MoveImageGroup, new MoveImageGroupVDSCommandParameters(getDiskImage().getstorage_pool_id() .getValue(), sourceDomainId, getDiskImage() .getId(), getParameters().getStorageDomainId(), getParameters().getContainerId(), getParameters().getOperation(), getImage().isWipeAfterDelete(), getParameters().getForceOverride(), getStoragePool() .getcompatibility_version().toString())); } if (vdsReturnValue.getSucceeded()) { AsyncTaskCreationInfo taskCreationInfo = vdsReturnValue.getCreationInfo(); getReturnValue().getInternalTaskIdList().add( createTask(taskCreationInfo, getParameters().getParentCommand(), VdcObjectType.Storage, sourceDomainId, getParameters().getStorageDomainId())); if (!shouldUpdateStorageDisk() && getParameters().getAddImageDomainMapping()) { getImageStorageDomainMapDao().save (new image_storage_domain_map(getParameters().getImageId(), getParameters().getStorageDomainId())); } if (getParameters().getQuotaId() != null) { getImage().setQuotaId(getParameters().getQuotaId()); getImageDao().updateQuotaForImageAndSnapshots(getParameters().getDestImageGroupId(), getParameters().getQuotaId()); } setSucceeded(true); } }

Target:
protected void executeCommand() { lockImage(); VDSReturnValue vdsReturnValue = null; Guid sourceDomainId = getParameters().getSourceDomainId() != null ? getParameters().getSourceDomainId() .getValue() : getDiskImage().getstorage_ids().get(0); if (getParameters().getUseCopyCollapse()) { vdsReturnValue = runVdsCommand( VDSCommandType.CopyImage, new CopyImageVDSCommandParameters(getStorageDomain().getstorage_pool_id() .getValue(), sourceDomainId, getParameters() .getContainerId(), getParameters().getImageGroupID(), getParameters() .getImageId(), getParameters().getDestImageGroupId(), getParameters().getDestinationImageId(), "", getParameters().getStorageDomainId(), getParameters() .getCopyVolumeType(), getParameters().getVolumeFormat(), getParameters() .getVolumeType(), getDestinationDiskImage().isWipeAfterDelete(), getParameters() .getForceOverride(), getStoragePool().getcompatibility_version().toString())); } else { vdsReturnValue = runVdsCommand( VDSCommandType.MoveImageGroup, new MoveImageGroupVDSCommandParameters(getDiskImage().getstorage_pool_id() .getValue(), sourceDomainId, getDiskImage() .getId(), getParameters().getStorageDomainId(), getParameters().getContainerId(), getParameters().getOperation(), getDestinationDiskImage().isWipeAfterDelete(), getParameters().getForceOverride(), getStoragePool() .getcompatibility_version().toString())); } if (vdsReturnValue.getSucceeded()) { AsyncTaskCreationInfo taskCreationInfo = vdsReturnValue.getCreationInfo(); getReturnValue().getInternalTaskIdList().add( createTask(taskCreationInfo, getParameters().getParentCommand(), VdcObjectType.Storage, sourceDomainId, getParameters().getStorageDomainId())); if (!shouldUpdateStorageDisk() && getParameters().getAddImageDomainMapping()) { getImageStorageDomainMapDao().save (new image_storage_domain_map(getParameters().getImageId(), getParameters().getStorageDomainId())); } if (getParameters().getQuotaId() != null) { getDestinationDiskImage().setQuotaId(getParameters().getQuotaId()); getImageDao().updateQuotaForImageAndSnapshots(getParameters().getDestImageGroupId(), getParameters().getQuotaId()); } setSucceeded(true); } }