use of org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.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