Class NexthopManager

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    @Singleton
    public class NexthopManager
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Summary

      Constructors 
      Constructor Description
      NexthopManager​(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalApiManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService odlInterfaceRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.lockmanager.rev160413.LockManagerService lockManager, IElanService elanService, org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService salGroupService, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, FibUtil fibUtil, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager)
      Provides nexthop functions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addVpnNexthopToDS​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String primaryIpAddr, java.lang.String currIpAddr, long egressPointer)  
      void close()  
      void createDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String destinationIp, java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)  
      long createLocalNextHop​(org.opendaylight.yangtools.yang.common.Uint32 vpnId, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String ifName, java.lang.String primaryIpAddress, java.lang.String currDestIpPrefix, java.lang.String gwMacAddress, org.opendaylight.yangtools.yang.common.Uint32 parentVpnId)  
      protected long createNextHopPointer​(java.lang.String nexthopKey)  
      protected void deleteLoadBalancingNextHop​(org.opendaylight.yangtools.yang.common.Uint32 parentVpnId, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String destPrefix)  
      L3VPNTransportTypes getConfiguredTransportTypeL3VPN()  
      org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ConfTransportTypeL3vpn> getConfTransportTypeIdentifier()  
      protected java.util.List<org.opendaylight.genius.mdsalutil.ActionInfo> getEgressActionsForInterface​(java.lang.String ifName, int actionKey, boolean isTunnelInterface, org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String destIpPrefix)  
      org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService getItmManager()  
      long getLocalNextHopGroup​(org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String ipNextHopAddress)  
      long getLocalSelectGroup​(org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String ipNextHopAddress)  
      @Nullable org.opendaylight.netvirt.fibmanager.NexthopManager.AdjacencyResult getRemoteNextHopPointer​(org.opendaylight.yangtools.yang.common.Uint64 remoteDpnId, org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String prefixIp, @Nullable java.lang.String nextHopIp, java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)  
      java.lang.String getReqTransType()  
      java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> getReqTunType​(java.lang.String transportType)  
      java.lang.String getTransportTypeStr​(java.lang.String tunType)  
      protected @Nullable java.lang.String getTunnelInterfaceName​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress dstIp, java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)  
      protected @Nullable java.lang.String getTunnelInterfaceName​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId, org.opendaylight.yangtools.yang.common.Uint64 dstDpId)  
      protected @Nullable VpnNexthop getVpnNexthop​(org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String ipAddress)  
      protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IpAdjacencies> getVpnNextHopIpPrefixIdentifier​(org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String primaryIpAddress, java.lang.String ipPrefix)  
      void programDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String destinationIp, int addRemoveOrUpdate, boolean isTunnelUp, java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)  
      void removeDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String destinationIp)
      This method is invoked when the neighbor is removed from DS.
      void removeLocalNextHop​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 vpnId, java.lang.String primaryIpAddress, java.lang.String currDestIpPrefix)  
      protected void removeNextHopPointer​(java.lang.String nexthopKey)  
      void setConfTransType​(java.lang.String service, java.lang.String transportType)  
      protected long setupLoadBalancingNextHop​(org.opendaylight.yangtools.yang.common.Uint32 parentVpnId, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String destPrefix, java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo> localBucketInfo, java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo> remoteBucketInfo)  
      void updateDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String destinationIp, boolean isTunnelUp, java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)
      This method is invoked when the tunnel status is deleted.
      void writeConfTransTypeConfigDS()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NexthopManager

        @Inject
        public NexthopManager​(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
                              org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalApiManager,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService odlInterfaceRpcService,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmManager,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.genius.lockmanager.rev160413.LockManagerService lockManager,
                              IElanService elanService,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService salGroupService,
                              org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator,
                              FibUtil fibUtil,
                              org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager)
        Provides nexthop functions. Creates group ID pool
        Parameters:
        dataBroker - - dataBroker reference
        mdsalApiManager - - mdsalApiManager reference
        idManager - - idManager reference
        odlInterfaceRpcService - - odlInterfaceRpcService reference
        itmManager - - itmManager reference
    • Method Detail

      • getItmManager

        public org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService getItmManager()
      • createNextHopPointer

        protected long createNextHopPointer​(java.lang.String nexthopKey)
      • removeNextHopPointer

        protected void removeNextHopPointer​(java.lang.String nexthopKey)
      • getEgressActionsForInterface

        protected java.util.List<org.opendaylight.genius.mdsalutil.ActionInfo> getEgressActionsForInterface​(java.lang.String ifName,
                                                                                                            int actionKey,
                                                                                                            boolean isTunnelInterface,
                                                                                                            org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                                                                                            java.lang.String destIpPrefix)
      • getTunnelInterfaceName

        protected @Nullable java.lang.String getTunnelInterfaceName​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId,
                                                                    org.opendaylight.yangtools.yang.common.Uint64 dstDpId)
      • getTunnelInterfaceName

        protected @Nullable java.lang.String getTunnelInterfaceName​(org.opendaylight.yangtools.yang.common.Uint64 srcDpId,
                                                                    org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress dstIp,
                                                                    java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)
      • getLocalNextHopGroup

        public long getLocalNextHopGroup​(org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                         java.lang.String ipNextHopAddress)
      • getLocalSelectGroup

        public long getLocalSelectGroup​(org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                        java.lang.String ipNextHopAddress)
      • createLocalNextHop

        public long createLocalNextHop​(org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                       org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                       java.lang.String ifName,
                                       java.lang.String primaryIpAddress,
                                       java.lang.String currDestIpPrefix,
                                       java.lang.String gwMacAddress,
                                       org.opendaylight.yangtools.yang.common.Uint32 parentVpnId)
      • addVpnNexthopToDS

        protected void addVpnNexthopToDS​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                         org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                         java.lang.String primaryIpAddr,
                                         java.lang.String currIpAddr,
                                         long egressPointer)
      • getVpnNextHopIpPrefixIdentifier

        protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<IpAdjacencies> getVpnNextHopIpPrefixIdentifier​(org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                                                                                                            java.lang.String primaryIpAddress,
                                                                                                                            java.lang.String ipPrefix)
      • getVpnNexthop

        protected @Nullable VpnNexthop getVpnNexthop​(org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                                     java.lang.String ipAddress)
      • getRemoteNextHopPointer

        public @Nullable org.opendaylight.netvirt.fibmanager.NexthopManager.AdjacencyResult getRemoteNextHopPointer​(org.opendaylight.yangtools.yang.common.Uint64 remoteDpnId,
                                                                                                                    org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                                                                                                    java.lang.String prefixIp,
                                                                                                                    @Nullable java.lang.String nextHopIp,
                                                                                                                    java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)
      • removeLocalNextHop

        public void removeLocalNextHop​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                       org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                       java.lang.String primaryIpAddress,
                                       java.lang.String currDestIpPrefix)
      • setConfTransType

        public void setConfTransType​(java.lang.String service,
                                     java.lang.String transportType)
      • writeConfTransTypeConfigDS

        public void writeConfTransTypeConfigDS()
      • getConfiguredTransportTypeL3VPN

        public L3VPNTransportTypes getConfiguredTransportTypeL3VPN()
      • getReqTransType

        public java.lang.String getReqTransType()
      • getConfTransportTypeIdentifier

        public org.opendaylight.yangtools.yang.binding.InstanceIdentifier<ConfTransportTypeL3vpn> getConfTransportTypeIdentifier()
      • getReqTunType

        public java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> getReqTunType​(java.lang.String transportType)
      • getTransportTypeStr

        public java.lang.String getTransportTypeStr​(java.lang.String tunType)
      • close

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

        protected long setupLoadBalancingNextHop​(org.opendaylight.yangtools.yang.common.Uint32 parentVpnId,
                                                 org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                 java.lang.String destPrefix,
                                                 java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo> localBucketInfo,
                                                 java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo> remoteBucketInfo)
      • deleteLoadBalancingNextHop

        protected void deleteLoadBalancingNextHop​(org.opendaylight.yangtools.yang.common.Uint32 parentVpnId,
                                                  org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                  java.lang.String destPrefix)
      • createDcGwLoadBalancingGroup

        public void createDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                 java.lang.String destinationIp,
                                                 java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)
      • removeDcGwLoadBalancingGroup

        public void removeDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                 java.lang.String destinationIp)
        This method is invoked when the neighbor is removed from DS. All the LB groups which point to the given destination will be deleted.
      • updateDcGwLoadBalancingGroup

        public void updateDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                 java.lang.String destinationIp,
                                                 boolean isTunnelUp,
                                                 java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)
        This method is invoked when the tunnel status is deleted. All the buckets which point to given destination will be marked down.
      • programDcGwLoadBalancingGroup

        public void programDcGwLoadBalancingGroup​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                  java.lang.String destinationIp,
                                                  int addRemoveOrUpdate,
                                                  boolean isTunnelUp,
                                                  java.lang.Class<? extends org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase> tunnelType)