Added a generic API to return a list of configured switches that are not connected...
[controller.git] / opendaylight / sal / implementation / src / main / java / org / opendaylight / controller / sal / implementation / internal / Inventory.java
index 1cc57bac66e797cead08f0e2300b325f3622afe1..fbb9fbc518f74c64611a39e536157b30b4dab789 100644 (file)
@@ -9,6 +9,7 @@
 
 package org.opendaylight.controller.sal.implementation.internal;
 
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -145,6 +146,18 @@ public class Inventory implements IPluginOutInventoryService, IInventoryService
         return nodeProps;
     }
 
+    @Override
+    public Set<Node> getConfiguredNotConnectedNodes() {
+        Set<Node> configuredNotConnected = new HashSet<Node>(), rv;
+        for (IPluginInInventoryService s : this.pluginService) {
+            rv = s.getConfiguredNotConnectedNodes();
+            if (rv != null) {
+                configuredNotConnected.addAll(rv);
+            }
+        }
+        return configuredNotConnected;
+    }
+
     @Override
     public ConcurrentMap<NodeConnector, Map<String, Property>> getNodeConnectorProps() {
         ConcurrentMap<NodeConnector, Map<String, Property>> ncProps =