Class NeighborUtil

java.lang.Object
org.opendaylight.protocol.bgp.state.NeighborUtil

public final class NeighborUtil extends Object
Util for create OpenConfig Neighbor with corresponding openConfig state.
  • Method Details

    • buildNeighbors

      public static @Nullable Neighbors buildNeighbors(@NonNull List<BGPPeerState> peerStats, @NonNull BGPTableTypeRegistryConsumer bgpTableTypeRegistry)
      Build a Openconfig Neighbors container with all Neighbors Stats from a list of BGPPeerGroupState.
      Parameters:
      peerStats - List of BGPPeerState containing Neighbor state counters
      bgpTableTypeRegistry - BGP TableType Registry
      Returns:
      Openconfig Neighbors Stats
    • buildNeighbor

      public static @NonNull Neighbor buildNeighbor(@NonNull BGPPeerState neighbor, @NonNull BGPTableTypeRegistryConsumer bgpTableTypeRegistry)
      Build a list of neighbors containing Operational State from a list of BGPPeerState.
      Parameters:
      neighbor - containing Neighbor state counters
      Returns:
      neighbor containing Neighbor State
    • buildNeighborState

      public static @Nullable State buildNeighborState(@Nullable BGPSessionState sessionState, BGPPeerMessagesState bgpPeerMessagesState)
      Builds Neighbor State from BGPPeerState counters.
      Parameters:
      sessionState - BGPPeerState containing Operational state counters
      bgpPeerMessagesState - message state
      Returns:
      Neighbor State
    • buildTimer

      public static @Nullable Timers buildTimer(@Nullable BGPTimersState neighbor)
      Builds Neighbor State from BGPPeerState counters.
      Parameters:
      neighbor - BGPPeerState containing Operational state counters
      Returns:
      Timer State
    • buildTransport

      public static @Nullable Transport buildTransport(@Nullable BGPTransportState neighbor)
      Builds Transport State from BGPTransportState counters.
      Parameters:
      neighbor - BGPPeerState containing Operational state counters
      Returns:
      Transport State
    • buildErrorHandling

      public static ErrorHandling buildErrorHandling(@Nullable BGPErrorHandlingState errorHandlingState)
      Builds Error Handling State from BGPPeerState counters.
      Parameters:
      errorHandlingState - BGPErrorHandlingState containing ErrorHandlingState Operational state counters
      Returns:
      Error Handling State
    • buildGracefulRestart

      public static @NonNull GracefulRestart buildGracefulRestart(@NonNull BGPGracelfulRestartState neighbor)
      Builds Graceful Restart containing Graceful Restart State from BGPGracelfulRestartState counters.
      Parameters:
      neighbor - BGPPeerState containing Operational state counters
      Returns:
      Graceful Restart
    • buildAfisSafis

      public static AfiSafis buildAfisSafis(@NonNull BGPPeerState neighbor, @NonNull BGPTableTypeRegistryConsumer bgpTableTypeRegistry)
      Builds Neighbor Afi Safi containing AfiSafi State.
      Parameters:
      neighbor - BGPPeerState containing Operational state counters
      Returns:
      Afi Safis
    • buildCapabilityState

      public static NeighborStateAugmentation buildCapabilityState(@NonNull BGPSessionState neighbor)
      Builds Neighbor State containing Capabilities State, session State.
      Returns:
      Neighbor State
    • buildMessageState

      public static @NonNull BgpNeighborStateAugmentation buildMessageState(@NonNull BGPPeerMessagesState neighbor)
      Builds Bgp Neighbor State containing Message State.
      Returns:
      BgpNeighborState containing Message State
    • buildErrorHandlingState

      public static @NonNull NeighborErrorHandlingStateAugmentation buildErrorHandlingState(long erroneousUpdateCount)
      Builds Neighbor Error Handling State.
      Parameters:
      erroneousUpdateCount - erroneous Update Count
      Returns:
      Error Handling State
    • buildAfisSafisState

      public static @NonNull Map<AfiSafiKey,AfiSafi> buildAfisSafisState(@NonNull BGPAfiSafiState neighbor, @NonNull BGPTableTypeRegistryConsumer bgpTableTypeRegistry)
      Build List of afi safi containing State per Afi Safi.
      Returns:
      AfiSafi List
    • buildSupportedCapabilities

      public static @NonNull Set<BgpCapability> buildSupportedCapabilities(@NonNull BGPSessionState neighbor)
      Builds List of BgpCapability supported capabilities.
      Returns:
      List containing supported capabilities