Class VpnManagerImpl
- java.lang.Object
-
- org.opendaylight.netvirt.vpnmanager.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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, @NonNull org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> operTx)
@Nullable VpnPortipToPort
getNeutronPortFromVpnPortFixedIp(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String vpnName, java.lang.String fixedIp)
VpnPortipToPort
getNeutronPortFromVpnPortFixedIp(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, 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.mdsal.binding.api.DataBroker broker, java.lang.String vpnName)
java.lang.String
getVpnRd(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, 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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.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.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.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.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
void
start()
void
updateRouteTargetsToSubnetAssociation(java.util.Set<VpnTarget> routeTargets, java.lang.String cidr, java.lang.String vpnName)
-
-
-
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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
- Specified by:
addExtraRoute
in interfaceIVpnManager
-
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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, @NonNull org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> operTx)
- Specified by:
delExtraRoute
in interfaceIVpnManager
-
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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, org.opendaylight.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Operational> operTx)
- Specified by:
removePrefixFromBGP
in interfaceIVpnManager
-
isVPNConfigured
public boolean isVPNConfigured()
- Specified by:
isVPNConfigured
in interfaceIVpnManager
-
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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
addSubnetMacIntoVpnInstance
in interfaceIVpnManager
- 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.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
removeSubnetMacFromVpnInstance
in interfaceIVpnManager
- 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.mdsal.binding.util.TypedWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
addRouterGwMacFlow
in interfaceIVpnManager
- 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.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Specified by:
removeRouterGwMacFlow
in interfaceIVpnManager
- 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 interfaceIVpnManager
-
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 interfaceIVpnManager
-
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 interfaceIVpnManager
-
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 interfaceIVpnManager
-
getPrimaryRdFromVpnInstance
public java.lang.String getPrimaryRdFromVpnInstance(VpnInstance vpnInstance)
- Specified by:
getPrimaryRdFromVpnInstance
in interfaceIVpnManager
-
onSubnetAddedToVpn
public void onSubnetAddedToVpn(Subnetmap subnetmap, boolean isBgpVpn, java.lang.Long elanTag)
- Specified by:
onSubnetAddedToVpn
in interfaceIVpnManager
-
onSubnetDeletedFromVpn
public void onSubnetDeletedFromVpn(Subnetmap subnetmap, boolean isBgpVpn)
- Specified by:
onSubnetDeletedFromVpn
in interfaceIVpnManager
-
getVpnInstance
public @Nullable VpnInstance getVpnInstance(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String vpnInstanceName)
- Specified by:
getVpnInstance
in interfaceIVpnManager
-
getVpnRd
public java.lang.String getVpnRd(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, java.lang.String vpnName)
- Specified by:
getVpnRd
in interfaceIVpnManager
-
getVpnRd
public java.lang.String getVpnRd(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String vpnName)
- Specified by:
getVpnRd
in interfaceIVpnManager
-
getNeutronPortFromVpnPortFixedIp
public VpnPortipToPort getNeutronPortFromVpnPortFixedIp(org.opendaylight.mdsal.binding.util.TypedReadTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx, java.lang.String vpnName, java.lang.String fixedIp)
- Specified by:
getNeutronPortFromVpnPortFixedIp
in interfaceIVpnManager
-
getNeutronPortFromVpnPortFixedIp
public @Nullable VpnPortipToPort getNeutronPortFromVpnPortFixedIp(org.opendaylight.mdsal.binding.api.DataBroker broker, java.lang.String vpnName, java.lang.String fixedIp)
- Specified by:
getNeutronPortFromVpnPortFixedIp
in interfaceIVpnManager
-
getRtListForVpn
public java.util.Set<VpnTarget> getRtListForVpn(java.lang.String vpnName)
- Specified by:
getRtListForVpn
in interfaceIVpnManager
-
updateRouteTargetsToSubnetAssociation
public void updateRouteTargetsToSubnetAssociation(java.util.Set<VpnTarget> routeTargets, java.lang.String cidr, java.lang.String vpnName)
- Specified by:
updateRouteTargetsToSubnetAssociation
in interfaceIVpnManager
-
removeRouteTargetsToSubnetAssociation
public void removeRouteTargetsToSubnetAssociation(java.util.Set<VpnTarget> routeTargets, java.lang.String cidr, java.lang.String vpnName)
- Specified by:
removeRouteTargetsToSubnetAssociation
in interfaceIVpnManager
-
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 interfaceIVpnManager
-
-