use of org.openkilda.floodlight.api.request.OneSwitchFlowRequest in project open-kilda by telstra.
the class SpeakerFlowSegmentRequestBuilderTest method verifyReverseOneSwitchRequest.
private void verifyReverseOneSwitchRequest(Flow flow, FlowSegmentRequest rawRequest) {
FlowPath path = Objects.requireNonNull(flow.getReversePath());
OneSwitchFlowRequest request = verifyCommonOneSwitchRequest(flow, path, rawRequest);
assertEquals(new FlowEndpoint(flow.getDestSwitchId(), flow.getDestPort(), flow.getDestVlan()), request.getEndpoint());
assertEquals(new FlowEndpoint(flow.getSrcSwitchId(), flow.getSrcPort(), flow.getSrcVlan()), request.getEgressEndpoint());
}
use of org.openkilda.floodlight.api.request.OneSwitchFlowRequest in project open-kilda by telstra.
the class SpeakerFlowSegmentRequestBuilderTest method verifyForwardOneSwitchRequest.
private void verifyForwardOneSwitchRequest(Flow flow, FlowSegmentRequest rawRequest) {
FlowPath path = Objects.requireNonNull(flow.getForwardPath());
OneSwitchFlowRequest request = verifyCommonOneSwitchRequest(flow, path, rawRequest);
assertEquals(new FlowEndpoint(flow.getSrcSwitchId(), flow.getSrcPort(), flow.getSrcVlan()), request.getEndpoint());
assertEquals(new FlowEndpoint(flow.getDestSwitchId(), flow.getDestPort(), flow.getDestVlan()), request.getEgressEndpoint());
}
use of org.openkilda.floodlight.api.request.OneSwitchFlowRequest in project open-kilda by telstra.
the class SpeakerFlowSegmentRequestBuilderTest method verifyCommonOneSwitchRequest.
private OneSwitchFlowRequest verifyCommonOneSwitchRequest(Flow flow, FlowPath path, FlowSegmentRequest rawRequest) {
assertThat("Should be one switch flow request", rawRequest, instanceOf(OneSwitchFlowRequest.class));
OneSwitchFlowRequest request = (OneSwitchFlowRequest) rawRequest;
assertEquals(flow.getFlowId(), request.getFlowId());
assertEquals(path.getCookie(), request.getCookie());
return request;
}
Aggregations