use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.Ipv6FlabelCase in project openflowplugin by opendaylight.
the class OfToSalIpv6FlabelCase method process.
@Override
public Optional<MatchBuilder> process(@Nonnull Ipv6FlabelCase source, MatchResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final MatchBuilder matchBuilder = data.getMatchBuilder();
final Ipv6MatchBuilder ipv6MatchBuilder = data.getIpv6MatchBuilder();
Ipv6Flabel ipv6Flabel = source.getIpv6Flabel();
if (ipv6Flabel != null) {
Ipv6LabelBuilder ipv6LabelBuilder = new Ipv6LabelBuilder();
ipv6LabelBuilder.setIpv6Flabel(new Ipv6FlowLabel(ipv6Flabel.getIpv6Flabel()));
byte[] mask = ipv6Flabel.getMask();
if (mask != null) {
ipv6LabelBuilder.setFlabelMask(new Ipv6FlowLabel(ByteUtil.bytesToUnsignedInt(mask)));
}
ipv6MatchBuilder.setIpv6Label(ipv6LabelBuilder.build());
matchBuilder.setLayer3Match(ipv6MatchBuilder.build());
}
return Optional.of(matchBuilder);
}
Aggregations