use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxEncapEthDstGrouping in project openflowplugin by opendaylight.
the class EncapEthDstConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxEncapEthDstGrouping> matchGrouping = MatchUtil.ENCAP_ETH_DST_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
MacAddress macAddress = matchGrouping.get().getNxmNxEncapEthDst().getMacAddress();
EncapEthDstCaseValueBuilder encapEthDstCaseValueBuilder = new EncapEthDstCaseValueBuilder();
encapEthDstCaseValueBuilder.setEncapEthDstValues(new EncapEthDstValuesBuilder().setMacAddress(macAddress).build());
return MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxEncapEthDst.class, Nxm1Class.class, encapEthDstCaseValueBuilder.build()).build();
}
Aggregations