use of org.openkilda.model.FlowEndpoint in project open-kilda by telstra.
the class MultiTableServer42IngressRuleGeneratorTest method inPortOverlappingFlowTest.
@Test
public void inPortOverlappingFlowTest() {
Flow overlappingFlow = buildOverlappingFlow(PORT_NUMBER_1, OUTER_VLAN_ID_2, INNER_VLAN_ID_1);
MultiTableServer42IngressRuleGenerator generator = buildGenerator(overlappingFlow);
FlowEndpoint ingressEndpoint = new FlowEndpoint(SWITCH_ID_1, PORT_NUMBER_1, OUTER_VLAN_ID_1, INNER_VLAN_ID_1);
assertTrue(generator.needToBuildServer42PreIngressRule(ingressEndpoint));
assertFalse(generator.needToBuildServer42InputRule(ingressEndpoint));
}
use of org.openkilda.model.FlowEndpoint in project open-kilda by telstra.
the class MultiTableServer42IngressRuleGeneratorTest method overlappingOfFullFlowTest.
@Test
public void overlappingOfFullFlowTest() {
Flow overlappingFlow = buildOverlappingFlow(PORT_NUMBER_1, OUTER_VLAN_ID_1, INNER_VLAN_ID_1);
MultiTableServer42IngressRuleGenerator generator = buildGenerator(overlappingFlow);
FlowEndpoint ingressEndpoint = new FlowEndpoint(SWITCH_ID_1, PORT_NUMBER_1, 0, 0);
assertFalse(generator.needToBuildServer42PreIngressRule(ingressEndpoint));
assertFalse(generator.needToBuildServer42InputRule(ingressEndpoint));
}
use of org.openkilda.model.FlowEndpoint in project open-kilda by telstra.
the class MultiTableServer42IngressRuleGeneratorTest method outerVlanInPortOverlappingFlowTest.
@Test
public void outerVlanInPortOverlappingFlowTest() {
Flow overlappingFlow = buildOverlappingFlow(PORT_NUMBER_1, OUTER_VLAN_ID_1, INNER_VLAN_ID_1);
MultiTableServer42IngressRuleGenerator generator = buildGenerator(overlappingFlow);
FlowEndpoint ingressEndpoint = new FlowEndpoint(SWITCH_ID_1, PORT_NUMBER_1, OUTER_VLAN_ID_1, INNER_VLAN_ID_1);
assertFalse(generator.needToBuildServer42PreIngressRule(ingressEndpoint));
assertFalse(generator.needToBuildServer42InputRule(ingressEndpoint));
}
use of org.openkilda.model.FlowEndpoint in project open-kilda by telstra.
the class SpeakerFlowSegmentRequestBuilderTest method verifyReverseIngressRequest.
private IngressFlowSegmentRequest verifyReverseIngressRequest(Flow flow, FlowSegmentRequest rawRequest) {
FlowPath path = Objects.requireNonNull(flow.getReversePath());
IngressFlowSegmentRequest request = verifyCommonIngressRequest(flow, path, rawRequest);
assertEquals(flow.getDestSwitchId(), request.getSwitchId());
FlowEndpoint endpoint = new FlowEndpoint(flow.getDestSwitchId(), flow.getDestPort(), flow.getDestVlan());
assertEquals(endpoint, request.getEndpoint());
return request;
}
use of org.openkilda.model.FlowEndpoint in project open-kilda by telstra.
the class SpeakerFlowSegmentRequestBuilderTest method verifyForwardEgressRequest.
private void verifyForwardEgressRequest(Flow flow, FlowSegmentRequest rawRequest) {
FlowPath path = Objects.requireNonNull(flow.getForwardPath());
EgressFlowSegmentRequest request = verifyCommonEgressRequest(flow, path, rawRequest);
FlowEndpoint expectedEndpoint = new FlowEndpoint(flow.getDestSwitchId(), flow.getDestPort(), flow.getDestVlan());
assertEquals(expectedEndpoint, request.getEndpoint());
FlowEndpoint expectedIngressEndpoint = new FlowEndpoint(flow.getSrcSwitchId(), flow.getSrcPort(), flow.getSrcVlan());
assertEquals(expectedIngressEndpoint, request.getIngressEndpoint());
}
Aggregations