Source:
<code>private void initVmTemplate() { List<OvfEntityData> ovfEntityList = unregisteredOVFDataDao.getByEntityIdAndStorageDomain(getParameters().getContainerId(), getParameters().getStorageDomainId()); if (!ovfEntityList.isEmpty()) { try { ovfEntityData = ovfEntityList.get(0); FullEntityOvfData fullEntityOvfData = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()); vmTemplateFromConfiguration = fullEntityOvfData.getVmTemplate(); if (Guid.isNullOrEmpty(getParameters().getClusterId())) { mapCluster(fullEntityOvfData); } vmTemplateFromConfiguration.setClusterId(getParameters().getClusterId()); <START> drMappingHelper.mapVnicProfiles(vmTemplateFromConfiguration.getInterfaces(), getParameters().getExternalVnicProfileMappings()); <END> setVmTemplate(vmTemplateFromConfiguration); setEffectiveCompatibilityVersion(CompatibilityVersionUtils.getEffective(getVmTemplate(), this::getCluster)); vmHandler.updateMaxMemorySize(getVmTemplate(), getEffectiveCompatibilityVersion()); getParameters().setVmTemplate(vmTemplateFromConfiguration); getParameters().setDestDomainId(ovfEntityData.getStorageDomainId()); getParameters().setSourceDomainId(ovfEntityData.getStorageDomainId()); getParameters().setDbUsers(fullEntityOvfData.getDbUsers()); getParameters().setUserToRoles(fullEntityOvfData.getUserToRoles()); if (getParameters().getDiskTemplateMap() != null) { ArrayList imageList = new ArrayList<>(getParameters().getDiskTemplateMap().values()); vmTemplateFromConfiguration.setDiskList(imageList); ensureDomainMap(imageList, getParameters().getDestDomainId()); } } catch (OvfReaderException e) { log.error("Failed to parse a given ovf configuration: {}:\n{}", e.getMessage(), ovfEntityData.getOvfData()); log.debug("Exception", e); } } setClusterId(getParameters().getClusterId()); if (getCluster() != null) { setStoragePoolId(getCluster().getStoragePoolId()); } }</code><technical_language>this line validation in line 107</technical_language>

Target:
private void initVmTemplate() { List<OvfEntityData> ovfEntityList = unregisteredOVFDataDao.getByEntityIdAndStorageDomain(getParameters().getContainerId(), getParameters().getStorageDomainId()); if (!ovfEntityList.isEmpty()) { try { ovfEntityData = ovfEntityList.get(0); FullEntityOvfData fullEntityOvfData = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()); vmTemplateFromConfiguration = fullEntityOvfData.getVmTemplate(); if (Guid.isNullOrEmpty(getParameters().getClusterId())) { mapCluster(fullEntityOvfData); } vmTemplateFromConfiguration.setClusterId(getParameters().getClusterId()); setVmTemplate(vmTemplateFromConfiguration); setEffectiveCompatibilityVersion(CompatibilityVersionUtils.getEffective(getVmTemplate(), this::getCluster)); vmHandler.updateMaxMemorySize(getVmTemplate(), getEffectiveCompatibilityVersion()); getParameters().setVmTemplate(vmTemplateFromConfiguration); getParameters().setDestDomainId(ovfEntityData.getStorageDomainId()); getParameters().setSourceDomainId(ovfEntityData.getStorageDomainId()); getParameters().setDbUsers(fullEntityOvfData.getDbUsers()); getParameters().setUserToRoles(fullEntityOvfData.getUserToRoles()); if (getParameters().getDiskTemplateMap() != null) { ArrayList imageList = new ArrayList<>(getParameters().getDiskTemplateMap().values()); vmTemplateFromConfiguration.setDiskList(imageList); ensureDomainMap(imageList, getParameters().getDestDomainId()); } } catch (OvfReaderException e) { log.error("Failed to parse a given ovf configuration: {}:\n{}", e.getMessage(), ovfEntityData.getOvfData()); log.debug("Exception", e); } } setClusterId(getParameters().getClusterId()); if (getCluster() != null) { setStoragePoolId(getCluster().getStoragePoolId()); } }