Package org.opendaylight.algo.impl
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
FieldsModifier and TypeFieldDescriptionprotected org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.PathConstraintsprotected final org.opendaylight.graph.ConnectedGraphprotected CspfPathprotected CspfPathprotected final PriorityQueue<CspfPath> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPathComputation(org.opendaylight.graph.ConnectedGraph graph) -
Method Summary
Modifier and TypeMethodDescriptionorg.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.ConstrainedPathcomputeP2pPath(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.ConstrainedPathcomputeSimplePath(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.MplsLabelgetIpv4NodeSid(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.MplsLabelgetIpv6NodeSid(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.ConstrainedPathBuilderinitializePathComputation(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 booleanCheck if Edge need to be prune regarding all constraints including address family.
-
Field Details
-
graph
protected final org.opendaylight.graph.ConnectedGraph graph -
pathSource
-
pathDestination
-
constraints
protected org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev220324.PathConstraints constraints -
priorityQueue
-
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 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
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:
computeP2pPathin interfaceorg.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)
-