Class AbstractPathComputation

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

public abstract class AbstractPathComputation extends Object implements org.opendaylight.algo.PathComputationAlgorithm
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.PathConstraints
     
    protected final org.opendaylight.graph.ConnectedGraph
     
    protected CspfPath
     
    protected CspfPath
     
    protected final PriorityQueue<CspfPath>
     
    protected final HashMap<Long,CspfPath>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractPathComputation(org.opendaylight.graph.ConnectedGraph graph)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.ConstrainedPath
    computeP2pPath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey source, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey destination, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.PathConstraints cts)
     
    protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.ConstrainedPath
    computeSimplePath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey source, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey destination)
     
    protected @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel
    getIpv4NodeSid(org.opendaylight.graph.ConnectedVertex cvertex)
    Return the MPLS Label corresponding to the Node SID for IPv4 when the Connected Vertex is Segment Routing aware.
    protected @Nullable org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel
    getIpv6NodeSid(org.opendaylight.graph.ConnectedVertex cvertex)
    Return the MPLS Label corresponding to the Node SID for IPv6 when the Connected Vertex is Segment Routing aware.
    protected List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.path.descriptions.PathDescription>
    getPathDescription(List<org.opendaylight.graph.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 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.ConstrainedPathBuilder
    initializePathComputation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey src, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey dst)
    Initialize the various parameters for Path Computation, in particular the Source and Destination CspfPath.
    protected boolean
    pruneEdge(org.opendaylight.graph.ConnectedEdge edge, CspfPath path)
    Check if Edge need to be prune regarding all constraints including address family.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • graph

      protected final org.opendaylight.graph.ConnectedGraph graph
    • pathSource

      protected CspfPath pathSource
    • pathDestination

      protected CspfPath pathDestination
    • constraints

      protected org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.PathConstraints constraints
    • priorityQueue

      protected final PriorityQueue<CspfPath> priorityQueue
    • processedPath

      protected final HashMap<Long,CspfPath> processedPath
  • Constructor Details

    • AbstractPathComputation

      protected AbstractPathComputation(org.opendaylight.graph.ConnectedGraph graph)
  • Method Details

    • initializePathComputation

      protected org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.ConstrainedPathBuilder initializePathComputation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey src, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.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(org.opendaylight.graph.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 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel getIpv4NodeSid(org.opendaylight.graph.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 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.MplsLabel getIpv6NodeSid(org.opendaylight.graph.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<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.path.descriptions.PathDescription> getPathDescription(List<org.opendaylight.graph.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 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.ConstrainedPath computeP2pPath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey source, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey destination, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.PathConstraints cts)
      Specified by:
      computeP2pPath in interface org.opendaylight.algo.PathComputationAlgorithm
    • computeSimplePath

      protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.ConstrainedPath computeSimplePath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey source, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev220720.graph.topology.graph.VertexKey destination)