Source:
protected boolean validate() { if (isImagesAlreadyOnTarget()) { if (!validateExternalVnicProfileMapping()) { return false; } ImportValidator importValidator = getImportValidator(); if (!validate(importValidator.validateUnregisteredEntity(vmFromConfiguration, ovfEntityData))) { return false; } if (!validate(importValidator.validateStorageExistForUnregisteredEntity(getImages(), getParameters().isAllowPartialImport(), imageToDestinationDomainMap, failedDisksToImportForAuditLog))) { return false; } if (!validate(importValidator.validateStorageExistsForMemoryDisks(getVm().getSnapshots(), getParameters().isAllowPartialImport(), failedDisksToImportForAuditLog))) { return false; } if (!drMappingHelper.validateAffinityGroupCluster(getParameters().getAffinityGroups(), getClusterId()) && !getParameters().isAllowPartialImport()) { return false; } if (!AffinityRulesUtils.checkForAffinityGroupHostsConflict(getParameters().getAffinityGroups()).isEmpty() && !getParameters().isAllowPartialImport()) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_AFFINITY_RULES_COLLISION); } if (!missingAffinityLabels.isEmpty() && !getParameters().isAllowPartialImport()) { log.error("Missing affinity labels: {}", missingAffinityLabels.stream().collect(Collectors.joining(","))); return failValidation(EngineMessage.AFFINITY_LABEL_NOT_EXISTS); } if (!missingUsers.isEmpty() && !getParameters().isAllowPartialImport()) { log.error("Missing users: {}", missingUsers.stream().collect(Collectors.joining(","))); return failValidation(EngineMessage.USER_MUST_EXIST_IN_DB); } if (!missingRoles.isEmpty() && !getParameters().isAllowPartialImport()) { log.error("Missing roles: {}", missingRoles.stream().collect(Collectors.joining(", "))); return false; } setImagesWithStoragePoolId(getParameters().getStoragePoolId(), getVm().getImages()); } return super.validate(); }

Target:
protected boolean validate() { if (isImagesAlreadyOnTarget()) { if (!validateExternalVnicProfileMapping()) { return false; } ImportValidator importValidator = getImportValidator(); if (!validate(importValidator.validateUnregisteredEntity(vmFromConfiguration, ovfEntityData))) { return false; } if (!validate(importValidator.validateStorageExistForUnregisteredEntity(getImages(), getParameters().isAllowPartialImport(), imageToDestinationDomainMap, failedDisksToImportForAuditLog))) { return false; } if (!validate(importValidator.validateStorageExistsForMemoryDisks(getVm().getSnapshots(), getParameters().isAllowPartialImport(), failedDisksToImportForAuditLog))) { return false; } if (!drMappingHelper.validateAffinityGroupCluster(getParameters().getAffinityGroups(), getClusterId()) && !getParameters().isAllowPartialImport()) { return false; } if (!AffinityRulesUtils.checkForAffinityGroupHostsConflict(getParameters().getAffinityGroups()).isEmpty() && !getParameters().isAllowPartialImport()) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_AFFINITY_RULES_COLLISION); } if (!missingAffinityLabels.isEmpty() && !getParameters().isAllowPartialImport()) { log.error("Missing affinity labels: {}", missingAffinityLabels.stream().collect(Collectors.joining(","))); return failValidation(EngineMessage.AFFINITY_LABEL_NOT_EXISTS); } if (!missingUsers.isEmpty() && !getParameters().isAllowPartialImport()) { log.error("Missing users: {}", missingUsers.stream().collect(Collectors.joining(","))); return failValidation(EngineMessage.USER_MUST_EXIST_IN_DB); } if (!missingRoles.isEmpty() && !getParameters().isAllowPartialImport()) { log.error("Missing roles: {}", missingRoles.stream().collect(Collectors.joining(", "))); return failValidation(EngineMessage.VALIDATION_ROLE_DOES_NOT_EXIST); } setImagesWithStoragePoolId(getParameters().getStoragePoolId(), getVm().getImages()); } return super.validate(); }