use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmOfInPortGrouping in project openflowplugin by opendaylight.
the class NxmInPortConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmOfInPortGrouping> matchGrouping = MatchUtil.NXM_OF_INPORT_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
Integer value = matchGrouping.get().getOfInPort().getValue();
OfInPortCaseValueBuilder inPortCaseValueBuilder = new OfInPortCaseValueBuilder();
inPortCaseValueBuilder.setNxmOfInPortValues(new NxmOfInPortValuesBuilder().setValue(value).build());
return MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfInPort.class, Nxm0Class.class, inPortCaseValueBuilder.build()).build();
}
Aggregations