use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.secondary.reported.route.object.Srro in project bgpcep by opendaylight.
the class SecondaryRecordRouteObjectParser method localSerializeObject.
@Override
public void localSerializeObject(final RsvpTeObject teLspObject, final ByteBuf output) {
Preconditions.checkArgument(teLspObject instanceof SecondaryRecordRouteObject, "RecordRouteObject is mandatory.");
final SecondaryRecordRouteObject srro = (SecondaryRecordRouteObject) teLspObject;
final ByteBuf bufferAux = Unpooled.buffer();
final List<SubobjectContainer> srroSbo = srro.nonnullSubobjectContainer().stream().map(so -> new SubobjectContainerBuilder().setProtectionAvailable(so.getProtectionAvailable()).setProtectionInUse(so.getProtectionInUse()).setSubobjectType(so.getSubobjectType()).build()).collect(Collectors.toList());
serializeList(srroSbo, bufferAux);
serializeAttributeHeader(bufferAux.readableBytes(), CLASS_NUM, CTYPE, output);
output.writeBytes(bufferAux);
}
Aggregations