Class NaptSwitchHA
- java.lang.Object
-
- org.opendaylight.netvirt.natservice.internal.NaptSwitchHA
-
@Singleton public class NaptSwitchHA extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NaptSwitchHA(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, ExternalRoutersListener externalRouterListener, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService odlInterfaceRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, NAPTSwitchSelector naptSwitchSelector, IFibManager fibManager, EvpnNaptSwitchHA evpnNaptSwitchHA, IElanService elanManager, SnatServiceManager natServiceManager, NatserviceConfig config, NaptEventHandler naptEventHandler, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, NatOverVxlanUtil natOverVxlanUtil)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
bestEffortDeletion(org.opendaylight.yangtools.yang.common.Uint32 routerId, java.lang.String routerName, java.util.Map<java.lang.String,org.opendaylight.yangtools.yang.common.Uint32> externalIpLabel, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
org.opendaylight.genius.mdsalutil.FlowEntity
buildSnatFlowEntity(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String routerName, long groupId, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, int addordel)
org.opendaylight.genius.mdsalutil.FlowEntity
buildSnatFlowEntityForNaptSwitch(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, int addordel)
protected @Nullable java.lang.String
getTunnelInterfaceName(org.opendaylight.yangtools.yang.common.Uint64 srcDpId, org.opendaylight.yangtools.yang.common.Uint64 dstDpId)
@NonNull java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo>
handleGroupInNeighborSwitches(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch)
protected void
installSnatFlows(java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid networkId, java.lang.String vpnName, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
protected void
installSnatGroupEntry(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo> bucketInfo, java.lang.String routerName)
boolean
isNaptSwitchDown(Routers extRouter, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, java.util.Collection<java.lang.String> externalIpCache, boolean isClearBgpRts, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
boolean
isNaptSwitchDown(Routers extRouter, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, java.util.Collection<java.lang.String> externalIpCache, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
protected void
removeSnatFlowsInOldNaptSwitch(Routers extRouter, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, @Nullable java.util.Map<java.lang.String,org.opendaylight.yangtools.yang.common.Uint32> externalIpmap, java.lang.String externalVpnName, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
protected void
subnetRegisterMapping(Routers routerEntry, org.opendaylight.yangtools.yang.common.Uint32 segmentId)
boolean
updateNaptSwitch(java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint64 naptSwitchId)
void
updateNaptSwitchBucketStatus(java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch)
-
-
-
Constructor Detail
-
NaptSwitchHA
@Inject public NaptSwitchHA(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, ExternalRoutersListener externalRouterListener, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmManager, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService odlInterfaceRpcService, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager, NAPTSwitchSelector naptSwitchSelector, IFibManager fibManager, EvpnNaptSwitchHA evpnNaptSwitchHA, IElanService elanManager, SnatServiceManager natServiceManager, NatserviceConfig config, NaptEventHandler naptEventHandler, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, NatOverVxlanUtil natOverVxlanUtil)
-
-
Method Detail
-
removeSnatFlowsInOldNaptSwitch
protected void removeSnatFlowsInOldNaptSwitch(Routers extRouter, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, @Nullable java.util.Map<java.lang.String,org.opendaylight.yangtools.yang.common.Uint32> externalIpmap, java.lang.String externalVpnName, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
isNaptSwitchDown
public boolean isNaptSwitchDown(Routers extRouter, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, java.util.Collection<java.lang.String> externalIpCache, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
isNaptSwitchDown
public boolean isNaptSwitchDown(Routers extRouter, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, java.util.Collection<java.lang.String> externalIpCache, boolean isClearBgpRts, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
updateNaptSwitchBucketStatus
public void updateNaptSwitchBucketStatus(java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch)
-
handleGroupInNeighborSwitches
public @NonNull java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo> handleGroupInNeighborSwitches(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch)
-
installSnatGroupEntry
protected void installSnatGroupEntry(org.opendaylight.yangtools.yang.common.Uint64 dpnId, java.util.List<org.opendaylight.genius.mdsalutil.BucketInfo> bucketInfo, java.lang.String routerName)
-
getTunnelInterfaceName
protected @Nullable java.lang.String getTunnelInterfaceName(org.opendaylight.yangtools.yang.common.Uint64 srcDpId, org.opendaylight.yangtools.yang.common.Uint64 dstDpId)
-
updateNaptSwitch
public boolean updateNaptSwitch(java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint64 naptSwitchId)
-
buildSnatFlowEntity
public org.opendaylight.genius.mdsalutil.FlowEntity buildSnatFlowEntity(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String routerName, long groupId, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, int addordel)
-
buildSnatFlowEntityForNaptSwitch
public org.opendaylight.genius.mdsalutil.FlowEntity buildSnatFlowEntityForNaptSwitch(org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, int addordel)
-
installSnatFlows
protected void installSnatFlows(java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 naptSwitch, org.opendaylight.yangtools.yang.common.Uint32 routerVpnId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid networkId, java.lang.String vpnName, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx)
-
bestEffortDeletion
protected void bestEffortDeletion(org.opendaylight.yangtools.yang.common.Uint32 routerId, java.lang.String routerName, java.util.Map<java.lang.String,org.opendaylight.yangtools.yang.common.Uint32> externalIpLabel, org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction<org.opendaylight.mdsal.binding.util.Datastore.Configuration> confTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
subnetRegisterMapping
protected void subnetRegisterMapping(Routers routerEntry, org.opendaylight.yangtools.yang.common.Uint32 segmentId)
-
-