[CORD-2486] Improve Mcast CLI APIs
It adds following commands:
- sr-mcast-tree which shows the mapping group-tree
- sr-mcast-next which shows the mapping device-next
- mcast-routes which is similar to the unicast command (routes)
It improve following commands:
- mcast-join adds completer and improves output
- mcast-delete adds completer and improves output
- mcast-show improves output and adds completer
Change-Id: I4e273ac23b05142026b6b77317b0c9b7af76c3ec
diff --git a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingService.java b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingService.java
index 3269657..00e7a6a 100644
--- a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingService.java
+++ b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingService.java
@@ -15,7 +15,9 @@
*/
package org.onosproject.segmentrouting;
+import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
+import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Link;
import org.onosproject.net.PortNumber;
@@ -26,6 +28,7 @@
import org.onosproject.segmentrouting.storekey.DestinationSetNextObjectiveStoreKey;
import com.google.common.collect.ImmutableMap;
+import org.onosproject.segmentrouting.storekey.McastStoreKey;
import java.util.List;
import java.util.Map;
@@ -207,4 +210,31 @@
* ports. Does not include ports manually disabled by the operator.
*/
ImmutableMap<DeviceId, Set<PortNumber>> getDownedPortState();
+
+ /**
+ * Returns the associated next ids to the mcast groups or to the single
+ * group if mcastIp is present.
+ *
+ * @param mcastIp the group ip
+ * @return the mapping mcastIp-device to next id
+ */
+ Map<McastStoreKey, Integer> getMcastNextIds(IpAddress mcastIp);
+
+ /**
+ * Returns the associated roles to the mcast groups or to the single
+ * group if mcastIp is present.
+ *
+ * @param mcastIp the group ip
+ * @return the mapping mcastIp-device to mcast role
+ */
+ Map<McastStoreKey, McastHandler.McastRole> getMcastRoles(IpAddress mcastIp);
+
+ /**
+ * Returns the associated paths to the mcast group.
+ *
+ * @param mcastIp the group ip
+ * @return the mapping egress point to mcast path
+ */
+ Map<ConnectPoint, List<ConnectPoint>> getMcastPaths(IpAddress mcastIp);
+
}