Class EvpnNlriParser
- java.lang.Object
-
- org.opendaylight.protocol.bgp.evpn.impl.nlri.EvpnNlriParser
-
- All Implemented Interfaces:
NlriParser
,NlriSerializer
public final class EvpnNlriParser extends Object implements NlriParser, NlriSerializer
-
-
Constructor Summary
Constructors Constructor Description EvpnNlriParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> route)
static EvpnDestination
extractRouteKeyDestination(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> 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)
-
-
-
Method Detail
-
extractEvpnDestination
public static EvpnDestination extractEvpnDestination(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> route)
-
extractRouteKeyDestination
public static EvpnDestination extractRouteKeyDestination(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode<? extends org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> 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
public void serializeAttribute(Attributes pathAttributes, io.netty.buffer.ByteBuf byteAggregator)
- Specified by:
serializeAttribute
in interfaceNlriSerializer
-
serializeNlri
public static void serializeNlri(List<EvpnDestination> destinationList, io.netty.buffer.ByteBuf output)
-
convertMpReachToMpUnReach
public boolean convertMpReachToMpUnReach(MpReachNlri mpReachNlri, MpUnreachNlriBuilder builder)
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
-
-