use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.detour.object.detour.object.ipv6.detour.object.AvoidNodeBuilder in project bgpcep by opendaylight.
the class DetourObjectIpv6Parser method localParseObject.
@Override
protected RsvpTeObject localParseObject(final ByteBuf byteBuf) {
final ByteBuf plrId = byteBuf.readSlice(byteBuf.capacity() / 2);
final Ipv6DetourObjectBuilder ipv6Case = new Ipv6DetourObjectBuilder();
final List<PlrId> plrIdList = new ArrayList<>();
while (plrId.isReadable()) {
final PlrIdBuilder plr = new PlrIdBuilder();
plr.setPlrId(Ipv6Util.addressForByteBuf(plrId));
plrIdList.add(plr.build());
}
final List<AvoidNode> avoidNodeList = new ArrayList<>();
while (byteBuf.isReadable()) {
final AvoidNodeBuilder plr = new AvoidNodeBuilder();
plr.setAvoidNode(Ipv6Util.addressForByteBuf(byteBuf));
avoidNodeList.add(plr.build());
}
return ipv6Case.setPlrId(plrIdList).setAvoidNode(avoidNodeList).build();
}
Aggregations