Class AbstractPathComputation

java.lang.Object
org.opendaylight.algo.impl.AbstractPathComputation
All Implemented Interfaces:
PathComputationAlgorithm
Direct Known Subclasses:
ConstrainedShortestPathFirst, Samcra, ShortestPathFirst

public abstract class AbstractPathComputation extends Object implements PathComputationAlgorithm
  • Field Details

  • Constructor Details

    • AbstractPathComputation

      protected AbstractPathComputation(ConnectedGraph graph)
  • Method Details

    • initializePathComputation

      protected ConstrainedPathBuilder initializePathComputation(VertexKey src, VertexKey dst)
      Initialize the various parameters for Path Computation, in particular the Source and Destination CspfPath.
      Parameters:
      src - Source Vertex Identifier in the Connected Graph
      dst - Destination Vertex Identifier in the Connected Graph
      Returns:
      Constrained Path Builder with status set to 'OnGoing' if initialization success, 'Failed' otherwise
    • pruneEdge

      protected boolean pruneEdge(ConnectedEdge edge, CspfPath path)
      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

      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.
      Returns:
      MPLS Label if Connected Vertex is Segment Routing aware, Null otherwise
    • getIpv6NodeSid

      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.
      Returns:
      MPLS Label if Connected Vertex is Segment Routing aware, Null otherwise
    • getPathDescription

      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.
      Parameters:
      edges - List of Connected Edges
      Returns:
      Path Description
    • computeP2pPath

      public ConstrainedPath computeP2pPath(VertexKey source, VertexKey destination, PathConstraints cts)
      Description copied from interface: PathComputationAlgorithm
      Compute Point to Point Path from source to destination taking into account constraints.
      Specified by:
      computeP2pPath in interface PathComputationAlgorithm
      Parameters:
      source - Source Vertex Key
      destination - Destination Vertex Key
      cts - 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

      protected abstract ConstrainedPath computeSimplePath(VertexKey source, VertexKey destination)