Class VpnManagerImpl

  • All Implemented Interfaces:
    IVpnManager

    @Singleton
    public class VpnManagerImpl
    extends java.lang.Object
    implements IVpnManager
    • Constructor Summary

      Constructors 
      Constructor Description
      VpnManagerImpl​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManagerService, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, IElanService elanService, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, VpnSubnetRouteHandler vpnSubnetRouteHandler, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService ifaceMgrRpcService, IVpnLinkService ivpnLinkService, IFibManager fibManager, IBgpManager bgpManager, InterVpnLinkCache interVpnLinkCache, org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar dataTreeEventCallbackRegistrar, org.opendaylight.serviceutils.upgrade.UpgradeState upgradeState, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, VpnUtil vpnUtil)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addArpResponderFlowsToExternalNetworkIps​(java.lang.String id, java.util.Collection<java.lang.String> fixedIps, java.lang.String macAddress, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String extInterfaceName, int lportTag)  
      void addArpResponderFlowsToExternalNetworkIps​(java.lang.String id, java.util.Collection<java.lang.String> fixedIps, java.lang.String macAddress, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId)  
      void addExtraRoute​(java.lang.String vpnName, java.lang.String destination, java.lang.String nextHop, java.lang.String rd, @Nullable java.lang.String routerID, org.opendaylight.yangtools.yang.common.Uint32 l3vni, RouteOrigin origin, @Nullable java.lang.String intfName, @Nullable Adjacency operationalAdj, VrfEntryBase.EncapType encapType, java.util.Set<java.lang.String> prefixListForRefreshFib, @NonNull org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)  
      void addRouterGwMacFlow​(java.lang.String routerName, java.lang.String routerGwMac, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId, java.lang.String subnetVpnName, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)  
      void addSubnetMacIntoVpnInstance​(java.lang.String vpnName, java.lang.String subnetVpnName, java.lang.String srcMacAddress, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)  
      boolean checkForOverlappingSubnets​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid network, java.util.List<Subnetmap> subnetmapList, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid vpn, java.util.Set<VpnTarget> routeTargets, java.util.List<java.lang.String> failedNwList)  
      void delExtraRoute​(java.lang.String vpnName, java.lang.String destination, java.lang.String nextHop, java.lang.String rd, @Nullable java.lang.String routerID, @Nullable java.lang.String intfName, @NonNull org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, @NonNull org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> operTx)  
      VpnPortipToPort getNeutronPortFromVpnPortFixedIp​(org.opendaylight.genius.infra.TypedReadTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, java.lang.String vpnName, java.lang.String fixedIp)  
      @Nullable VpnPortipToPort getNeutronPortFromVpnPortFixedIp​(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String vpnName, java.lang.String fixedIp)  
      java.lang.String getPrimaryRdFromVpnInstance​(VpnInstance vpnInstance)  
      java.util.Set<VpnTarget> getRtListForVpn​(java.lang.String vpnName)  
      @Nullable VpnInstance getVpnInstance​(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String vpnInstanceName)  
      java.lang.String getVpnRd​(org.opendaylight.genius.infra.TypedReadTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, java.lang.String vpnName)  
      java.lang.String getVpnRd​(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String vpnName)  
      boolean isVPNConfigured()  
      void onSubnetAddedToVpn​(Subnetmap subnetmap, boolean isBgpVpn, java.lang.Long elanTag)  
      void onSubnetDeletedFromVpn​(Subnetmap subnetmap, boolean isBgpVpn)  
      void removeArpResponderFlowsToExternalNetworkIps​(java.lang.String id, java.util.Collection<java.lang.String> fixedIps, java.lang.String macAddress, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId)  
      void removeArpResponderFlowsToExternalNetworkIps​(java.lang.String id, java.util.Collection<java.lang.String> fixedIps, org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String extInterfaceName, int lportTag)  
      void removePrefixFromBGP​(java.lang.String vpnName, java.lang.String primaryRd, java.lang.String extraRouteRd, java.lang.String vpnInterfaceName, java.lang.String prefix, java.lang.String nextHop, java.lang.String nextHopTunnelIp, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> operTx)  
      void removeRouterGwMacFlow​(java.lang.String routerName, java.lang.String routerGwMac, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId, java.lang.String subnetVpnName, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)  
      void removeRouteTargetsToSubnetAssociation​(java.util.Set<VpnTarget> routeTargets, java.lang.String cidr, java.lang.String vpnName)  
      void removeSubnetMacFromVpnInstance​(java.lang.String vpnName, java.lang.String subnetVpnName, java.lang.String srcMacAddress, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)  
      void start()  
      void updateRouteTargetsToSubnetAssociation​(java.util.Set<VpnTarget> routeTargets, java.lang.String cidr, java.lang.String vpnName)  
      • Methods inherited from class java.lang.Object

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

      • VpnManagerImpl

        @Inject
        public VpnManagerImpl​(org.opendaylight.mdsal.binding.api.DataBroker dataBroker,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManagerService,
                              org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
                              IElanService elanService,
                              org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager,
                              VpnSubnetRouteHandler vpnSubnetRouteHandler,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService ifaceMgrRpcService,
                              IVpnLinkService ivpnLinkService,
                              IFibManager fibManager,
                              IBgpManager bgpManager,
                              InterVpnLinkCache interVpnLinkCache,
                              org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar dataTreeEventCallbackRegistrar,
                              org.opendaylight.serviceutils.upgrade.UpgradeState upgradeState,
                              org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService,
                              VpnUtil vpnUtil)
    • Method Detail

      • start

        @PostConstruct
        public void start()
      • addExtraRoute

        public void addExtraRoute​(java.lang.String vpnName,
                                  java.lang.String destination,
                                  java.lang.String nextHop,
                                  java.lang.String rd,
                                  @Nullable java.lang.String routerID,
                                  org.opendaylight.yangtools.yang.common.Uint32 l3vni,
                                  RouteOrigin origin,
                                  @Nullable java.lang.String intfName,
                                  @Nullable Adjacency operationalAdj,
                                  VrfEntryBase.EncapType encapType,
                                  java.util.Set<java.lang.String> prefixListForRefreshFib,
                                  @NonNull org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)
        Specified by:
        addExtraRoute in interface IVpnManager
      • delExtraRoute

        public void delExtraRoute​(java.lang.String vpnName,
                                  java.lang.String destination,
                                  java.lang.String nextHop,
                                  java.lang.String rd,
                                  @Nullable java.lang.String routerID,
                                  @Nullable java.lang.String intfName,
                                  @NonNull org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
                                  @NonNull org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> operTx)
        Specified by:
        delExtraRoute in interface IVpnManager
      • removePrefixFromBGP

        public void removePrefixFromBGP​(java.lang.String vpnName,
                                        java.lang.String primaryRd,
                                        java.lang.String extraRouteRd,
                                        java.lang.String vpnInterfaceName,
                                        java.lang.String prefix,
                                        java.lang.String nextHop,
                                        java.lang.String nextHopTunnelIp,
                                        org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                        org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
                                        org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> operTx)
        Specified by:
        removePrefixFromBGP in interface IVpnManager
      • addSubnetMacIntoVpnInstance

        public void addSubnetMacIntoVpnInstance​(java.lang.String vpnName,
                                                java.lang.String subnetVpnName,
                                                java.lang.String srcMacAddress,
                                                org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)
                                         throws java.util.concurrent.ExecutionException,
                                                java.lang.InterruptedException
        Specified by:
        addSubnetMacIntoVpnInstance in interface IVpnManager
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • removeSubnetMacFromVpnInstance

        public void removeSubnetMacFromVpnInstance​(java.lang.String vpnName,
                                                   java.lang.String subnetVpnName,
                                                   java.lang.String srcMacAddress,
                                                   org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                   org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)
                                            throws java.util.concurrent.ExecutionException,
                                                   java.lang.InterruptedException
        Specified by:
        removeSubnetMacFromVpnInstance in interface IVpnManager
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • addRouterGwMacFlow

        public void addRouterGwMacFlow​(java.lang.String routerName,
                                       java.lang.String routerGwMac,
                                       org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                       org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId,
                                       java.lang.String subnetVpnName,
                                       org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)
                                throws java.util.concurrent.ExecutionException,
                                       java.lang.InterruptedException
        Specified by:
        addRouterGwMacFlow in interface IVpnManager
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • removeRouterGwMacFlow

        public void removeRouterGwMacFlow​(java.lang.String routerName,
                                          java.lang.String routerGwMac,
                                          org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                          org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId,
                                          java.lang.String subnetVpnName,
                                          org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx)
                                   throws java.util.concurrent.ExecutionException,
                                          java.lang.InterruptedException
        Specified by:
        removeRouterGwMacFlow in interface IVpnManager
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • addArpResponderFlowsToExternalNetworkIps

        public void addArpResponderFlowsToExternalNetworkIps​(java.lang.String id,
                                                             java.util.Collection<java.lang.String> fixedIps,
                                                             java.lang.String macAddress,
                                                             org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId)
        Specified by:
        addArpResponderFlowsToExternalNetworkIps in interface IVpnManager
      • addArpResponderFlowsToExternalNetworkIps

        public void addArpResponderFlowsToExternalNetworkIps​(java.lang.String id,
                                                             java.util.Collection<java.lang.String> fixedIps,
                                                             java.lang.String macAddress,
                                                             org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                             java.lang.String extInterfaceName,
                                                             int lportTag)
        Specified by:
        addArpResponderFlowsToExternalNetworkIps in interface IVpnManager
      • removeArpResponderFlowsToExternalNetworkIps

        public void removeArpResponderFlowsToExternalNetworkIps​(java.lang.String id,
                                                                java.util.Collection<java.lang.String> fixedIps,
                                                                java.lang.String macAddress,
                                                                org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid extNetworkId)
        Specified by:
        removeArpResponderFlowsToExternalNetworkIps in interface IVpnManager
      • removeArpResponderFlowsToExternalNetworkIps

        public void removeArpResponderFlowsToExternalNetworkIps​(java.lang.String id,
                                                                java.util.Collection<java.lang.String> fixedIps,
                                                                org.opendaylight.yangtools.yang.common.Uint64 dpnId,
                                                                java.lang.String extInterfaceName,
                                                                int lportTag)
        Specified by:
        removeArpResponderFlowsToExternalNetworkIps in interface IVpnManager
      • getVpnInstance

        public @Nullable VpnInstance getVpnInstance​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                                    java.lang.String vpnInstanceName)
        Specified by:
        getVpnInstance in interface IVpnManager
      • getVpnRd

        public java.lang.String getVpnRd​(org.opendaylight.genius.infra.TypedReadTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
                                         java.lang.String vpnName)
        Specified by:
        getVpnRd in interface IVpnManager
      • getVpnRd

        public java.lang.String getVpnRd​(org.opendaylight.mdsal.binding.api.DataBroker broker,
                                         java.lang.String vpnName)
        Specified by:
        getVpnRd in interface IVpnManager
      • getNeutronPortFromVpnPortFixedIp

        public VpnPortipToPort getNeutronPortFromVpnPortFixedIp​(org.opendaylight.genius.infra.TypedReadTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
                                                                java.lang.String vpnName,
                                                                java.lang.String fixedIp)
        Specified by:
        getNeutronPortFromVpnPortFixedIp in interface IVpnManager
      • checkForOverlappingSubnets

        public boolean checkForOverlappingSubnets​(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid network,
                                                  java.util.List<Subnetmap> subnetmapList,
                                                  org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid vpn,
                                                  java.util.Set<VpnTarget> routeTargets,
                                                  java.util.List<java.lang.String> failedNwList)
        Specified by:
        checkForOverlappingSubnets in interface IVpnManager