Class FlatVlanConntrackBasedSnatService

    • Constructor Detail

      • FlatVlanConntrackBasedSnatService

        public FlatVlanConntrackBasedSnatService​(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,
                                                 IVpnFootprintService vpnFootprintService,
                                                 IFibManager fibManager,
                                                 NatDataUtil natDataUtil,
                                                 org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar eventCallbacks)
    • Method Detail

      • 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 interface SnatServiceListener
        Overrides:
        addSnatAllSwitch in class AbstractSnatService
        Parameters:
        confTx - The transaction to use.
        routers - the router.
        primarySwitchId - the primaryswitchId
        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 interface SnatServiceListener
        Overrides:
        removeSnatAllSwitch in class AbstractSnatService
        Parameters:
        confTx - The transaction to use.
        routers - the router.
        primarySwitchId - the primaryswitchId
        Returns:
        returns success/failure.
        Throws:
        java.util.concurrent.ExecutionException
        java.lang.InterruptedException
      • 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 interface SnatServiceListener
        Overrides:
        addSnat in class AbstractSnatService
        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.
      • 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 interface SnatServiceListener
        Overrides:
        removeSnat in class AbstractSnatService
        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