use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxTunIdGrouping in project openflowplugin by opendaylight.
the class TunIdConvertor method convert.
@Override
public MatchEntry convert(final Extension extension) {
Optional<NxmNxTunIdGrouping> matchGrouping = MatchUtil.TUN_ID_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
BigInteger value = matchGrouping.get().getNxmNxTunId().getValue();
TunIdCaseValueBuilder tunnelIdCaseBuilder = new TunIdCaseValueBuilder();
TunIdValuesBuilder tunnelIdBuilder = new TunIdValuesBuilder();
tunnelIdBuilder.setValue(value);
tunnelIdCaseBuilder.setTunIdValues(tunnelIdBuilder.build());
return MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxTunId.class, Nxm1Class.class, tunnelIdCaseBuilder.build()).build();
}
Aggregations