use of org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.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