Improved the readability of the multicast show command
Change-Id: I38bef7b1a7f34ecc8418ccf4276b3f52b3fa2f44
diff --git a/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java b/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java
index 041efd7..9a9e6a0 100644
--- a/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java
+++ b/mfwd/src/main/java/org/onosproject/mfwd/impl/McastForwarding.java
@@ -86,8 +86,6 @@
mrib = McastRouteTable.getInstance();
mrib.addStaticRoutes();
log.info("Started");
-
- System.out.print(mrib.printMcastRouteTable());
}
/**
diff --git a/mfwd/src/main/java/org/onosproject/mfwd/impl/McastRouteBase.java b/mfwd/src/main/java/org/onosproject/mfwd/impl/McastRouteBase.java
index 6ea9ce2..014fb7b 100644
--- a/mfwd/src/main/java/org/onosproject/mfwd/impl/McastRouteBase.java
+++ b/mfwd/src/main/java/org/onosproject/mfwd/impl/McastRouteBase.java
@@ -197,16 +197,16 @@
* @return pretty string of the multicast route
*/
public String toString() {
- String out = String.format("(%s, %s) ingress: %s ",
+ String out = String.format("(%s, %s)\n\tingress: %s ",
saddr.toString(), gaddr.toString(),
(ingressPoint == null) ? "NULL" : ingressPoint.toString());
- out += "egress: {";
+ out += "\n\tegress: {\n";
if (egressPoints != null && !egressPoints.isEmpty()) {
for (ConnectPoint eg : egressPoints) {
- out += " " + eg.toString();
+ out += "\t\t" + eg.toString() + "\n";
}
}
- out += ("}\n");
+ out += ("\t}\n");
return out;
}
-}
\ No newline at end of file
+}