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
Fields Modifier and Type Field Description protected org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev200120.PathConstraintsconstraintsprotected org.opendaylight.graph.ConnectedGraphgraphprotected CspfPathpathDestinationprotected CspfPathpathSourceprotected PriorityQueue<CspfPath>priorityQueueprotected HashMap<Long,CspfPath>processedPath
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPathComputation(org.opendaylight.graph.ConnectedGraph graph)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev200120.ConstrainedPathcomputeP2pPath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.VertexKey source, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.VertexKey destination, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev200120.PathConstraints constraints)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.rev200120.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.rev200120.ConstrainedPathBuilderinitializePathComputation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.VertexKey src, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.VertexKey dst)Initialize the various parameters for Path Computation, in particular the Source and Destination CspfPath.protected booleanpruneEdge(org.opendaylight.graph.ConnectedEdge edge, CspfPath path)Check if Edge need to be prune regarding all constraints including address family.
-
-
-
Field Detail
-
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.rev200120.PathConstraints constraints
-
priorityQueue
protected PriorityQueue<CspfPath> priorityQueue
-
-
Method Detail
-
initializePathComputation
protected org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev200120.ConstrainedPathBuilder initializePathComputation(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.VertexKey src, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.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
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.rev200120.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 abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev200120.ConstrainedPath computeP2pPath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.VertexKey source, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.graph.rev191125.graph.topology.graph.VertexKey destination, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.path.computation.rev200120.PathConstraints constraints)- Specified by:
computeP2pPathin interfaceorg.opendaylight.algo.PathComputationAlgorithm
-
-