use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.pbb.isid._case.PbbIsid in project openflowplugin by opendaylight.
the class OfToSalPbbIsidCase method process.
@Override
public Optional<MatchBuilder> process(@Nonnull PbbIsidCase source, MatchResponseConvertorData data, ConvertorExecutor convertorExecutor) {
final MatchBuilder matchBuilder = data.getMatchBuilder();
final ProtocolMatchFieldsBuilder protocolMatchFieldsBuilder = data.getProtocolMatchFieldsBuilder();
PbbIsid pbbIsid = source.getPbbIsid();
if (pbbIsid != null) {
PbbBuilder pbbBuilder = new PbbBuilder();
pbbBuilder.setPbbIsid(pbbIsid.getIsid());
byte[] mask = pbbIsid.getMask();
if (mask != null) {
pbbBuilder.setPbbMask(ByteUtil.bytesToUnsignedMedium(mask));
}
protocolMatchFieldsBuilder.setPbb(pbbBuilder.build());
matchBuilder.setProtocolMatchFields(protocolMatchFieldsBuilder.build());
}
return Optional.of(matchBuilder);
}
Aggregations