use of org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand in project open-kilda by telstra.
the class OneSwitchFlowInstallFlowModFactoryTest method makeOuterOnlyVlanForwardMessageMeteredOneToOne.
@Test
public void makeOuterOnlyVlanForwardMessageMeteredOneToOne() {
OneSwitchFlowInstallCommand command = makeCommand(endpointSingleVlan, egressEndpointSingleVlan, meterConfig);
testMakeOuterOnlyVlanForwardMessage(command);
}
use of org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand in project open-kilda by telstra.
the class OneSwitchFlowInstallFlowModFactoryTest method makeDefaultPortForwardMessageMessageMeteredZeroToDouble.
@Test
public void makeDefaultPortForwardMessageMessageMeteredZeroToDouble() {
OneSwitchFlowInstallCommand command = makeCommand(endpointZeroVlan, egressEndpointDoubleVlan, meterConfig);
testMakeDefaultPortForwardMessageMessage(command);
}
use of org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand in project open-kilda by telstra.
the class OneSwitchFlowInstallFlowModFactoryTest method makeOuterOnlyVlanForwardMessageMeterless.
@Test
public void makeOuterOnlyVlanForwardMessageMeterless() {
OneSwitchFlowInstallCommand command = makeCommand(endpointSingleVlan, egressEndpointSingleVlan, null);
testMakeOuterOnlyVlanForwardMessage(command);
}
use of org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand in project open-kilda by telstra.
the class OneSwitchFlowInstallFlowModFactoryTest method testMakeDoubleVlanForwardMessageVlanEncoded.
private void testMakeDoubleVlanForwardMessageVlanEncoded(MeterConfig meter) {
OneSwitchFlowInstallCommand command = makeCommand(endpointDoubleVlan, egressEndpointDoubleVlan, meter);
FlowEndpoint endpoint = command.getEndpoint();
RoutingMetadata metadata = RoutingMetadata.builder().outerVlanId(endpoint.getOuterVlanId()).build(Collections.emptySet());
OFFlowAdd expected = makeForwardingMessage(command, 10, OfAdapter.INSTANCE.matchVlanId(of, of.buildMatch(), endpoint.getInnerVlanId()).setExact(MatchField.IN_PORT, OFPort.of(endpoint.getPortNumber())).setMasked(MatchField.METADATA, OFMetadata.of(metadata.getValue()), OFMetadata.of(metadata.getMask())).build(), getTargetIngressTableId(), FlowEndpoint.makeVlanStack(endpoint.getInnerVlanId()));
IngressFlowModFactory factory = makeFactory(command);
verifyOfMessageEquals(expected, factory.makeDoubleVlanForwardMessage(new EffectiveIds(getEffectiveMeterId(command.getMeterConfig()), null)));
}
use of org.openkilda.floodlight.command.flow.ingress.OneSwitchFlowInstallCommand in project open-kilda by telstra.
the class OneSwitchFlowInstallFlowModFactoryTest method testMakeSingleVlanForwardMessage.
private void testMakeSingleVlanForwardMessage(MeterConfig meter) {
OneSwitchFlowInstallCommand command = makeCommand(endpointSingleVlan, egressEndpointSingleVlan, meter);
FlowEndpoint endpoint = command.getEndpoint();
RoutingMetadata metadata = RoutingMetadata.builder().outerVlanId(endpoint.getOuterVlanId()).build(Collections.emptySet());
OFFlowAdd expected = makeForwardingMessage(command, 0, of.buildMatch().setExact(MatchField.IN_PORT, OFPort.of(endpoint.getPortNumber())).setMasked(MatchField.METADATA, OFMetadata.of(metadata.getValue()), OFMetadata.of(metadata.getMask())).build(), getTargetIngressTableId(), FlowEndpoint.makeVlanStack(endpoint.getInnerVlanId()));
IngressFlowModFactory factory = makeFactory(command);
verifyOfMessageEquals(expected, factory.makeSingleVlanForwardMessage(new EffectiveIds(getEffectiveMeterId(command.getMeterConfig()), null)));
}
Aggregations