use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxCtZoneGrouping in project openflowplugin by opendaylight.
the class CtZoneConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxCtZoneGrouping> matchGrouping = MatchUtil.CT_ZONE_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
CtZoneCaseValueBuilder ctZoneCaseValueBuilder = new CtZoneCaseValueBuilder();
CtZoneValuesBuilder ctZoneValuesBuilder = new CtZoneValuesBuilder();
ctZoneValuesBuilder.setCtZone(matchGrouping.get().getNxmNxCtZone().getCtZone());
ctZoneCaseValueBuilder.setCtZoneValues(ctZoneValuesBuilder.build());
MatchEntryBuilder ofMatch = MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtZone.class, Nxm1Class.class, ctZoneCaseValueBuilder.build());
return ofMatch.build();
}
Aggregations