Search in sources :

Example 1 with OneSwitchMirrorFlowInstallCommand

use of org.openkilda.floodlight.command.flow.ingress.OneSwitchMirrorFlowInstallCommand in project open-kilda by telstra.

the class RecordHandler method makeFlowSegmentWrappedCommand.

private FlowSegmentWrapperCommand makeFlowSegmentWrappedCommand(InstallOneSwitchMirrorFlow request, MessageContext messageContext, FlowSegmentResponseFactory responseFactory) {
    FlowEndpoint endpoint = new FlowEndpoint(request.getSwitchId(), request.getInputPort(), request.getInputVlanId(), request.getInputInnerVlanId(), request.isEnableLldp(), request.isEnableArp());
    FlowEndpoint egressEndpoint = new FlowEndpoint(request.getSwitchId(), request.getOutputPort(), request.getOutputVlanId(), request.getOutputInnerVlanId());
    MeterConfig meterConfig = makeMeterConfig(request.getMeterId(), request.getBandwidth());
    OneSwitchMirrorFlowInstallCommand command = new OneSwitchMirrorFlowInstallCommand(messageContext, EMPTY_COMMAND_ID, makeSegmentMetadata(request), endpoint, meterConfig, egressEndpoint, new RulesContext(), request.getMirrorConfig());
    return new FlowSegmentWrapperCommand(command, responseFactory);
}
Also used : FlowSegmentWrapperCommand(org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand) FlowEndpoint(org.openkilda.model.FlowEndpoint) OneSwitchMirrorFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchMirrorFlowInstallCommand) RulesContext(org.openkilda.floodlight.model.RulesContext) OFMeterConfig(org.projectfloodlight.openflow.protocol.OFMeterConfig) MeterConfig(org.openkilda.model.MeterConfig)

Aggregations

FlowSegmentWrapperCommand (org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand)1 OneSwitchMirrorFlowInstallCommand (org.openkilda.floodlight.command.flow.ingress.OneSwitchMirrorFlowInstallCommand)1 RulesContext (org.openkilda.floodlight.model.RulesContext)1 FlowEndpoint (org.openkilda.model.FlowEndpoint)1 MeterConfig (org.openkilda.model.MeterConfig)1 OFMeterConfig (org.projectfloodlight.openflow.protocol.OFMeterConfig)1