Source:
<code>protected void executeCommand() { lockImage(); VDSReturnValue vdsReturnValue = null; Guid sourceDomainId = getParameters().getSourceDomainId() != null ? getParameters().getSourceDomainId() : getDiskImage().getStorageIds().get(0); Guid taskId = persistAsyncTaskPlaceHolder(getParameters().getParentCommand()); if (getParameters().getUseCopyCollapse()) { vdsReturnValue = runVdsCommand( VDSCommandType.CopyImage, new CopyImageVDSCommandParameters(getStorageDomain().getStoragePoolId(), sourceDomainId, getParameters() .getContainerId(), getParameters().getImageGroupID(), getParameters() .getImageId(), getParameters().getDestImageGroupId(), getParameters().getDestinationImageId(), "", getParameters().getStorageDomainId(), getParameters() .getCopyVolumeType(), getParameters().getVolumeFormat(), getVolumeTypeForDomain(getParameters().getStorageDomainId()), isWipeAfterDelete(), getParameters() .getForceOverride())); } else { vdsReturnValue = runVdsCommand( VDSCommandType.MoveImageGroup, new MoveImageGroupVDSCommandParameters( getDiskImage() != null ? getDiskImage().getStoragePoolId() : getStorageDomain().getStoragePoolId(), sourceDomainId, getDiskImage() != null ? getDiskImage().getId() : getParameters().getImageGroupID(), getParameters().getStorageDomainId(), getParameters().getContainerId(), ImageOperation.Copy, isWipeAfterDelete(), getParameters().getForceOverride())); } if (vdsReturnValue.getSucceeded()) { AsyncTaskCreationInfo taskCreationInfo = vdsReturnValue.getCreationInfo(); getReturnValue().getInternalVdsmTaskIdList().add( createTask(taskId, taskCreationInfo, getParameters().getParentCommand(), VdcObjectType.Storage, sourceDomainId, getParameters().getStorageDomainId())); if (!shouldUpdateStorageDisk() && getParameters().getAddImageDomainMapping()) { getImageStorageDomainMapDao().save (new image_storage_domain_map(getParameters().getImageId(), getParameters().getStorageDomainId(), getParameters().getQuotaId(), <START> getImage().getDiskProfileId())); <END> } setSucceeded(true); } }</code><technical_language>image is copied another domain, profile is set a profile of new domain</technical_language>

Target:
protected void executeCommand() { lockImage(); VDSReturnValue vdsReturnValue = null; Guid sourceDomainId = getParameters().getSourceDomainId() != null ? getParameters().getSourceDomainId() : getDiskImage().getStorageIds().get(0); Guid taskId = persistAsyncTaskPlaceHolder(getParameters().getParentCommand()); if (getParameters().getUseCopyCollapse()) { vdsReturnValue = runVdsCommand( VDSCommandType.CopyImage, new CopyImageVDSCommandParameters(getStorageDomain().getStoragePoolId(), sourceDomainId, getParameters() .getContainerId(), getParameters().getImageGroupID(), getParameters() .getImageId(), getParameters().getDestImageGroupId(), getParameters().getDestinationImageId(), "", getParameters().getStorageDomainId(), getParameters() .getCopyVolumeType(), getParameters().getVolumeFormat(), getVolumeTypeForDomain(getParameters().getStorageDomainId()), isWipeAfterDelete(), getParameters() .getForceOverride())); } else { vdsReturnValue = runVdsCommand( VDSCommandType.MoveImageGroup, new MoveImageGroupVDSCommandParameters( getDiskImage() != null ? getDiskImage().getStoragePoolId() : getStorageDomain().getStoragePoolId(), sourceDomainId, getDiskImage() != null ? getDiskImage().getId() : getParameters().getImageGroupID(), getParameters().getStorageDomainId(), getParameters().getContainerId(), ImageOperation.Copy, isWipeAfterDelete(), getParameters().getForceOverride())); } if (vdsReturnValue.getSucceeded()) { AsyncTaskCreationInfo taskCreationInfo = vdsReturnValue.getCreationInfo(); getReturnValue().getInternalVdsmTaskIdList().add( createTask(taskId, taskCreationInfo, getParameters().getParentCommand(), VdcObjectType.Storage, sourceDomainId, getParameters().getStorageDomainId())); if (!shouldUpdateStorageDisk() && getParameters().getAddImageDomainMapping()) { getImageStorageDomainMapDao().save (new image_storage_domain_map(getParameters().getImageId(), getParameters().getStorageDomainId(), getParameters().getQuotaId(), getParameters().getDiskProfileId())); } setSucceeded(true); } }