use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.ofj.nxm.nx.match.nsh.np.grouping.NshNpValuesBuilder in project openflowplugin by opendaylight.
the class NshNpCodec method deserialize.
@Override
public MatchEntry deserialize(ByteBuf message) {
MatchEntryBuilder matchEntriesBuilder = deserializeHeaderToBuilder(message);
NshNpCaseValueBuilder nshNpCaseValueBuilder = new NshNpCaseValueBuilder();
nshNpCaseValueBuilder.setNshNpValues(new NshNpValuesBuilder().setValue(message.readUnsignedByte()).build());
matchEntriesBuilder.setMatchEntryValue(nshNpCaseValueBuilder.build());
matchEntriesBuilder.setHasMask(false);
return matchEntriesBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.ofj.nxm.nx.match.nsh.np.grouping.NshNpValuesBuilder in project openflowplugin by opendaylight.
the class NshNpConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxNshNpGrouping> matchGrouping = MatchUtil.NSH_NP_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
Short value = matchGrouping.get().getNxmNxNshNp().getValue();
NshNpCaseValueBuilder nshNpCaseValueBuilder = new NshNpCaseValueBuilder();
nshNpCaseValueBuilder.setNshNpValues(new NshNpValuesBuilder().setValue(value).build());
return MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshNp.class, Nxm1Class.class, nshNpCaseValueBuilder.build()).build();
}
Aggregations