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
FieldsModifier and TypeFieldDescriptionprotected PathConstraintsprotected final ConnectedGraphprotected CspfPathprotected CspfPathprotected final PriorityQueue<CspfPath> -
Constructor Summary
Constructors -
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 ConstrainedPathcomputeSimplePath(VertexKey source, VertexKey destination) protected @Nullable MplsLabelgetIpv4NodeSid(ConnectedVertex cvertex) Return the MPLS Label corresponding to the Node SID for IPv4 when the Connected Vertex is Segment Routing aware.protected @Nullable MplsLabelgetIpv6NodeSid(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 ConstrainedPathBuilderinitializePathComputation(VertexKey src, VertexKey dst) Initialize the various parameters for Path Computation, in particular the Source and Destination CspfPath.protected booleanpruneEdge(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:PathComputationAlgorithmCompute Point to Point Path from source to destination taking into account constraints.- Specified by:
computeP2pPathin 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
-