use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketInMessageBuilder in project openflowplugin by opendaylight.
the class NodeConnectorRefToPortTranslatorTest method createPacketIn.
private static PacketIn createPacketIn(long portNo) {
InPortBuilder inPortBuilder = new InPortBuilder().setPortNumber(new PortNumber(portNo));
InPortCaseBuilder caseBuilder = new InPortCaseBuilder().setInPort(inPortBuilder.build());
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder().setOxmClass(OpenflowBasicClass.class).setOxmMatchField(InPort.class).setHasMask(false).setMatchEntryValue(caseBuilder.build());
MatchBuilder matchBuilder = new MatchBuilder().setMatchEntry(Lists.newArrayList(matchEntryBuilder.build()));
return new PacketInMessageBuilder().setVersion(OFConstants.OFP_VERSION_1_0).setData(PACKET_DATA.getBytes()).setReason(PacketInReason.OFPRACTION).setMatch(matchBuilder.build()).setVersion(OFConstants.OFP_VERSION_1_3).setCookie(BigInteger.ZERO).setTableId(new TableId(TABLE_ID)).build();
}
Aggregations