use of org.projectfloodlight.openflow.protocol.OFFlowDeleteStrict in project open-kilda by telstra.
the class TransitFlowSegmentRemoveCommandTest method happyPathVlanEncapsulation.
@Test
public void happyPathVlanEncapsulation() throws Exception {
replayAll();
TransitFlowSegmentRemoveCommand command = makeCommand(encapsulationVlan);
verifySuccessCompletion(command.execute(commandProcessor));
verifyWriteCount(1);
OFFlowDeleteStrict expected = of.buildFlowDeleteStrict().setPriority(TransitFlowSegmentRemoveCommand.FLOW_PRIORITY).setCookie(U64.of(command.getCookie().getValue())).setCookieMask(U64.NO_MASK).setMatch(OfAdapter.INSTANCE.matchVlanId(of, of.buildMatch(), command.getEncapsulation().getId()).setExact(MatchField.IN_PORT, OFPort.of(command.getIngressIslPort())).build()).build();
verifyOfMessageEquals(expected, getWriteRecord(0).getRequest());
}
use of org.projectfloodlight.openflow.protocol.OFFlowDeleteStrict in project open-kilda by telstra.
the class EgressFlowSegmentRemoveCommandTest method happyPathTransitVlan.
@Test
public void happyPathTransitVlan() throws Exception {
FlowEndpoint ingressEndpoint = new FlowEndpoint(mapSwitchId(dpId), 1, 0);
EgressFlowSegmentRemoveCommand command = makeCommand(endpointEgressZeroVlan, ingressEndpoint, encapsulationVlan);
executeCommand(command, 1);
OFFlowDeleteStrict expected = of.buildFlowDeleteStrict().setPriority(EgressFlowSegmentRemoveCommand.FLOW_PRIORITY).setCookie(U64.of(command.getCookie().getValue())).setCookieMask(U64.NO_MASK).setMatch(OfAdapter.INSTANCE.matchVlanId(of, of.buildMatch(), command.getEncapsulation().getId()).setExact(MatchField.IN_PORT, OFPort.of(command.getIngressIslPort())).build()).build();
verifyOfMessageEquals(expected, getWriteRecord(0).getRequest());
}
Aggregations