use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class TcpDstCodecTest method createMatchEntry.
private MatchEntry createMatchEntry() {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
final TcpDstCaseValueBuilder caseBuilder = new TcpDstCaseValueBuilder();
final TcpDstValuesBuilder valuesBuilder = new TcpDstValuesBuilder();
matchEntryBuilder.setOxmClass(Nxm0Class.class);
matchEntryBuilder.setOxmMatchField(NxmOfTcpDst.class);
matchEntryBuilder.setHasMask(true);
valuesBuilder.setPort(new PortNumber(1));
valuesBuilder.setMask(0xffff);
caseBuilder.setTcpDstValues(valuesBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class TunIdCodecTest method createMatchEntry.
private MatchEntry createMatchEntry() {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
final TunIdCaseValueBuilder caseBuilder = new TunIdCaseValueBuilder();
final TunIdValuesBuilder valuesBuilder = new TunIdValuesBuilder();
matchEntryBuilder.setOxmClass(Nxm1Class.class);
matchEntryBuilder.setOxmMatchField(NxmNxTunId.class);
matchEntryBuilder.setHasMask(false);
byte[] value = new byte[VALUE_LENGTH];
valuesBuilder.setValue(new BigInteger(value));
caseBuilder.setTunIdValues(valuesBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class EthSrcCodecTest method createMatchEntry.
private MatchEntry createMatchEntry() {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
final EthSrcCaseValueBuilder caseBuilder = new EthSrcCaseValueBuilder();
final EthSrcValuesBuilder valuesBuilder = new EthSrcValuesBuilder();
matchEntryBuilder.setOxmClass(Nxm0Class.class);
matchEntryBuilder.setOxmMatchField(NxmOfEthDst.class);
matchEntryBuilder.setHasMask(false);
byte[] address = new byte[VALUE_LENGTH];
valuesBuilder.setMacAddress(new MacAddress(ByteBufUtils.macAddressToString(address)));
caseBuilder.setEthSrcValues(valuesBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class IcmpTypeCodecTest method createMatchEntry.
private MatchEntry createMatchEntry() {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
final IcmpTypeCaseValueBuilder caseBuilder = new IcmpTypeCaseValueBuilder();
final IcmpTypeValuesBuilder valuesBuilder = new IcmpTypeValuesBuilder();
matchEntryBuilder.setOxmClass(Nxm0Class.class);
matchEntryBuilder.setOxmMatchField(NxmOfIcmpType.class);
matchEntryBuilder.setHasMask(false);
valuesBuilder.setValue((short) 1);
caseBuilder.setIcmpTypeValues(valuesBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class Nshc1CodecTest method createMatchEntry.
private MatchEntry createMatchEntry() {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
final Nshc1CaseValueBuilder caseBuilder = new Nshc1CaseValueBuilder();
final Nshc1ValuesBuilder valuesBuilder = new Nshc1ValuesBuilder();
matchEntryBuilder.setOxmClass(Nxm1Class.class);
matchEntryBuilder.setOxmMatchField(NxmNxNshc1.class);
matchEntryBuilder.setHasMask(false);
valuesBuilder.setNshc((long) 1);
caseBuilder.setNshc1Values(valuesBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
return matchEntryBuilder.build();
}
Aggregations