Class BgpManager

  • All Implemented Interfaces:
    java.lang.AutoCloseable, IBgpManager

    @Singleton
    public class BgpManager
    extends java.lang.Object
    implements java.lang.AutoCloseable, IBgpManager
    • Constructor Detail

    • Method Detail

      • init

        @PostConstruct
        public void init()
      • close

        @PreDestroy
        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • configureGR

        public void configureGR​(int stalepathTime)
      • delGracefulRestart

        public void delGracefulRestart()
      • addNeighbor

        public void addNeighbor​(java.lang.String ipAddress,
                                long asNum,
                                @Nullable TcpMd5SignaturePasswordType md5Password)
      • addEbgpMultihop

        public void addEbgpMultihop​(java.lang.String ipAddress,
                                    int nhops)
      • addUpdateSource

        public void addUpdateSource​(java.lang.String ipAddress,
                                    java.lang.String srcIp)
      • addAddressFamily

        public void addAddressFamily​(java.lang.String ipAddress,
                                     af_afi afi,
                                     af_safi safi)
      • deleteNeighbor

        public void deleteNeighbor​(java.lang.String ipAddress)
      • addVrf

        public void addVrf​(java.lang.String rd,
                           java.util.Collection<java.lang.String> importRts,
                           java.util.Collection<java.lang.String> exportRts,
                           AddressFamily addressFamily)
        Description copied from interface: IBgpManager
        Create one VPN Context per address-family. VPN contexts apply to MPLS or VXLAN overlays. Passing IPv4 or IPv6 will create VPN context for MPLS, with IPv4 or IPv6 (or both) If L2VPN is passed as parameter, then IPv4 EVPN will be set too.
        Specified by:
        addVrf in interface IBgpManager
        Parameters:
        rd - is the route distinguisher to used for this vrf for the VPN.
        importRts - the import rd(s) for this vrf
        exportRts - the export rd(s) for this vrf
        addressFamily - is used to pass the nature of the VPN context : IPv4, IPv6, or EVPN.
      • deleteVrf

        public void deleteVrf​(java.lang.String rd,
                              boolean removeFibTable,
                              AddressFamily addressFamily)
        Description copied from interface: IBgpManager
        Delete onv VPN table. VPN contexts apply to MPLS or VXLAN overlays. Passing IPv4 or IPv6 will unset VPN context for MPLS, with IPv4 or IPv6 (or both) If L2VPN is passed as parameter, then IPv4 EVPN will be unset too.
        Specified by:
        deleteVrf in interface IBgpManager
        Parameters:
        rd - the route distinguisher to define the vrf to delete
        removeFibTable - true to remove to fib table
        addressFamily - is used to pass the nature of the VPN context : IPv4, IPv6, or EVPN.
      • getAllPeerStatus

        public void getAllPeerStatus()
      • addPrefix

        public void addPrefix​(java.lang.String rd,
                              java.lang.String macAddress,
                              java.lang.String prefix,
                              java.util.List<java.lang.String> nextHopList,
                              VrfEntryBase.EncapType encapType,
                              org.opendaylight.yangtools.yang.common.Uint32 vpnLabel,
                              org.opendaylight.yangtools.yang.common.Uint32 l3vni,
                              java.lang.String gatewayMac,
                              RouteOrigin origin)
        Description copied from interface: IBgpManager
        Adds one or more routes, as many as nexthops provided, in a BGP neighbour. It persists VrfEntry in datastore and sends the BGP message.
        Specified by:
        addPrefix in interface IBgpManager
      • addPrefix

        public void addPrefix​(java.lang.String rd,
                              java.lang.String macAddress,
                              java.lang.String prefix,
                              java.lang.String nextHop,
                              VrfEntryBase.EncapType encapType,
                              org.opendaylight.yangtools.yang.common.Uint32 vpnLabel,
                              org.opendaylight.yangtools.yang.common.Uint32 l3vni,
                              java.lang.String gatewayMac,
                              RouteOrigin origin)
        Description copied from interface: IBgpManager
        Adds a route in a BGP neighbour. It persists the VrfEntry in Datastore and sends the BGP message.
        Specified by:
        addPrefix in interface IBgpManager
      • deletePrefix

        public void deletePrefix​(java.lang.String rd,
                                 java.lang.String prefix)
        Specified by:
        deletePrefix in interface IBgpManager
      • advertisePrefix

        public void advertisePrefix​(java.lang.String rd,
                                    java.lang.String macAddress,
                                    java.lang.String prefix,
                                    java.util.List<java.lang.String> nextHopList,
                                    VrfEntryBase.EncapType encapType,
                                    org.opendaylight.yangtools.yang.common.Uint32 vpnLabel,
                                    org.opendaylight.yangtools.yang.common.Uint32 l3vni,
                                    org.opendaylight.yangtools.yang.common.Uint32 l2vni,
                                    java.lang.String gatewayMac)
        Description copied from interface: IBgpManager
        Advertises a Prefix to a BGP neighbour, using several nexthops. Only sends the BGP messages, no writing to MD-SAL.
        Specified by:
        advertisePrefix in interface IBgpManager
      • advertisePrefix

        public void advertisePrefix​(java.lang.String rd,
                                    java.lang.String macAddress,
                                    java.lang.String prefix,
                                    java.lang.String nextHop,
                                    VrfEntryBase.EncapType encapType,
                                    org.opendaylight.yangtools.yang.common.Uint32 vpnLabel,
                                    org.opendaylight.yangtools.yang.common.Uint32 l3vni,
                                    org.opendaylight.yangtools.yang.common.Uint32 l2vni,
                                    java.lang.String gatewayMac)
        Description copied from interface: IBgpManager
        Advertises a Prefix to a BGP neighbour. Only sends the BGP messages, no writing to MD-SAL.
        Specified by:
        advertisePrefix in interface IBgpManager
      • withdrawPrefix

        public void withdrawPrefix​(java.lang.String rd,
                                   java.lang.String prefix)
        Specified by:
        withdrawPrefix in interface IBgpManager
      • withdrawPrefixIfPresent

        public void withdrawPrefixIfPresent​(java.lang.String rd,
                                            java.lang.String prefix)
        Specified by:
        withdrawPrefixIfPresent in interface IBgpManager
      • setQbgpLog

        public void setQbgpLog​(java.lang.String fileName,
                               java.lang.String debugLevel)
        Specified by:
        setQbgpLog in interface IBgpManager
      • delLogging

        public void delLogging()
      • startBgp

        public void startBgp​(long asn,
                             java.lang.String routerId,
                             int spt,
                             boolean fbit)
      • stopBgp

        public void stopBgp()
      • startConfig

        public void startConfig​(java.lang.String host,
                                int port)
      • stopConfig

        public void stopConfig()
      • getConfig

        public Bgp getConfig()
      • startBfd

        public void startBfd​(int detectMult,
                             int minRx,
                             int minTx,
                             boolean multiHop)
      • stopBfd

        public void stopBfd()
      • addDcgwTep

        public void addDcgwTep​(java.lang.String dcgwIp,
                               java.lang.String tepIp)
      • delDcgwTep

        public void delDcgwTep​(java.lang.String dcgwIp,
                               java.lang.String tepIp)
      • enableMultipath

        public void enableMultipath​(af_afi afi,
                                    af_safi safi)
      • disableMultipath

        public void disableMultipath​(af_afi afi,
                                     af_safi safi)
      • setMultipaths

        public void setMultipaths​(java.lang.String rd,
                                  int maxpath)
      • getDCGwIP

        public java.lang.String getDCGwIP()
        Specified by:
        getDCGwIP in interface IBgpManager
      • getConfigHost

        public java.lang.String getConfigHost()
      • getConfigPort

        public int getConfigPort()
      • getBgpManager

        public BgpManager getBgpManager()
      • isBgpConnected

        public boolean isBgpConnected()
      • getLastConnectedTS

        public long getLastConnectedTS()
      • getConnectTS

        public long getConnectTS()
      • getStartTS

        public long getStartTS()
      • getQbgprestartTS

        public long getQbgprestartTS()
      • getStaleStartTime

        public long getStaleStartTime()
      • getStaleEndTime

        public long getStaleEndTime()
      • getCfgReplayStartTime

        public long getCfgReplayStartTime()
      • getCfgReplayEndTime

        public long getCfgReplayEndTime()
      • getStaleCleanupTime

        public long getStaleCleanupTime()