use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev171207.path.attributes.attributes.bgp.prefix.sid.BgpPrefixSidTlvsBuilder in project bgpcep by opendaylight.
the class BgpPrefixSidAttributeParser method parseAttribute.
@Override
public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder) throws BGPDocumentedException, BGPParsingException {
final BgpPrefixSidBuilder sid = new BgpPrefixSidBuilder();
final List<BgpPrefixSidTlvs> tlvList = new ArrayList<>();
while (buffer.isReadable()) {
final BgpPrefixSidTlv tlv = this.reg.parseBgpPrefixSidTlv(buffer.readUnsignedByte(), buffer);
tlvList.add(new BgpPrefixSidTlvsBuilder().setBgpPrefixSidTlv(tlv).build());
}
builder.setBgpPrefixSid(sid.setBgpPrefixSidTlvs(tlvList).build());
}
Aggregations