Source:
protected void startImageTransferSession() { if (!initializeVds()) { log.error("Could not find a suitable host for image data transfer"); updateEntityPhaseToStoppedBySystem( AuditLogType.TRANSFER_IMAGE_STOPPED_BY_SYSTEM_MISSING_HOST); return; } Guid imagedTicketId = Guid.newGuid(); String imagePath; try { imagePath = prepareImage(getVdsId(), imagedTicketId); } catch (Exception e) { log.error("Failed to prepare image for transfer session: {}", e.getMessage(), e); return; } if (!addImageTicketToDaemon(imagedTicketId, imagePath)) { log.error("Failed to add image ticket to ovirt-imageio-daemon"); updateEntityPhaseToStoppedBySystem( AuditLogType.TRANSFER_IMAGE_STOPPED_BY_SYSTEM_FAILED_TO_ADD_TICKET_TO_DAEMON); return; } if (!addImageTicketToProxy(imagedTicketId, getImageDaemonUri(getVds().getHostName()))) { log.error("Failed to add image ticket to ovirt-imageio-proxy"); if (getParameters().isTransferringViaBrowser()) { updateEntityPhaseToStoppedBySystem( AuditLogType.TRANSFER_IMAGE_STOPPED_BY_SYSTEM_FAILED_TO_ADD_TICKET_TO_PROXY); return; } auditLog(this, AuditLogType.TRANSFER_FAILED_TO_ADD_TICKET_TO_PROXY); } log.info("Started transfer session with ticket id {}, timeout seconds", imagedTicketId.toString(), getClientTicketLifetime()); ImageTransfer updates = new ImageTransfer(); updates.setVdsId(getVdsId()); updates.setImagedTicketId(imagedTicketId); updates.setProxyUri(getProxyUri() + IMAGES_PATH); updates.setDaemonUri(getImageDaemonUri(getVds().getHostName()) + IMAGES_PATH); updateEntity(updates); setNewSessionExpiration(getClientTicketLifetime()); updateEntityPhase(ImageTransferPhase.TRANSFERRING); }

Target:
protected void startImageTransferSession() { if (!initializeVds()) { log.error("Could not find a suitable host for image data transfer"); updateEntityPhaseToStoppedBySystem( AuditLogType.TRANSFER_IMAGE_STOPPED_BY_SYSTEM_MISSING_HOST); return; } Guid imagedTicketId = Guid.newGuid(); String imagePath; try { imagePath = prepareImage(getVdsId(), imagedTicketId); } catch (Exception e) { log.error("Failed to prepare image for transfer session: {}", e.getMessage(), e); return; } if (!addImageTicketToDaemon(imagedTicketId, imagePath)) { log.error("Failed to add image ticket to ovirt-imageio-daemon"); updateEntityPhaseToStoppedBySystem( AuditLogType.TRANSFER_IMAGE_STOPPED_BY_SYSTEM_FAILED_TO_ADD_TICKET_TO_DAEMON); return; } if (!addImageTicketToProxy(imagedTicketId, getImageDaemonUri(getVds().getHostName()))) { log.error("Failed to add image ticket to ovirt-imageio-proxy"); if (getParameters().isTransferringViaBrowser()) { updateEntityPhaseToStoppedBySystem( AuditLogType.TRANSFER_IMAGE_STOPPED_BY_SYSTEM_FAILED_TO_ADD_TICKET_TO_PROXY); return; } auditLog(this, AuditLogType.TRANSFER_FAILED_TO_ADD_TICKET_TO_PROXY); } log.info("Started transfer session with transfer id {}, timeout seconds", getParameters().getCommandId().toString(), getClientTicketLifetime()); ImageTransfer updates = new ImageTransfer(); updates.setVdsId(getVdsId()); updates.setImagedTicketId(imagedTicketId); updates.setProxyUri(getProxyUri() + IMAGES_PATH); updates.setDaemonUri(getImageDaemonUri(getVds().getHostName()) + IMAGES_PATH); updateEntity(updates); setNewSessionExpiration(getClientTicketLifetime()); updateEntityPhase(ImageTransferPhase.TRANSFERRING); }