Search in sources :

Example 6 with OneSwitchFlowInstallCommand

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

Example 7 with OneSwitchFlowInstallCommand

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

the class OneSwitchFlowInstallFlowModFactoryTest method makeOuterOnlyVlanForwardMessageSamePort.

// --- makeOuterOnlyVlanForwardMessage
@Test
public void makeOuterOnlyVlanForwardMessageSamePort() {
    FlowEndpoint egress = new FlowEndpoint(endpointSingleVlan.getSwitchId(), endpointSingleVlan.getPortNumber(), endpointSingleVlan.getOuterVlanId() + 1);
    OneSwitchFlowInstallCommand command = makeCommand(endpointSingleVlan, egress, meterConfig);
    testMakeOuterOnlyVlanForwardMessage(command);
}
Also used : FlowEndpoint(org.openkilda.model.FlowEndpoint) OneSwitchFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand) Test(org.junit.Test)

Example 8 with OneSwitchFlowInstallCommand

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

the class OneSwitchFlowInstallFlowModFactoryTest method makeOuterOnlyVlanForwardMessageMeteredZeroToOne.

@Test
public void makeOuterOnlyVlanForwardMessageMeteredZeroToOne() {
    OneSwitchFlowInstallCommand command = makeCommand(endpointZeroVlan, egressEndpointSingleVlan, meterConfig);
    testMakeOuterOnlyVlanForwardMessage(command);
}
Also used : OneSwitchFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand) Test(org.junit.Test)

Example 9 with OneSwitchFlowInstallCommand

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

the class OneSwitchFlowInstallFlowModFactoryTest method makeOuterOnlyVlanForwardMessageMeteredOneToZero.

@Test
public void makeOuterOnlyVlanForwardMessageMeteredOneToZero() {
    OneSwitchFlowInstallCommand command = makeCommand(endpointSingleVlan, egressEndpointZeroVlan, meterConfig);
    testMakeOuterOnlyVlanForwardMessage(command);
}
Also used : OneSwitchFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand) Test(org.junit.Test)

Example 10 with OneSwitchFlowInstallCommand

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

the class OneSwitchFlowInstallFlowModFactoryTest method makeOuterOnlyVlanForwardMessageMeteredZeroToZero.

@Test
public void makeOuterOnlyVlanForwardMessageMeteredZeroToZero() {
    OneSwitchFlowInstallCommand command = makeCommand(endpointZeroVlan, egressEndpointZeroVlan, meterConfig);
    testMakeOuterOnlyVlanForwardMessage(command);
}
Also used : OneSwitchFlowInstallCommand(org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand) Test(org.junit.Test)

Aggregations

OneSwitchFlowInstallCommand (org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand)11 Test (org.junit.Test)8 FlowEndpoint (org.openkilda.model.FlowEndpoint)4 EffectiveIds (org.openkilda.floodlight.model.EffectiveIds)2 RoutingMetadata (org.openkilda.floodlight.utils.metadata.RoutingMetadata)2 OFFlowAdd (org.projectfloodlight.openflow.protocol.OFFlowAdd)2 FlowSegmentWrapperCommand (org.openkilda.floodlight.command.flow.FlowSegmentWrapperCommand)1 RulesContext (org.openkilda.floodlight.model.RulesContext)1 MeterConfig (org.openkilda.model.MeterConfig)1 OFMeterConfig (org.projectfloodlight.openflow.protocol.OFMeterConfig)1