CLI command that shows all subnets configured in Segment Routing

Change-Id: Ib03ec2039b763f3796548923883fc89913a1ceac
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index 72b6401..6c25b7d 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -15,6 +15,7 @@
  */
 package org.onosproject.segmentrouting;
 
+import com.google.common.collect.Maps;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
@@ -454,6 +455,15 @@
         defaultRoutingHandler.startPopulationProcess();
     }
 
+    @Override
+    public Map<DeviceId, Set<Ip4Prefix>> getDeviceSubnetMap() {
+        Map<DeviceId, Set<Ip4Prefix>> deviceSubnetMap = Maps.newHashMap();
+        deviceService.getAvailableDevices().forEach(device -> {
+            deviceSubnetMap.put(device.id(), deviceConfiguration.getSubnets(device.id()));
+        });
+        return deviceSubnetMap;
+    }
+
     /**
      * Returns the tunnel object with the tunnel ID.
      *