use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxNspGrouping in project openflowplugin by opendaylight.
the class NspConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxNspGrouping> matchGrouping = MatchUtil.NSP_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
Long value = matchGrouping.get().getNxmNxNsp().getValue();
NspCaseValueBuilder nspCaseValueBuilder = new NspCaseValueBuilder();
nspCaseValueBuilder.setNspValues(new NspValuesBuilder().setNsp(value).build());
return MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNsp.class, Nxm1Class.class, nspCaseValueBuilder.build()).build();
}
Aggregations