use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxNshNpGrouping 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