use of org.ovirt.engine.core.bll.network.host.VfScheduler in project ovirt-engine by oVirt.
the class NetworkPolicyUnit method validatePassthroughVnics.
private ValidationResult validatePassthroughVnics(Guid vmId, VDS host, List<VmNetworkInterface> vnics) {
VfScheduler vfScheduler = Injector.get(VfScheduler.class);
List<String> problematicVnics = vfScheduler.validatePassthroughVnics(vmId, host.getId(), vnics);
if (!problematicVnics.isEmpty()) {
String vnicsString = StringUtils.join(problematicVnics, ", ");
log.warn("host {} doesn't contain suitable virtual functions for VM nics {}", host.getName(), vnicsString);
return new ValidationResult(EngineMessage.VAR__DETAIL__NO_SUITABLE_VF, String.format("$vnicNames %1$s", vnicsString));
}
return ValidationResult.VALID;
}
Aggregations