Search in sources :

Example 1 with FlowSegmentWrapperCommand

use of org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand 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)

Example 2 with FlowSegmentWrapperCommand

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

the class RecordHandler method makeFlowSegmentWrappedCommand.

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

Example 3 with FlowSegmentWrapperCommand

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

the class RecordHandler method makeFlowSegmentWrappedCommand.

private FlowSegmentWrapperCommand makeFlowSegmentWrappedCommand(InstallEgressMirrorFlow request, MessageContext messageContext, FlowSegmentResponseFactory responseFactory) {
    FlowEndpoint endpoint = new FlowEndpoint(request.getSwitchId(), request.getOutputPort(), request.getOutputVlanId(), request.getOutputInnerVlanId());
    EgressMirrorFlowSegmentInstallCommand command = new EgressMirrorFlowSegmentInstallCommand(messageContext, EMPTY_COMMAND_ID, makeSegmentMetadata(request), endpoint, request.getIngressEndpoint(), request.getInputPort(), makeTransitEncapsulation(request), request.getMirrorConfig());
    return new FlowSegmentWrapperCommand(command, responseFactory);
}
Also used : FlowSegmentWrapperCommand(org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand) FlowEndpoint(org.openkilda.model.FlowEndpoint) EgressMirrorFlowSegmentInstallCommand(org.openkilda.floodlight.command.flow.egress.EgressMirrorFlowSegmentInstallCommand)

Example 4 with FlowSegmentWrapperCommand

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

the class RecordHandler method makeFlowSegmentWrappedCommand.

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

Example 5 with FlowSegmentWrapperCommand

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

the class RecordHandler method makeFlowSegmentWrappedCommand.

private FlowSegmentWrapperCommand makeFlowSegmentWrappedCommand(InstallOneSwitchFlow 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());
    OneSwitchFlowInstallCommand command = new OneSwitchFlowInstallCommand(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) OneSwitchFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand) 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)7 FlowEndpoint (org.openkilda.model.FlowEndpoint)6 RulesContext (org.openkilda.floodlight.model.RulesContext)4 MeterConfig (org.openkilda.model.MeterConfig)4 OFMeterConfig (org.projectfloodlight.openflow.protocol.OFMeterConfig)4 FlowSegmentResponseFactory (org.openkilda.floodlight.command.flow.FlowSegmentResponseFactory)1 FlowSegmentSyncResponseFactory (org.openkilda.floodlight.command.flow.FlowSegmentSyncResponseFactory)1 EgressFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.egress.EgressFlowSegmentInstallCommand)1 EgressMirrorFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.egress.EgressMirrorFlowSegmentInstallCommand)1 IngressFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.ingress.IngressFlowSegmentInstallCommand)1 IngressMirrorFlowSegmentInstallCommand (org.openkilda.floodlight.command.flow.ingress.IngressMirrorFlowSegmentInstallCommand)1 OneSwitchFlowInstallCommand (org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand)1 OneSwitchMirrorFlowInstallCommand (org.openkilda.floodlight.command.flow.ingress.OneSwitchMirrorFlowInstallCommand)1 FlowCommandException (org.openkilda.floodlight.error.FlowCommandException)1 SwitchOperationException (org.openkilda.floodlight.error.SwitchOperationException)1 UnsupportedSwitchOperationException (org.openkilda.floodlight.error.UnsupportedSwitchOperationException)1 MessageContext (org.openkilda.messaging.MessageContext)1 InstallFlowForSwitchManagerRequest (org.openkilda.messaging.command.flow.InstallFlowForSwitchManagerRequest)1 ErrorData (org.openkilda.messaging.error.ErrorData)1 ErrorMessage (org.openkilda.messaging.error.ErrorMessage)1