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 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 dataTreeEventCallbackRegistrar) |
Modifier and Type | Method and Description |
---|---|
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) |
protected String |
getTunnelInterfaceName(BigInteger srcDpId,
BigInteger dstDpId) |
boolean |
handleCentralizedRouter(Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId,
int addOrRemove)
Adds/removes flows for centralized switch for the dpnId.
|
boolean |
handleCentralizedRouterAllSwitch(Routers routers,
BigInteger primarySwitchId,
int addOrRemove)
Adds/removes flows for centralized switch for all dpns having ports on the router subnet.
|
boolean |
handleSnat(Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId,
int addOrRemove)
Adds/removes snat flows for the dpnId.
|
boolean |
handleSnatAllSwitch(Routers routers,
BigInteger primarySwitchId,
int addOrRemove)
Adds/removes snat flows for all dpns having ports on the router subnet.
|
void |
init() |
protected void |
installCommonEntriesForNaptSwitch(Routers routers,
BigInteger dpnId,
int addOrRemove) |
protected void |
installCommonEntriesForNonNaptSwitch(Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId,
int addOrRemove) |
protected void |
installDefaultFibRouteForSNAT(BigInteger dpnId,
Long extNetId,
int addOrRemove) |
protected void |
installInboundFibEntry(BigInteger dpnId,
String externalIp,
Long routerId,
long extSubnetId,
String externalNetId,
String subNetId,
String routerMac,
int addOrRemove) |
protected void |
installInboundTerminatingServiceTblEntry(BigInteger dpnId,
Long routerId,
long extSubnetId,
int addOrRemove) |
protected void |
installSnatCommonEntriesForNaptSwitch(Routers routers,
BigInteger dpnId,
int addOrRemove) |
protected void |
installSnatCommonEntriesForNonNaptSwitch(Routers routers,
BigInteger primarySwitchId,
BigInteger dpnId,
int addOrRemove) |
protected void |
installSnatMissEntry(BigInteger dpnId,
Long routerId,
String routerName,
BigInteger primarySwitchId,
int addOrRemove) |
protected abstract void |
installSnatSpecificEntriesForNaptSwitch(Routers routers,
BigInteger dpnId,
int addOrRemove) |
protected abstract void |
installSnatSpecificEntriesForNonNaptSwitch(Routers routers,
BigInteger dpnId,
int addOrRemove) |
protected void |
installTerminatingServiceTblEntry(BigInteger dpnId,
Long routerId,
int elanId,
int addOrRemove) |
protected void |
removeMipAdjacencies(Routers routers) |
protected void |
syncFlow(BigInteger dpId,
short tableId,
String flowId,
int priority,
String flowName,
BigInteger cookie,
List<? extends org.opendaylight.genius.mdsalutil.MatchInfoBase> matches,
List<org.opendaylight.genius.mdsalutil.InstructionInfo> instructions,
int addOrRemove) |
protected final org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker
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 dataTreeEventCallbackRegistrar)
protected org.opendaylight.controller.md.sal.binding.api.DataBroker getDataBroker()
public void init()
public void close()
public boolean handleSnatAllSwitch(Routers routers, BigInteger primarySwitchId, int addOrRemove)
SnatServiceListener
handleSnatAllSwitch
in interface SnatServiceListener
routers
- the router.primarySwitchId
- the primaryswitchIdaddOrRemove
- add or remove the flow.public boolean handleCentralizedRouterAllSwitch(Routers routers, BigInteger primarySwitchId, int addOrRemove)
SnatServiceListener
handleCentralizedRouterAllSwitch
in interface SnatServiceListener
routers
- the router.primarySwitchId
- the primaryswitchId.addOrRemove
- add or remove the flow.public boolean handleCentralizedRouter(Routers routers, BigInteger primarySwitchId, BigInteger dpnId, int addOrRemove)
SnatServiceListener
handleCentralizedRouter
in interface SnatServiceListener
routers
- routers the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be added/removed.addOrRemove
- add or remove the flow.public boolean handleSnat(Routers routers, BigInteger primarySwitchId, BigInteger dpnId, int addOrRemove)
SnatServiceListener
handleSnat
in interface SnatServiceListener
routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be added/removed.addOrRemove
- add or remove the flow.protected void installCommonEntriesForNaptSwitch(Routers routers, BigInteger dpnId, int addOrRemove)
protected void installSnatCommonEntriesForNaptSwitch(Routers routers, BigInteger dpnId, int addOrRemove)
protected void installCommonEntriesForNonNaptSwitch(Routers routers, BigInteger primarySwitchId, BigInteger dpnId, int addOrRemove)
protected void installSnatCommonEntriesForNonNaptSwitch(Routers routers, BigInteger primarySwitchId, BigInteger dpnId, int addOrRemove)
protected abstract void installSnatSpecificEntriesForNaptSwitch(Routers routers, BigInteger dpnId, int addOrRemove)
protected abstract void installSnatSpecificEntriesForNonNaptSwitch(Routers routers, BigInteger dpnId, int addOrRemove)
protected void installInboundFibEntry(BigInteger dpnId, String externalIp, Long routerId, long extSubnetId, String externalNetId, String subNetId, String routerMac, int addOrRemove)
protected void installSnatMissEntry(BigInteger dpnId, Long routerId, String routerName, BigInteger primarySwitchId, int addOrRemove)
protected void installInboundTerminatingServiceTblEntry(BigInteger dpnId, Long routerId, long extSubnetId, int addOrRemove)
protected void installTerminatingServiceTblEntry(BigInteger dpnId, Long routerId, int elanId, int addOrRemove)
protected void installDefaultFibRouteForSNAT(BigInteger dpnId, Long extNetId, int addOrRemove)
protected String getFlowRef(BigInteger dpnId, short tableId, long routerID)
protected void syncFlow(BigInteger dpId, short tableId, String flowId, int priority, String flowName, BigInteger cookie, List<? extends org.opendaylight.genius.mdsalutil.MatchInfoBase> matches, List<org.opendaylight.genius.mdsalutil.InstructionInfo> instructions, int addOrRemove)
protected long createGroupId(String groupIdKey)
protected String getTunnelInterfaceName(BigInteger srcDpId, BigInteger dstDpId)
protected void removeMipAdjacencies(Routers routers)
Copyright © 2019 OpenDaylight. All rights reserved.