src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/validation/FlowValidator.java
// TODO: switch to per endpoint based strategy (same as other enpoint related checks)
switch to per endpoint based strategy (same as other enpoint related checks)
switch to per endpoint based strategy ( same as other enpoint related checks )
@VisibleForTesting
    void checkSwitchesSupportLldpAndArpIfNeeded(RequestedFlow requestedFlow) throws InvalidFlowException {
        SwitchId sourceId = requestedFlow.getSrcSwitch();
        SwitchId destinationId = requestedFlow.getDestSwitch();
        List<String> errorMessages = new ArrayList<>();
        if (requestedFlow.getDetectConnectedDevices().isSrcLldp()
                || requestedFlow.getDetectConnectedDevices().isSrcArp()) {
            validateMultiTableProperty(sourceId, errorMessages);
        }
        if (requestedFlow.getDetectConnectedDevices().isDstLldp()
                || requestedFlow.getDetectConnectedDevices().isDstArp()) {
            validateMultiTableProperty(destinationId, errorMessages);
        }
        if (!errorMessages.isEmpty()) {
            throw new InvalidFlowException(String.join(" ", errorMessages), ErrorType.DATA_INVALID);
        }
    }
@ VisibleForTesting void checkSwitchesSupportLldpAndArpIfNeeded ( RequestedFlow requestedFlow ) throws InvalidFlowException { SwitchId sourceId = requestedFlow . getSrcSwitch ( ) ; SwitchId destinationId = requestedFlow . getDestSwitch ( ) ; List < String > errorMessages = new ArrayList < > ( ) ; if ( requestedFlow . getDetectConnectedDevices ( ) . isSrcLldp ( ) || requestedFlow . getDetectConnectedDevices ( ) . isSrcArp ( ) ) { validateMultiTableProperty ( sourceId , errorMessages ) ; } if ( requestedFlow . getDetectConnectedDevices ( ) . isDstLldp ( ) || requestedFlow . getDetectConnectedDevices ( ) . isDstArp ( ) ) { validateMultiTableProperty ( destinationId , errorMessages ) ; } if ( ! errorMessages . isEmpty ( ) ) { throw new InvalidFlowException ( String . join ( " " , errorMessages ) , ErrorType . DATA_INVALID ) ; } }
TODO: switch to per endpoint based strategy (same as other enpoint related checks)
TODO : switch to per endpoint based strategy ( same as other enpoint related checks )