Class EvpnNlriParser
java.lang.Object
org.opendaylight.protocol.bgp.evpn.impl.nlri.EvpnNlriParser
- All Implemented Interfaces:
NlriParser
,NlriSerializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
convertMpReachToMpUnReach
(MpReachNlri mpReachNlri, MpUnreachNlriBuilder builder) Convert MP_REACH attribute and merge it to existing MpUnreachNlriBuilder.static EvpnDestination
extractEvpnDestination
(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route) static EvpnDestination
extractRouteKeyDestination
(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode evpnChoice) void
parseNlri
(io.netty.buffer.ByteBuf nlri, MpReachNlriBuilder builder, PeerSpecificParserConstraint constraint) Parse MP UN_REACH NLRI from buffer.void
parseNlri
(io.netty.buffer.ByteBuf nlri, MpUnreachNlriBuilder builder, PeerSpecificParserConstraint constraint) Parse MP UN_REACH NLRI from buffer.void
serializeAttribute
(Attributes pathAttributes, io.netty.buffer.ByteBuf byteAggregator) static void
serializeNlri
(List<EvpnDestination> destinationList, io.netty.buffer.ByteBuf output)
-
Constructor Details
-
EvpnNlriParser
public EvpnNlriParser()
-
-
Method Details
-
extractEvpnDestination
public static EvpnDestination extractEvpnDestination(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode route) -
extractRouteKeyDestination
public static EvpnDestination extractRouteKeyDestination(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode evpnChoice) -
parseNlri
public void parseNlri(io.netty.buffer.ByteBuf nlri, MpUnreachNlriBuilder builder, PeerSpecificParserConstraint constraint) throws BGPParsingException Description copied from interface:NlriParser
Parse MP UN_REACH NLRI from buffer.- Specified by:
parseNlri
in interfaceNlriParser
- Parameters:
nlri
- Encoded unreachable NLRI in ByteBuf.builder
- MP UNREACH NLRI builder.constraint
- Peer specific constraints.- Throws:
BGPParsingException
- exception.
-
parseNlri
public void parseNlri(io.netty.buffer.ByteBuf nlri, MpReachNlriBuilder builder, PeerSpecificParserConstraint constraint) throws BGPParsingException Description copied from interface:NlriParser
Parse MP UN_REACH NLRI from buffer.- Specified by:
parseNlri
in interfaceNlriParser
- Parameters:
nlri
- Encoded reachable NLRI in ByteBuf.builder
- MP REACH NLRI builder.constraint
- Peer specific constraints.- Throws:
BGPParsingException
- exception.
-
serializeAttribute
- Specified by:
serializeAttribute
in interfaceNlriSerializer
-
serializeNlri
public static void serializeNlri(List<EvpnDestination> destinationList, io.netty.buffer.ByteBuf output) -
convertMpReachToMpUnReach
Description copied from interface:NlriParser
Convert MP_REACH attribute and merge it to existing MpUnreachNlriBuilder.- Specified by:
convertMpReachToMpUnReach
in interfaceNlriParser
- Parameters:
mpReachNlri
- MP_REACH attribute to be convertedbuilder
- to which converted routing information should be added- Returns:
- True if the conversion was successful, false otherwise
-