Search in sources :

Example 6 with DetectConnectedDevices

use of org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices in project open-kilda by telstra.

the class FlowValidatorTest method shouldNotFailOnSwapWhenDifferentEndpointsOnFirstAndSecondFlow.

@Test
public void shouldNotFailOnSwapWhenDifferentEndpointsOnFirstAndSecondFlow() throws InvalidFlowException {
    RequestedFlow firstFlow = RequestedFlow.builder().flowId("firstFlow").srcSwitch(SWITCH_ID_1).srcPort(10).srcVlan(11).destSwitch(SWITCH_ID_2).destPort(12).destVlan(13).detectConnectedDevices(new DetectConnectedDevices()).build();
    RequestedFlow secondFlow = RequestedFlow.builder().flowId("secondFlow").srcSwitch(SWITCH_ID_1).srcPort(14).srcVlan(15).destSwitch(SWITCH_ID_2).destPort(16).destVlan(17).detectConnectedDevices(new DetectConnectedDevices()).build();
    flowValidator.checkForEqualsEndpoints(firstFlow, secondFlow);
}
Also used : DetectConnectedDevices(org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices) RequestedFlow(org.openkilda.wfm.topology.flowhs.model.RequestedFlow) Test(org.junit.Test)

Example 7 with DetectConnectedDevices

use of org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices in project open-kilda by telstra.

the class FlowValidatorTest method shouldFailOnSwapWhenEqualsEndpointsOnFirstAndSecondFlow.

@Test(expected = InvalidFlowException.class)
public void shouldFailOnSwapWhenEqualsEndpointsOnFirstAndSecondFlow() throws InvalidFlowException {
    RequestedFlow firstFlow = RequestedFlow.builder().flowId("firstFlow").srcSwitch(SWITCH_ID_1).srcPort(10).srcVlan(11).destSwitch(SWITCH_ID_2).destPort(12).destVlan(13).detectConnectedDevices(new DetectConnectedDevices()).build();
    RequestedFlow secondFlow = RequestedFlow.builder().flowId("secondFlow").srcSwitch(SWITCH_ID_1).srcPort(10).srcVlan(11).destSwitch(SWITCH_ID_2).destPort(12).destVlan(13).detectConnectedDevices(new DetectConnectedDevices()).build();
    flowValidator.checkForEqualsEndpoints(firstFlow, secondFlow);
}
Also used : DetectConnectedDevices(org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices) RequestedFlow(org.openkilda.wfm.topology.flowhs.model.RequestedFlow) Test(org.junit.Test)

Example 8 with DetectConnectedDevices

use of org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices in project open-kilda by telstra.

the class FlowValidatorTest method shouldNotFailOnCreateSingleTaggedFlowOnWbSeries.

@Test
public void shouldNotFailOnCreateSingleTaggedFlowOnWbSeries() throws InvalidFlowException, UnavailableFlowEndpointException {
    RequestedFlow flow = RequestedFlow.builder().flowId("firstFlow").srcSwitch(SWITCH_ID_1).srcPort(10).srcInnerVlan(11).destSwitch(SWITCH_ID_2).destPort(12).destInnerVlan(13).detectConnectedDevices(new DetectConnectedDevices()).build();
    flowValidator.validateQinQonWB(flow);
}
Also used : DetectConnectedDevices(org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices) RequestedFlow(org.openkilda.wfm.topology.flowhs.model.RequestedFlow) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 DetectConnectedDevices (org.openkilda.wfm.topology.flowhs.model.DetectConnectedDevices)8 RequestedFlow (org.openkilda.wfm.topology.flowhs.model.RequestedFlow)8 Flow (org.openkilda.model.Flow)1