Class VpnInterfaceManager

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.util.EventListener, org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener<VpnInterface>, org.opendaylight.serviceutils.tools.mdsal.listener.ChainableDataTreeChangeListener<VpnInterface>

    @Singleton
    public class VpnInterfaceManager
    extends org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<VpnInterface,​VpnInterfaceManager>
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase

        org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase.DataTreeChangeHandler
    • Field Summary

      • Fields inherited from class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase

        clazz
    • Constructor Summary

      Constructors 
      Constructor Description
      VpnInterfaceManager​(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, IBgpManager bgpManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, IFibManager fibManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService ifaceMgrRpcService, VpnFootprintService vpnFootprintService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, IVpnManager vpnManager, ArpResponderHandler arpResponderHandler, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, org.opendaylight.infrautils.caches.CacheProvider cacheProvider, VpnUtil vpnUtil)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterface> identifier, VpnInterface vpnInterface)  
      protected void addNewAdjToVpnInterface​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterfaceOpDataEntry> identifier, java.lang.String primaryRd, Adjacency adj, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn, java.util.Set<java.lang.String> prefixListForRefreshFib)  
      void close()  
      protected void createFibEntryForRouterInterface​(java.lang.String primaryRd, VpnInterface vpnInterface, java.lang.String interfaceName, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, java.lang.String vpnName)  
      protected void delAdjFromVpnInterface​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterfaceOpDataEntry> identifier, Adjacency adj, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn)  
      protected void deleteFibEntryForRouterInterface​(VpnInterface vpnInterface, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, java.lang.String vpnName)  
      protected VpnInterfaceManager getDataTreeChangeListener()  
      protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterface> getWildCardPath()  
      void importSubnetRouteForNewVpn​(java.lang.String rd, java.lang.String prefix, java.lang.String nextHop, org.opendaylight.yangtools.yang.common.Uint32 label, SubnetRoute route, java.lang.String parentVpnRd, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn)  
      java.lang.Runnable isNotifyTaskQueued​(java.lang.String intfName)  
      boolean isVpnInstanceReady​(java.lang.String vpnInstanceName)  
      void processSavedInterfaces​(java.lang.String vpnInstanceName, boolean hasVpnInstanceCreatedSuccessfully)  
      protected void processVpnInterfaceAdjacencies​(org.opendaylight.yangtools.yang.common.Uint64 dpnId, int lportTag, java.lang.String vpnName, java.lang.String primaryRd, java.lang.String interfaceName, org.opendaylight.yangtools.yang.common.Uint32 vpnId, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface interfaceState, java.util.Set<java.lang.String> prefixListForRefreshFib)  
      protected void processVpnInterfaceDown​(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String interfaceName, int lportTag, java.lang.String gwMac, VpnInterfaceOpDataEntry vpnOpInterface, boolean isInterfaceStateDown, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn)  
      protected void processVpnInterfaceUp​(org.opendaylight.yangtools.yang.common.Uint64 dpId, VpnInterface vpnInterface, java.lang.String primaryRd, int lportTag, boolean isInterfaceUp, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface interfaceState, java.lang.String vpnName, java.util.Set<java.lang.String> prefixListForRefreshFib)  
      void remove​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterface> identifier, VpnInterface vpnInterface)  
      void start()  
      protected void update​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterface> identifier, VpnInterface original, VpnInterface update)  
      void updateVpnInterfaceOnTepAdd​(VpnInterfaceOpDataEntry vpnInterface, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelList stateTunnelList, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn)  
      void updateVpnInterfaceOnTepDelete​(VpnInterfaceOpDataEntry vpnInterface, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelList stateTunnelList, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn)  
      void updateVpnInterfacesForUnProcessAdjancencies​(java.lang.String vpnName)  
      void vpnInstanceFailed​(java.lang.String vpnInstanceName)  
      void vpnInstanceIsReady​(java.lang.String vpnInstanceName)  
      • Methods inherited from class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase

        addAfterListener, addBeforeListener, deregisterListener, init, onDataTreeChanged, registerListener
      • Methods inherited from class java.lang.Object

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

      • VpnInterfaceManager

        @Inject
        public VpnInterfaceManager​(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
                                   IBgpManager bgpManager,
                                   org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager,
                                   org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
                                   IFibManager fibManager,
                                   org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService ifaceMgrRpcService,
                                   VpnFootprintService vpnFootprintService,
                                   org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager,
                                   IVpnManager vpnManager,
                                   ArpResponderHandler arpResponderHandler,
                                   org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator,
                                   org.opendaylight.infrautils.caches.CacheProvider cacheProvider,
                                   VpnUtil vpnUtil)
    • Method Detail

      • isNotifyTaskQueued

        public java.lang.Runnable isNotifyTaskQueued​(java.lang.String intfName)
      • start

        @PostConstruct
        public void start()
      • close

        @PreDestroy
        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<VpnInterface,​VpnInterfaceManager>
      • getWildCardPath

        protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterface> getWildCardPath()
        Specified by:
        getWildCardPath in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<VpnInterface,​VpnInterfaceManager>
      • add

        public void add​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterface> identifier,
                        VpnInterface vpnInterface)
        Specified by:
        add in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<VpnInterface,​VpnInterfaceManager>
      • processVpnInterfaceUp

        protected void processVpnInterfaceUp​(org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                             VpnInterface vpnInterface,
                                             java.lang.String primaryRd,
                                             int lportTag,
                                             boolean isInterfaceUp,
                                             org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                             org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn,
                                             org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn,
                                             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface interfaceState,
                                             java.lang.String vpnName,
                                             java.util.Set<java.lang.String> prefixListForRefreshFib)
                                      throws java.util.concurrent.ExecutionException,
                                             java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • processVpnInterfaceAdjacencies

        protected void processVpnInterfaceAdjacencies​(org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                      int lportTag,
                                                      java.lang.String vpnName,
                                                      java.lang.String primaryRd,
                                                      java.lang.String interfaceName,
                                                      org.opendaylight.yangtools.yang.common.Uint32 vpnId,
                                                      org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                                      org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn,
                                                      org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn,
                                                      org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface interfaceState,
                                                      java.util.Set<java.lang.String> prefixListForRefreshFib)
                                               throws java.util.concurrent.ExecutionException,
                                                      java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • updateVpnInterfaceOnTepAdd

        public void updateVpnInterfaceOnTepAdd​(VpnInterfaceOpDataEntry vpnInterface,
                                               org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelList stateTunnelList,
                                               org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                               org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn)
      • updateVpnInterfaceOnTepDelete

        public void updateVpnInterfaceOnTepDelete​(VpnInterfaceOpDataEntry vpnInterface,
                                                  org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelList stateTunnelList,
                                                  org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                                  org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn)
      • remove

        public void remove​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterface> identifier,
                           VpnInterface vpnInterface)
        Specified by:
        remove in class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<VpnInterface,​VpnInterfaceManager>
      • processVpnInterfaceDown

        protected void processVpnInterfaceDown​(org.opendaylight.yangtools.yang.common.Uint64 dpId,
                                               java.lang.String interfaceName,
                                               int lportTag,
                                               java.lang.String gwMac,
                                               VpnInterfaceOpDataEntry vpnOpInterface,
                                               boolean isInterfaceStateDown,
                                               org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                               org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn,
                                               org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn)
                                        throws java.util.concurrent.ExecutionException,
                                               java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • importSubnetRouteForNewVpn

        public void importSubnetRouteForNewVpn​(java.lang.String rd,
                                               java.lang.String prefix,
                                               java.lang.String nextHop,
                                               org.opendaylight.yangtools.yang.common.Uint32 label,
                                               SubnetRoute route,
                                               java.lang.String parentVpnRd,
                                               org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn)
      • addNewAdjToVpnInterface

        protected void addNewAdjToVpnInterface​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterfaceOpDataEntry> identifier,
                                               java.lang.String primaryRd,
                                               Adjacency adj,
                                               org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                               org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn,
                                               org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                               org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeInvTxn,
                                               java.util.Set<java.lang.String> prefixListForRefreshFib)
                                        throws java.util.concurrent.ExecutionException,
                                               java.lang.InterruptedException
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • delAdjFromVpnInterface

        protected void delAdjFromVpnInterface​(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<VpnInterfaceOpDataEntry> identifier,
                                              Adjacency adj,
                                              org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                              org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> writeOperTxn,
                                              org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn)
      • createFibEntryForRouterInterface

        protected void createFibEntryForRouterInterface​(java.lang.String primaryRd,
                                                        VpnInterface vpnInterface,
                                                        java.lang.String interfaceName,
                                                        org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                                        java.lang.String vpnName)
      • deleteFibEntryForRouterInterface

        protected void deleteFibEntryForRouterInterface​(VpnInterface vpnInterface,
                                                        org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> writeConfigTxn,
                                                        java.lang.String vpnName)
      • isVpnInstanceReady

        public boolean isVpnInstanceReady​(java.lang.String vpnInstanceName)
      • processSavedInterfaces

        public void processSavedInterfaces​(java.lang.String vpnInstanceName,
                                           boolean hasVpnInstanceCreatedSuccessfully)
      • vpnInstanceIsReady

        public void vpnInstanceIsReady​(java.lang.String vpnInstanceName)
      • vpnInstanceFailed

        public void vpnInstanceFailed​(java.lang.String vpnInstanceName)
      • updateVpnInterfacesForUnProcessAdjancencies

        public void updateVpnInterfacesForUnProcessAdjancencies​(java.lang.String vpnName)