Cleaned up the SRLG and disjoint path code and naming.
Change-Id: I02b6fe5ee1e3f5eadc4e88800386a23349ee5e58
diff --git a/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java b/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java
index 5f84ee9..8347ee3 100644
--- a/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java
+++ b/core/net/src/main/java/org/onosproject/net/topology/impl/PathManager.java
@@ -134,7 +134,7 @@
@Override
public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst) {
- return getDisjointPaths(src, dst, null);
+ return getDisjointPaths(src, dst, (LinkWeight) null);
}
@Override
@@ -171,14 +171,14 @@
}
@Override
- public Set<DisjointPath> getSRLGDisjointPaths(ElementId src, ElementId dst,
- Map<Link, Object> riskProfile) {
- return getSRLGDisjointPaths(src, dst, null, riskProfile);
+ public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
+ Map<Link, Object> riskProfile) {
+ return getDisjointPaths(src, dst, null, riskProfile);
}
@Override
- public Set<DisjointPath> getSRLGDisjointPaths(ElementId src, ElementId dst, LinkWeight weight,
- Map<Link, Object> riskProfile) {
+ public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight,
+ Map<Link, Object> riskProfile) {
checkNotNull(src, ELEMENT_ID_NULL);
checkNotNull(dst, ELEMENT_ID_NULL);
@@ -204,8 +204,8 @@
// devices.
Topology topology = topologyService.currentTopology();
Set<DisjointPath> paths = weight == null ?
- topologyService.getSRLGDisjointPaths(topology, srcDevice, dstDevice, riskProfile) :
- topologyService.getSRLGDisjointPaths(topology, srcDevice, dstDevice, weight, riskProfile);
+ topologyService.getDisjointPaths(topology, srcDevice, dstDevice, riskProfile) :
+ topologyService.getDisjointPaths(topology, srcDevice, dstDevice, weight, riskProfile);
return edgeToEdgePathsDisjoint(srcEdge, dstEdge, paths);
}
@@ -249,6 +249,7 @@
endToEndPaths.add(edgeToEdgePathD(srcLink, dstLink, null));
return endToEndPaths;
}
+
private Set<DisjointPath> edgeToEdgePathsDisjoint(EdgeLink srcLink, EdgeLink dstLink, Set<DisjointPath> paths) {
Set<DisjointPath> endToEndPaths = Sets.newHashSetWithExpectedSize(paths.size());
for (DisjointPath path : paths) {