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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations