Class PathManagerProvider
java.lang.Object
org.opendaylight.bgpcep.pcep.server.provider.PathManagerProvider
- All Implemented Interfaces:
com.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.Empty>
,AutoCloseable
,ConnectedGraphTrigger
public final class PathManagerProvider
extends Object
implements com.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.Empty>, AutoCloseable, ConnectedGraphTrigger
This Class implements the Path Manager in charge of Managed TE Node and Managed TE Path.
- Author:
- Olivier Dugeon
-
Constructor Summary
ConstructorDescriptionPathManagerProvider
(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yangtools.binding.DataObjectIdentifier.WithKey<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey> topology, org.opendaylight.mdsal.binding.api.RpcService rpcService, DefaultPceServerProvider pceServerProvider) -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkManagedTeNode
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Check if a Managed TE Node is controlled by the Path Manager.void
close()
Remove the Path Manager Server and destroy the transaction chain.createManagedTeNode
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, PcepNodeConfig pccNode) Create new Managed TE Node.createManagedTePath
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp cfgLsp) Create a new Managed TE Path.void
deleteManagedTeNode
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) Delete Managed TE Node.void
deleteManagedTePath
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key) Remove TE Path to existing Managed Node if TE Path has been initiated by the PCE server.void
disableManagedTeNode
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Call when a PCC disconnect from the PCE to disable the corresponding Managed TE Node.void
void
onSuccess
(org.opendaylight.yangtools.yang.common.Empty value) registerManagedTeNode
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Register a PCC as a new Managed TE Node.registerTePath
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp rptPath, PathType ptype) Register Reported LSP as a TE Path for the PCC identified by its Node ID.protected void
Reset the transaction chain only so that the PingPong transaction chain will become usable again.void
setTePathFailed
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key) Indicate that the TE Path is failed following reception of a PCE Error message.void
syncManagedTeNode
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Synchronized Managed TE Node.void
unregisterTePath
(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key) Remove TE Path from Operational Data Store and Path Manager.void
verifyEdge
(Collection<ConnectedEdgeTrigger> triggers, ConnectedEdge current, Edge next) This method verifies the next Edge attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.void
verifyVertex
(Collection<ConnectedVertexTrigger> triggers, ConnectedVertex current, Vertex next) This method verifies the next Vertex attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.
-
Constructor Details
-
PathManagerProvider
public PathManagerProvider(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yangtools.binding.DataObjectIdentifier.WithKey<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey> topology, org.opendaylight.mdsal.binding.api.RpcService rpcService, DefaultPceServerProvider pceServerProvider)
-
-
Method Details
-
close
@PreDestroy public void close()Remove the Path Manager Server and destroy the transaction chain.- Specified by:
close
in interfaceAutoCloseable
-
resetTransactionChain
protected void resetTransactionChain()Reset the transaction chain only so that the PingPong transaction chain will become usable again. However, there will be data loss if we do not apply the previous failed transaction again -
onFailure
- Specified by:
onFailure
in interfacecom.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.Empty>
-
onSuccess
public void onSuccess(org.opendaylight.yangtools.yang.common.Empty value) - Specified by:
onSuccess
in interfacecom.google.common.util.concurrent.FutureCallback<org.opendaylight.yangtools.yang.common.Empty>
-
createManagedTePath
public ConfiguredLsp createManagedTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp cfgLsp) Create a new Managed TE Path.- Parameters:
id
- Managed TE Node Identifier to which the TE path is attached.cfgLsp
- TE Path.- Returns:
- new or updated TE Path i.e. original TE Path augmented by a valid computed route.
-
deleteManagedTePath
public void deleteManagedTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key) Remove TE Path to existing Managed Node if TE Path has been initiated by the PCE server.- Parameters:
id
- Managed Node ID where the TE Path is storedkey
- TE Path, as Key, to be removed
-
registerTePath
public ManagedTePath registerTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp rptPath, PathType ptype) Register Reported LSP as a TE Path for the PCC identified by its Node ID.- Parameters:
id
- Node ID of the Managed Node (PCC) which report this LSPrptPath
- Reported TE Path- Returns:
- Newly created or Updated Managed TE Path
-
unregisterTePath
public void unregisterTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key) Remove TE Path from Operational Data Store and Path Manager.- Parameters:
id
- Node ID of the Managed Node which own this TE Pathkey
- TE Path name
-
setTePathFailed
public void setTePathFailed(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key) Indicate that the TE Path is failed following reception of a PCE Error message.- Parameters:
id
- Node ID of the Managed Node which own this TE Pathkey
- TE Path name
-
checkManagedTeNode
public boolean checkManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Check if a Managed TE Node is controlled by the Path Manager.- Parameters:
id
- Node ID of the Managed TE Node- Returns:
- True if Managed TE Node exist, false otherwise
-
createManagedTeNode
public ManagedTeNode createManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, PcepNodeConfig pccNode) Create new Managed TE Node. This method is called by a new Managed Node is created in the Configuration Data Store. All TE Path associated to this Managed Node are also created. A new Managed Node, with TE Paths augmented with valid computed routes, is stored in the Operational Data Store.- Parameters:
nodeId
- Managed TE Node IdentifierpccNode
- Path Computation Client- Returns:
- New Managed TE Node.
-
registerManagedTeNode
public ManagedTeNode registerManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Register a PCC as a new Managed TE Node. This method is called by the PCEP Topology Listener when a new PCC connects to the PCE Server.- Parameters:
id
- Node ID of the PCC- Returns:
- current or new Managed TE Node
-
syncManagedTeNode
public void syncManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Synchronized Managed TE Node. Once PCC finished initial report of all LSP, its state change to Synchronized. This function update the Managed TE Node status, and then parse all reported LSPs to determine if: - There is missing LSPs that need to be setup - There is LSPs that need to be updated- Parameters:
id
- Node ID of the Managed TE Node
-
deleteManagedTeNode
public void deleteManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId) Delete Managed TE Node. This method is called when a Managed Node is removed from the Configuration Data Store. All initiated Managed TE Path own by this PCC are removed and corresponding Managed Node is removed from the Operational Data Store if it is not connected.- Parameters:
nodeId
- Managed Node Identifier
-
disableManagedTeNode
public void disableManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id) Call when a PCC disconnect from the PCE to disable the corresponding Managed TE Node.- Parameters:
id
- Managed Node ID
-
verifyVertex
public void verifyVertex(Collection<ConnectedVertexTrigger> triggers, ConnectedVertex current, Vertex next) Description copied from interface:ConnectedGraphTrigger
This method verifies the next Vertex attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.If current Vertex is null, this means that the Connected Vertex will be added in the Connected Graph. If next Connected Vertex is null, this means that the Connected Vertex will be deleted from the Connected Graph. Otherwise, this is an update of Vertex attributes.
- Specified by:
verifyVertex
in interfaceConnectedGraphTrigger
- Parameters:
current
- Next Connected Vertex to be installed in the Connected Graphnext
- Current Vertex installed in the Connected Graph
-
verifyEdge
Description copied from interface:ConnectedGraphTrigger
This method verifies the next Edge attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.If current Edge is null, this means that the Connected Edge will be added in the Connected Graph. If next Connected Edge is null, this means that the Edge will be deleted from the Connected Graph. Otherwise, this is an update of Edge attributes.
- Specified by:
verifyEdge
in interfaceConnectedGraphTrigger
- Parameters:
current
- Next Edge to be installed in the Connected Graphnext
- Current Edge installed in the Connected Graph
-