use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.NxmNxArpShaGrouping in project openflowplugin by opendaylight.
the class ArpShaConvertor method convert.
@Override
public MatchEntry convert(Extension extension) {
Optional<NxmNxArpShaGrouping> matchGrouping = MatchUtil.ARP_SHA_RESOLVER.getExtension(extension);
if (!matchGrouping.isPresent()) {
throw new CodecPreconditionException(extension);
}
MacAddress macAddress = matchGrouping.get().getNxmNxArpSha().getMacAddress();
ArpShaCaseValueBuilder arpShaCaseValueBuilder = new ArpShaCaseValueBuilder();
arpShaCaseValueBuilder.setArpShaValues(new ArpShaValuesBuilder().setMacAddress(macAddress).build());
return MatchUtil.createDefaultMatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxArpSha.class, Nxm1Class.class, arpShaCaseValueBuilder.build()).build();
}
Aggregations