use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxNsiGrouping in project openflowplugin by opendaylight.
the class NsiConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxNsiGrouping> matchGrouping = MatchUtil.NSI_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
Short value = matchGrouping.get().getNxmNxNsi().getNsi();
NsiCaseValueBuilder nsiCaseValueBuilder = new NsiCaseValueBuilder();
nsiCaseValueBuilder.setNsiValues(new NsiValuesBuilder().setNsi(value).build());
return MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNsi.class, Nxm1Class.class, nsiCaseValueBuilder.build()).build();
}
Aggregations