Search in sources :

Example 1 with InstallEgressMirrorFlow

use of org.openkilda.messaging.command.flow.InstallEgressMirrorFlow in project open-kilda by telstra.

the class FlowCommandFactory method buildInstallEgressMirrorFlow.

/**
 * Generate install egress mirror flow command.
 *
 * @param flowPath flow path with segments to be used for building of install rules.
 * @param inputPortNo the number of input port.
 * @param encapsulationResources the encapsulation resources.
 * @param multiTable use multi table.
 * @return install egress flow command
 */
public InstallEgressMirrorFlow buildInstallEgressMirrorFlow(FlowPath flowPath, int inputPortNo, EncapsulationResources encapsulationResources, boolean multiTable, MirrorConfig mirrorConfig) {
    Flow flow = flowPath.getFlow();
    FlowEndpoint ingressEndpoint = FlowSideAdapter.makeIngressAdapter(flow, flowPath).getEndpoint();
    FlowEndpoint egressEndpoint = FlowSideAdapter.makeEgressAdapter(flow, flowPath).getEndpoint();
    return new InstallEgressMirrorFlow(transactionIdGenerator.generate(), flow.getFlowId(), flowPath.getCookie().toBuilder().mirror(true).build().getValue(), egressEndpoint.getSwitchId(), inputPortNo, egressEndpoint.getPortNumber(), encapsulationResources.getTransitEncapsulationId(), encapsulationResources.getEncapsulationType(), egressEndpoint.getOuterVlanId(), egressEndpoint.getInnerVlanId(), getOutputVlanType(flow, flowPath), multiTable, ingressEndpoint, mirrorConfig);
}
Also used : FlowEndpoint(org.openkilda.model.FlowEndpoint) InstallEgressMirrorFlow(org.openkilda.messaging.command.flow.InstallEgressMirrorFlow) InstallTransitFlow(org.openkilda.messaging.command.flow.InstallTransitFlow) InstallServer42IngressFlow(org.openkilda.messaging.command.flow.InstallServer42IngressFlow) InstallOneSwitchMirrorFlow(org.openkilda.messaging.command.flow.InstallOneSwitchMirrorFlow) Flow(org.openkilda.model.Flow) InstallIngressLoopFlow(org.openkilda.messaging.command.flow.InstallIngressLoopFlow) InstallIngressMirrorFlow(org.openkilda.messaging.command.flow.InstallIngressMirrorFlow) InstallTransitLoopFlow(org.openkilda.messaging.command.flow.InstallTransitLoopFlow) InstallOneSwitchFlow(org.openkilda.messaging.command.flow.InstallOneSwitchFlow) InstallEgressFlow(org.openkilda.messaging.command.flow.InstallEgressFlow) InstallEgressMirrorFlow(org.openkilda.messaging.command.flow.InstallEgressMirrorFlow) InstallIngressFlow(org.openkilda.messaging.command.flow.InstallIngressFlow)

Aggregations

InstallEgressFlow (org.openkilda.messaging.command.flow.InstallEgressFlow)1 InstallEgressMirrorFlow (org.openkilda.messaging.command.flow.InstallEgressMirrorFlow)1 InstallIngressFlow (org.openkilda.messaging.command.flow.InstallIngressFlow)1 InstallIngressLoopFlow (org.openkilda.messaging.command.flow.InstallIngressLoopFlow)1 InstallIngressMirrorFlow (org.openkilda.messaging.command.flow.InstallIngressMirrorFlow)1 InstallOneSwitchFlow (org.openkilda.messaging.command.flow.InstallOneSwitchFlow)1 InstallOneSwitchMirrorFlow (org.openkilda.messaging.command.flow.InstallOneSwitchMirrorFlow)1 InstallServer42IngressFlow (org.openkilda.messaging.command.flow.InstallServer42IngressFlow)1 InstallTransitFlow (org.openkilda.messaging.command.flow.InstallTransitFlow)1 InstallTransitLoopFlow (org.openkilda.messaging.command.flow.InstallTransitLoopFlow)1 Flow (org.openkilda.model.Flow)1 FlowEndpoint (org.openkilda.model.FlowEndpoint)1