Class HwvtepPhysicalSwitchListener
- java.lang.Object
-
- org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<T,K>
-
- org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
- org.opendaylight.netvirt.elan.l2gw.listeners.HwvtepPhysicalSwitchListener
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.EventListener
,org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>
,org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>
,org.opendaylight.serviceutils.srm.RecoverableListener
,org.opendaylight.serviceutils.tools.mdsal.listener.ChainableDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>
@Singleton public class HwvtepPhysicalSwitchListener extends org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener> implements org.opendaylight.controller.md.sal.binding.api.ClusteredDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>, org.opendaylight.serviceutils.srm.RecoverableListener
Listener to handle physical switch updates.
-
-
Constructor Summary
Constructors Constructor Description HwvtepPhysicalSwitchListener(L2GatewayServiceRecoveryHandler l2GatewayServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, ElanClusterUtils elanClusterUtils, L2gwServiceProvider l2gwServiceProvider, HAOpClusteredListener haListener, L2GatewayCache l2GatewayCache, StaleVlanBindingsCleaner staleVlanBindingsCleaner, org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache hwvtepNodeHACache)
Instantiates a new hwvtep physical switch listener.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
added(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAdded)
void
deregisterListener()
protected HwvtepPhysicalSwitchListener
getDataTreeChangeListener()
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation>
getWildCardPath()
void
init()
void
registerListener()
protected void
removed(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchDeleted)
protected void
updated(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchBefore, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAfter)
Upon update checks if the tunnels Ip was null earlier and it got newly added.-
Methods inherited from class org.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener
add, remove, update
-
Methods inherited from class org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase
addAfterListener, addBeforeListener, close, onDataTreeChanged, registerListener
-
-
-
-
Constructor Detail
-
HwvtepPhysicalSwitchListener
@Inject public HwvtepPhysicalSwitchListener(L2GatewayServiceRecoveryHandler l2GatewayServiceRecoveryHandler, org.opendaylight.serviceutils.srm.ServiceRecoveryRegistry serviceRecoveryRegistry, org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, ElanClusterUtils elanClusterUtils, L2gwServiceProvider l2gwServiceProvider, HAOpClusteredListener haListener, L2GatewayCache l2GatewayCache, StaleVlanBindingsCleaner staleVlanBindingsCleaner, org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache hwvtepNodeHACache)
Instantiates a new hwvtep physical switch listener.
-
-
Method Detail
-
init
@PostConstruct public void init()
- Overrides:
init
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
registerListener
public void registerListener()
- Specified by:
registerListener
in interfaceorg.opendaylight.serviceutils.srm.RecoverableListener
-
deregisterListener
public void deregisterListener()
- Specified by:
deregisterListener
in interfaceorg.opendaylight.serviceutils.srm.RecoverableListener
- Overrides:
deregisterListener
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
getWildCardPath
protected org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> getWildCardPath()
- Specified by:
getWildCardPath
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
getDataTreeChangeListener
protected HwvtepPhysicalSwitchListener getDataTreeChangeListener()
- Specified by:
getDataTreeChangeListener
in classorg.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
removed
protected void removed(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchDeleted)
- Specified by:
removed
in classorg.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
updated
protected void updated(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchBefore, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAfter)
Upon update checks if the tunnels Ip was null earlier and it got newly added. In that case simply call add. If not then check if Tunnel Ip has been updated from an old value to new value. If yes. delete old ITM tunnels of odl Tunnel Ipand add new ITM tunnels with new Tunnel IP then call added ().- Specified by:
updated
in classorg.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
- Parameters:
identifier
- iidphySwitchBefore
- ps Node before updatephySwitchAfter
- ps Node after update
-
added
protected void added(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation> identifier, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation phySwitchAdded)
- Specified by:
added
in classorg.opendaylight.genius.datastoreutils.hwvtep.HwvtepAbstractDataTreeChangeListener<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation,HwvtepPhysicalSwitchListener>
-
-