Class Ipv6ForwardingService
- java.lang.Object
-
- org.opendaylight.netvirt.natservice.internal.Ipv6ForwardingService
-
- All Implemented Interfaces:
SnatServiceListener
public class Ipv6ForwardingService extends java.lang.Object implements SnatServiceListener
-
-
Field Summary
Fields Modifier and Type Field Description protected org.opendaylight.mdsal.binding.api.DataBroker
dataBroker
protected org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService
idManager
protected org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager
interfaceManager
protected Ipv6SubnetFlowProgrammer
ipv6SubnetFlowProgrammer
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 org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService
odlInterfaceRpcService
-
Constructor Summary
Constructors Constructor Description Ipv6ForwardingService(org.opendaylight.mdsal.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, Ipv6SubnetFlowProgrammer ipv6SubnetFlowProgrammer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 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, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
Adds flows for centralized switch for all dpns having ports on the router subnet.protected void
addIpv6DefaultFibRoute(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
protected void
addIpv6NaptPfibInboundFlow(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
protected void
addIpv6PsNatMissEntryNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
protected void
addIpv6SnatMissEntryForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
protected void
addIpv6TerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
boolean
addSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Adds snat flows for the dpnId.boolean
addSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
Adds snat flows for all dpns having ports on the router subnet.protected long
createGroupIdForIpv6Router(java.lang.String groupIdKey)
boolean
handleRouterUpdate(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers origRouter, Routers updatedRouter)
Handles changes to external router.boolean
removeCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 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, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
Removes flows for centralized switch for all dpns having ports on the router subnet.protected void
removeIpv6DefaultFibRoute(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId)
protected void
removeIpv6NaptPfibInboundFlow(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId)
protected void
removeIpv6SnatMissEntryForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId)
protected void
removeIpv6TerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId)
boolean
removeSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Removes snat flows for the dpnId.boolean
removeSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
Removes snat flows for all dpns having ports on the router subnet.protected boolean
routerHasIpv6ExtSubnet(Routers routers)
-
-
-
Field Detail
-
dataBroker
protected final org.opendaylight.mdsal.binding.api.DataBroker dataBroker
-
mdsalManager
protected final org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager
-
idManager
protected final org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService idManager
-
naptSwitchSelector
protected final NAPTSwitchSelector naptSwitchSelector
-
itmManager
protected final org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmManager
-
odlInterfaceRpcService
protected final org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService odlInterfaceRpcService
-
interfaceManager
protected final org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager interfaceManager
-
ipv6SubnetFlowProgrammer
protected final Ipv6SubnetFlowProgrammer ipv6SubnetFlowProgrammer
-
-
Constructor Detail
-
Ipv6ForwardingService
public Ipv6ForwardingService(org.opendaylight.mdsal.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, Ipv6SubnetFlowProgrammer ipv6SubnetFlowProgrammer)
-
-
Method Detail
-
addCentralizedRouterAllSwitch
public boolean addCentralizedRouterAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
Description copied from interface:SnatServiceListener
Adds flows for centralized switch for all dpns having ports on the router subnet.- Specified by:
addCentralizedRouterAllSwitch
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.- Returns:
- returns success/failure.
-
addCentralizedRouter
public boolean addCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Description copied from interface:SnatServiceListener
Adds flows for centralized switch for the dpnId.- Specified by:
addCentralizedRouter
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be added.- Returns:
- returns success/failure.
-
removeCentralizedRouterAllSwitch
public boolean removeCentralizedRouterAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:SnatServiceListener
Removes flows for centralized switch for all dpns having ports on the router subnet.- Specified by:
removeCentralizedRouterAllSwitch
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.- Returns:
- returns success/failure.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
removeCentralizedRouter
public boolean removeCentralizedRouter(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 dpnId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:SnatServiceListener
Removes flows for centralized switch for the dpnId.- Specified by:
removeCentralizedRouter
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be removed.- Returns:
- returns success/failure.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
handleRouterUpdate
public boolean handleRouterUpdate(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers origRouter, Routers updatedRouter) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:SnatServiceListener
Handles changes to external router.- Specified by:
handleRouterUpdate
in interfaceSnatServiceListener
origRouter
- the Orignal router.updatedRouter
- the Updated router.- Returns:
- returns success/failure.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addSnatAllSwitch
public boolean addSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
Description copied from interface:SnatServiceListener
Adds snat flows for all dpns having ports on the router subnet.- Specified by:
addSnatAllSwitch
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId- Returns:
- returns success/failure.
-
addSnat
public boolean addSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Description copied from interface:SnatServiceListener
Adds snat flows for the dpnId.- Specified by:
addSnat
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be added.- Returns:
- returns success/failure.
-
removeSnatAllSwitch
public boolean removeSnatAllSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:SnatServiceListener
Removes snat flows for all dpns having ports on the router subnet.- Specified by:
removeSnatAllSwitch
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId- Returns:
- returns success/failure.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
removeSnat
public boolean removeSnat(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, Routers routers, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId, org.opendaylight.yangtools.yang.common.Uint64 dpnId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:SnatServiceListener
Removes snat flows for the dpnId.- Specified by:
removeSnat
in interfaceSnatServiceListener
- Parameters:
confTx
- The transaction to use.routers
- the router.primarySwitchId
- the primaryswitchId.dpnId
- the dpnId for which the flows needs to be removed.- Returns:
- returns success/failure.
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addIpv6DefaultFibRoute
protected void addIpv6DefaultFibRoute(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
-
removeIpv6DefaultFibRoute
protected void removeIpv6DefaultFibRoute(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addIpv6PsNatMissEntryNonNaptSwitch
protected void addIpv6PsNatMissEntryNonNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, java.lang.String routerName, org.opendaylight.yangtools.yang.common.Uint64 primarySwitchId)
-
addIpv6SnatMissEntryForNaptSwitch
protected void addIpv6SnatMissEntryForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
-
removeIpv6SnatMissEntryForNaptSwitch
protected void removeIpv6SnatMissEntryForNaptSwitch(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addIpv6TerminatingServiceTblEntry
protected void addIpv6TerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
-
removeIpv6TerminatingServiceTblEntry
protected void removeIpv6TerminatingServiceTblEntry(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
addIpv6NaptPfibInboundFlow
protected void addIpv6NaptPfibInboundFlow(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId, org.opendaylight.yangtools.yang.common.Uint64 routerMetadata)
-
removeIpv6NaptPfibInboundFlow
protected void removeIpv6NaptPfibInboundFlow(org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yangtools.yang.common.Uint32 routerId) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
createGroupIdForIpv6Router
protected long createGroupIdForIpv6Router(java.lang.String groupIdKey)
-
routerHasIpv6ExtSubnet
protected boolean routerHasIpv6ExtSubnet(Routers routers)
-
-