Search in sources :

Example 1 with Ipv4DetourObjectBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.Ipv4DetourObjectBuilder in project bgpcep by opendaylight.

the class DetourObjectIpv4Parser method localParseObject.

@Override
protected RsvpTeObject localParseObject(final ByteBuf byteBuf) {
    final Ipv4DetourObjectBuilder ipv4Case = new Ipv4DetourObjectBuilder();
    final List<Plr> plrList = new ArrayList<>();
    while (byteBuf.isReadable()) {
        final PlrBuilder plr = new PlrBuilder();
        plr.setPlrId(Ipv4Util.addressForByteBuf(byteBuf));
        plr.setAvoidNode(Ipv4Util.addressForByteBuf(byteBuf));
        plrList.add(plr.build());
    }
    return ipv4Case.setPlr(plrList).build();
}
Also used : PlrBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.ipv4.detour.object.PlrBuilder) Plr(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.ipv4.detour.object.Plr) ArrayList(java.util.ArrayList) Ipv4DetourObjectBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.Ipv4DetourObjectBuilder)

Aggregations

ArrayList (java.util.ArrayList)1 Ipv4DetourObjectBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.Ipv4DetourObjectBuilder)1 Plr (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.ipv4.detour.object.Plr)1 PlrBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.ipv4.detour.object.PlrBuilder)1