CORD-641 Bug fix for handling reconnected leaf switch
Also changed some ECMP graph node variables to consistenly use
'root' and 'target' instead of the generic 'dst' and 'src' terms.
Change-Id: I1965e6d4a13f3cd42ec5cce08b0b0c321625e554
diff --git a/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java b/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java
index 36410fc..5e7e2ae 100644
--- a/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java
+++ b/src/main/java/org/onosproject/segmentrouting/EcmpShortestPathGraph.java
@@ -303,7 +303,10 @@
/**
* Return the complete info of the computed ECMP paths for each Device
- * learned in multiple iterations from the root Device.
+ * learned in multiple iterations from the root Device. The computed info
+ * returned is per iteration (Integer key of outer HashMap). In each
+ * iteration, for each device as root (DeviceId key of inner HashMap),
+ * the ECMP paths are detailed (2D array).
*
* @return the hash table of Devices learned in multiple Dijkstra
* iterations and corresponding ECMP paths in terms of Devices to
@@ -358,10 +361,12 @@
StringBuilder sBuilder = new StringBuilder();
for (Device device: srManager.deviceService.getDevices()) {
if (device.id() != rootDevice) {
- sBuilder.append("Paths from" + rootDevice + " to " + device.id() + "\r\n");
+ sBuilder.append("\r\n Paths from " + rootDevice + " to "
+ + device.id() + "\r\n");
ArrayList<Path> paths = getECMPPaths(device.id());
if (paths != null) {
for (Path path : paths) {
+ sBuilder.append("\r\n == "); // equal cost paths delimiter
for (Link link : path.links()) {
sBuilder.append(" : " + link.src() + " -> " + link.dst());
}