public abstract class AbstractSnatService extends Object implements SnatServiceListener
Modifier and Type | Field and Description |
---|---|
protected org.opendaylight.controller.md.sal.binding.api.DataBroker |
dataBroker |
protected org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar |
eventCallbacks |
protected IFibManager |
fibManager |
protected org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService |
idManager |
protected org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager |
interfaceManager |
protected org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService |
itmManager |
protected org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager |
mdsalManager |
protected NAPTSwitchSelector |
naptSwitchSelector |
protected NatDataUtil |
natDataUtil |
protected org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService |
odlInterfaceRpcService |
protected org.opendaylight.genius.infra.ManagedNewTransactionRunner |
txRunner |
protected IVpnFootprintService |
vpnFootprintService |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSnatService(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
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,
org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager,
IVpnFootprintService vpnFootprintService,
IFibManager fibManager,
NatDataUtil natDataUtil,
org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar eventCallbacks) |
Modifier and Type | Method and Description |
---|---|
boolean |
addCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId)
Adds flows for centralized switch for the dpnId.
|
boolean |
addCentralizedRouterAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId)
Adds flows for centralized switch for all dpns having ports on the router subnet.
|
protected void |
addCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected void |
addCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId) |
protected void |
addDefaultFibRouteForSNAT(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long extNetId) |
protected void |
addInboundFibEntry(org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
String externalIp,
Long routerId,
long extSubnetId,
String externalNetId,
String subNetId,
String routerMac) |
protected void |
addInboundTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long routerId,
long extSubnetId) |
boolean |
addSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId)
Adds snat flows for the dpnId.
|
boolean |
addSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId)
Adds snat flows for all dpns having ports on the router subnet.
|
protected void |
addSnatCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected void |
addSnatCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId) |
protected void |
addSnatMissEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long routerId,
String routerName,
BigInteger primarySwitchId) |
protected abstract void |
addSnatSpecificEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected abstract void |
addSnatSpecificEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected void |
addTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long routerId,
int elanId) |
void |
close() |
protected long |
createGroupId(String groupIdKey) |
protected org.opendaylight.controller.md.sal.binding.api.DataBroker |
getDataBroker() |
protected String |
getFlowRef(BigInteger dpnId,
short tableId,
long routerID) |
protected String |
getGroupIdKey(String routerName) |
boolean |
handleRouterUpdate(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers origRouter,
Routers updatedRouter)
Handles changes to external router.
|
void |
init() |
boolean |
removeCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId)
Removes flows for centralized switch for the dpnId.
|
boolean |
removeCentralizedRouterAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId)
Removes flows for centralized switch for all dpns having ports on the router subnet.
|
protected void |
removeCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected void |
removeCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId) |
protected void |
removeDefaultFibRouteForSNAT(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long extNetId) |
protected void |
removeInboundFibEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
String externalIp,
Long routerId,
String subNetId) |
protected void |
removeInboundTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long routerId) |
protected void |
removeMipAdjacencies(Routers routers) |
boolean |
removeSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId)
Removes snat flows for the dpnId.
|
boolean |
removeSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger primarySwitchId)
Removes snat flows for all dpns having ports on the router subnet.
|
protected void |
removeSnatCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected void |
removeSnatCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected void |
removeSnatMissEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long routerId,
String routerName) |
protected abstract void |
removeSnatSpecificEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected abstract void |
removeSnatSpecificEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
Routers routers,
BigInteger dpnId) |
protected void |
removeTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx,
BigInteger dpnId,
Long routerId) |
protected final org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker
protected final org.opendaylight.genius.infra.ManagedNewTransactionRunner txRunner
protected final org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager
protected final org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager
protected final NAPTSwitchSelector naptSwitchSelector
protected final org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmManager
protected final org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService odlInterfaceRpcService
protected final org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager
protected final IVpnFootprintService vpnFootprintService
protected final IFibManager fibManager
protected final NatDataUtil natDataUtil
protected final org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar eventCallbacks
protected AbstractSnatService(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, 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, org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager, IVpnFootprintService vpnFootprintService, IFibManager fibManager, NatDataUtil natDataUtil, org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar eventCallbacks)
protected org.opendaylight.controller.md.sal.binding.api.DataBroker getDataBroker()
public void init()
public void close()
public boolean addSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId)
SnatServiceListener
addSnatAllSwitch
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchIdpublic boolean removeSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId) throws ExecutionException, InterruptedException
SnatServiceListener
removeSnatAllSwitch
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchIdExecutionException
InterruptedException
public boolean addSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId, BigInteger dpnId)
SnatServiceListener
addSnat
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be added.public boolean removeSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId, BigInteger dpnId) throws ExecutionException, InterruptedException
SnatServiceListener
removeSnat
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be removed.ExecutionException
InterruptedException
public boolean addCentralizedRouterAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId)
SnatServiceListener
addCentralizedRouterAllSwitch
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.public boolean removeCentralizedRouterAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId) throws ExecutionException, InterruptedException
SnatServiceListener
removeCentralizedRouterAllSwitch
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.ExecutionException
InterruptedException
public boolean addCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId, BigInteger dpnId)
SnatServiceListener
addCentralizedRouter
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be added.public boolean removeCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId, BigInteger dpnId) throws ExecutionException, InterruptedException
SnatServiceListener
removeCentralizedRouter
in interface SnatServiceListener
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be removed.ExecutionException
InterruptedException
public boolean handleRouterUpdate(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers origRouter, Routers updatedRouter) throws ExecutionException, InterruptedException
SnatServiceListener
handleRouterUpdate
in interface SnatServiceListener
origRouter
- the Orignal router.updatedRouter
- the Updated router.ExecutionException
InterruptedException
protected void addCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId)
protected void removeCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId) throws ExecutionException, InterruptedException
protected void addSnatCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId)
protected void removeSnatCommonEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId) throws ExecutionException, InterruptedException
protected void addCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId, BigInteger dpnId)
protected void removeCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId, BigInteger dpnId) throws ExecutionException, InterruptedException
protected void addSnatCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger primarySwitchId, BigInteger dpnId)
protected void removeSnatCommonEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId) throws ExecutionException, InterruptedException
protected abstract void addSnatSpecificEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId)
protected abstract void removeSnatSpecificEntriesForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId) throws ExecutionException, InterruptedException
protected abstract void addSnatSpecificEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId)
protected abstract void removeSnatSpecificEntriesForNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, BigInteger dpnId)
protected void addInboundFibEntry(org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, String externalIp, Long routerId, long extSubnetId, String externalNetId, String subNetId, String routerMac)
protected void removeInboundFibEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, String externalIp, Long routerId, String subNetId) throws ExecutionException, InterruptedException
protected void addTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long routerId, int elanId)
protected void removeTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long routerId) throws ExecutionException, InterruptedException
protected void addSnatMissEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long routerId, String routerName, BigInteger primarySwitchId)
protected void removeSnatMissEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long routerId, String routerName) throws ExecutionException, InterruptedException
protected void addInboundTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long routerId, long extSubnetId)
protected void removeInboundTerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long routerId) throws ExecutionException, InterruptedException
protected void addDefaultFibRouteForSNAT(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long extNetId)
protected void removeDefaultFibRouteForSNAT(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, BigInteger dpnId, Long extNetId) throws ExecutionException, InterruptedException
protected String getFlowRef(BigInteger dpnId, short tableId, long routerID)
protected long createGroupId(String groupIdKey)
protected void removeMipAdjacencies(Routers routers)
Copyright © 2019 OpenDaylight. All rights reserved.