Package org.opendaylight.algo.impl
Class AbstractPathComputation
java.lang.Object
org.opendaylight.algo.impl.AbstractPathComputation
- All Implemented Interfaces:
PathComputationAlgorithm
- Direct Known Subclasses:
ConstrainedShortestPathFirst
,Samcra
,ShortestPathFirst
-
Field Summary
Modifier and TypeFieldDescriptionprotected PathConstraints
protected final ConnectedGraph
protected CspfPath
protected CspfPath
protected final PriorityQueue
<CspfPath> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncomputeP2pPath
(VertexKey source, VertexKey destination, PathConstraints cts) Compute Point to Point Path from source to destination taking into account constraints.protected abstract ConstrainedPath
computeSimplePath
(VertexKey source, VertexKey destination) protected @Nullable MplsLabel
getIpv4NodeSid
(ConnectedVertex cvertex) Return the MPLS Label corresponding to the Node SID for IPv4 when the Connected Vertex is Segment Routing aware.protected @Nullable MplsLabel
getIpv6NodeSid
(ConnectedVertex cvertex) Return the MPLS Label corresponding to the Node SID for IPv6 when the Connected Vertex is Segment Routing aware.protected List
<PathDescription> getPathDescription
(List<ConnectedEdge> edges) Convert List of Connected Edges into a Path Description as a List of IPv4, IPv6 or MPLS Label depending of the requested Address Family.protected ConstrainedPathBuilder
initializePathComputation
(VertexKey src, VertexKey dst) Initialize the various parameters for Path Computation, in particular the Source and Destination CspfPath.protected boolean
pruneEdge
(ConnectedEdge edge, CspfPath path) Check if Edge need to be prune regarding all constraints including address family.
-
Field Details
-
graph
-
pathSource
-
pathDestination
-
constraints
-
priorityQueue
-
processedPath
-
-
Constructor Details
-
AbstractPathComputation
-
-
Method Details
-
initializePathComputation
Initialize the various parameters for Path Computation, in particular the Source and Destination CspfPath.- Parameters:
src
- Source Vertex Identifier in the Connected Graphdst
- Destination Vertex Identifier in the Connected Graph- Returns:
- Constrained Path Builder with status set to 'OnGoing' if initialization success, 'Failed' otherwise
-
pruneEdge
Check if Edge need to be prune regarding all constraints including address family.- Returns:
- True if Edge must be prune, False if Edge must be keep
-
getIpv4NodeSid
Return the MPLS Label corresponding to the Node SID for IPv4 when the Connected Vertex is Segment Routing aware.- Returns:
- MPLS Label if Connected Vertex is Segment Routing aware, Null otherwise
-
getIpv6NodeSid
Return the MPLS Label corresponding to the Node SID for IPv6 when the Connected Vertex is Segment Routing aware.- Returns:
- MPLS Label if Connected Vertex is Segment Routing aware, Null otherwise
-
getPathDescription
Convert List of Connected Edges into a Path Description as a List of IPv4, IPv6 or MPLS Label depending of the requested Address Family.- Parameters:
edges
- List of Connected Edges- Returns:
- Path Description
-
computeP2pPath
Description copied from interface:PathComputationAlgorithm
Compute Point to Point Path from source to destination taking into account constraints.- Specified by:
computeP2pPath
in interfacePathComputationAlgorithm
- Parameters:
source
- Source Vertex Keydestination
- Destination Vertex Keycts
- Constraints (Metric, TE Metric, Delay, Jitter, Loss, Bandwidth)- Returns:
- A Path that meet constraints or empty path otherwise. ConstrainedPath.Status indicates the result of the path computation (Completed or Failed)
-
computeSimplePath
-