Class NodeConnectedHandler
- java.lang.Object
-
- org.opendaylight.netvirt.elan.l2gw.ha.handlers.NodeConnectedHandler
-
public class NodeConnectedHandler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NodeConnectedHandler(org.opendaylight.mdsal.binding.api.DataBroker db, org.opendaylight.genius.utils.hwvtep.HwvtepNodeHACache hwvtepNodeHACache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyChildPSOpToHAPS(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node childPsNode, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haPath, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haPspath, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> tx)
Copy child physical switch node data to HA physical switch data of Operational data tree.void
copyHAPSConfigToChildPS(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node haPsNode, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> childPath, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx)
Copy HA physical switch data to Child Physical switch node of config data tree.void
handleNodeConnected(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node childNode, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> childNodePath, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haNodePath, java.util.Optional<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haGlobalCfg, java.util.Optional<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haPSCfg, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> operTx)
Takes care of merging the data when a node gets connected.void
mergeOpManagedByAttributes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation psAugmentation, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentationBuilder builder, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haNodePath)
Merge data to Physical switch from HA node path .
-
-
-
Method Detail
-
handleNodeConnected
public void handleNodeConnected(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node childNode, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> childNodePath, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haNodePath, java.util.Optional<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haGlobalCfg, java.util.Optional<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haPSCfg, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> confTx, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> operTx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Takes care of merging the data when a node gets connected. When a ha child node gets connected , we perform the following. Merge the ha parent config data to child node. Merge the ha parent physical node config data to child physical node. Merge the child operational data to parent operational data. Merge the child physical switch node operational data to parent physical switch operational node .- Parameters:
childNode
- Ha child nodechildNodePath
- Ha child IidhaNodePath
- Ha IidhaGlobalCfg
- Ha Global Config NodehaPSCfg
- Ha Physical Config NodeoperTx
- Transaction- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
mergeOpManagedByAttributes
public void mergeOpManagedByAttributes(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentation psAugmentation, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.PhysicalSwitchAugmentationBuilder builder, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haNodePath)
Merge data to Physical switch from HA node path .- Parameters:
psAugmentation
- Physical Switch Augmation of Nodebuilder
- Physical Switch Augmentation BuilderhaNodePath
- HA node Path
-
copyHAPSConfigToChildPS
public void copyHAPSConfigToChildPS(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node haPsNode, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> childPath, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Configuration> tx)
Copy HA physical switch data to Child Physical switch node of config data tree.- Parameters:
haPsNode
- HA physical Switch NodechildPath
- HA Child Node pathtx
- Transaction
-
copyChildPSOpToHAPS
public void copyChildPSOpToHAPS(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node childPsNode, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haPath, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> haPspath, org.opendaylight.genius.infra.TypedReadWriteTransaction<org.opendaylight.genius.infra.Datastore.Operational> tx) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
Copy child physical switch node data to HA physical switch data of Operational data tree.- Parameters:
childPsNode
- HA child PS nodehaPath
- HA node pathhaPspath
- Ha Physical Switch Node pathtx
- Transaction- Throws:
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
-