Add CLI command to view provisioned subscribers
Change-Id: I67a49d7fa569e9f4f28eb8eaea1b34ba2bd5a5fa
diff --git a/app/src/main/java/org/onosproject/olt/impl/Olt.java b/app/src/main/java/org/onosproject/olt/impl/Olt.java
index 976fcaa..a62b115 100644
--- a/app/src/main/java/org/onosproject/olt/impl/Olt.java
+++ b/app/src/main/java/org/onosproject/olt/impl/Olt.java
@@ -67,6 +67,7 @@
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
+import java.util.Collection;
import java.util.Dictionary;
import java.util.List;
import java.util.Map;
@@ -243,6 +244,11 @@
}
@Override
+ public Collection<Map.Entry<ConnectPoint, VlanId>> getSubscribers() {
+ return subscribers.entrySet();
+ }
+
+ @Override
public Map<DeviceId, AccessDeviceData> fetchOlts() {
return Maps.newHashMap(oltData);
}
@@ -459,11 +465,10 @@
public void event(DeviceEvent event) {
DeviceId devId = event.subject().id();
if (!oltData.containsKey(devId)) {
- log.debug("Device {} is not an OLT", devId);
return;
}
switch (event.type()) {
- //TODO: Port handling and bookkeeping should be inproved once
+ //TODO: Port handling and bookkeeping should be improved once
// olt firmware handles correct behaviour.
case PORT_ADDED:
if (!oltData.get(devId).uplink().equals(event.port().number()) &&