Search in sources :

Example 1 with SecondaryRecordRouteObjectBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.SecondaryRecordRouteObjectBuilder in project bgpcep by opendaylight.

the class SecondaryRecordRouteObjectParser method localParseObject.

@Override
protected RsvpTeObject localParseObject(final ByteBuf byteBuf) throws RSVPParsingException {
    final SecondaryRecordRouteObjectBuilder srro = new SecondaryRecordRouteObjectBuilder();
    final List<SubobjectContainer> sbo = parseList(byteBuf);
    final List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.secondary._record.route.object.SubobjectContainer> srroSbo = sbo.stream().map(so -> new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.secondary._record.route.object.SubobjectContainerBuilder().setProtectionAvailable(so.getProtectionAvailable()).setProtectionInUse(so.getProtectionInUse()).setSubobjectType(so.getSubobjectType()).build()).collect(Collectors.toList());
    return srro.setSubobjectContainer(srroSbo).build();
}
Also used : SecondaryRecordRouteObjectBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.SecondaryRecordRouteObjectBuilder) RSVPParsingException(org.opendaylight.protocol.rsvp.parser.spi.RSVPParsingException) SubobjectContainer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.list.SubobjectContainer) RsvpTeObject(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject) Collectors(java.util.stream.Collectors) Unpooled(io.netty.buffer.Unpooled) SecondaryRecordRouteObject(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.SecondaryRecordRouteObject) List(java.util.List) RROSubobjectListParser(org.opendaylight.protocol.rsvp.parser.spi.subobjects.RROSubobjectListParser) ByteBuf(io.netty.buffer.ByteBuf) Preconditions(com.google.common.base.Preconditions) RROSubobjectRegistry(org.opendaylight.protocol.rsvp.parser.spi.RROSubobjectRegistry) SubobjectContainerBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.list.SubobjectContainerBuilder) Preconditions(com.google.common.base.Preconditions) SecondaryRecordRouteObjectBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.SecondaryRecordRouteObjectBuilder) SubobjectContainer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.list.SubobjectContainer) SubobjectContainerBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.list.SubobjectContainerBuilder)

Aggregations

Preconditions (com.google.common.base.Preconditions)1 ByteBuf (io.netty.buffer.ByteBuf)1 Unpooled (io.netty.buffer.Unpooled)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 RROSubobjectRegistry (org.opendaylight.protocol.rsvp.parser.spi.RROSubobjectRegistry)1 RSVPParsingException (org.opendaylight.protocol.rsvp.parser.spi.RSVPParsingException)1 RROSubobjectListParser (org.opendaylight.protocol.rsvp.parser.spi.subobjects.RROSubobjectListParser)1 RsvpTeObject (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.RsvpTeObject)1 SubobjectContainer (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.list.SubobjectContainer)1 SubobjectContainerBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820._record.route.subobjects.list.SubobjectContainerBuilder)1 SecondaryRecordRouteObject (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.SecondaryRecordRouteObject)1 SecondaryRecordRouteObjectBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.secondary._record.route.object.SecondaryRecordRouteObjectBuilder)1