use of org.opendaylight.protocol.bgp.parser.BGPDocumentedException in project bgpcep by opendaylight.
the class MPReachAttributeParser method parseAttribute.
@Override
public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder, final PeerSpecificParserConstraint constraint) throws BGPDocumentedException {
try {
final MpReachNlri mpReachNlri = this.reg.parseMpReach(buffer, constraint);
final Attributes1 a = new Attributes1Builder().setMpReachNlri(mpReachNlri).build();
builder.addAugmentation(Attributes1.class, a);
} catch (final BGPParsingException e) {
throw new BGPDocumentedException("Could not parse MP_REACH_NLRI", BGPError.OPT_ATTR_ERROR, e);
}
}
use of org.opendaylight.protocol.bgp.parser.BGPDocumentedException in project bgpcep by opendaylight.
the class MPUnreachAttributeParser method parseAttribute.
@Override
public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder, final PeerSpecificParserConstraint constraint) throws BGPDocumentedException {
try {
final MpUnreachNlri mpUnreachNlri = this.reg.parseMpUnreach(buffer, constraint);
final Attributes2 a = new Attributes2Builder().setMpUnreachNlri(mpUnreachNlri).build();
builder.addAugmentation(Attributes2.class, a);
} catch (final BGPParsingException e) {
throw new BGPDocumentedException("Could not parse MP_UNREACH_NLRI", BGPError.OPT_ATTR_ERROR, e);
}
}
Aggregations