Define and implement a method to query available resources

Change-Id: I49fbcdf215e402603ea15f469d41e572f1cce1c6
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
index a27ce67..10fe75e 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
+++ b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceManager.java
@@ -127,6 +127,17 @@
     }
 
     @Override
+    public Collection<ResourcePath> getAvailableResources(ResourcePath parent) {
+        checkNotNull(parent);
+
+        Collection<ResourcePath> children = store.getChildResources(parent);
+        return children.stream()
+                // We access store twice in this method, then the store may be updated by others
+                .filter(x -> !store.getConsumer(x).isPresent())
+                .collect(Collectors.toList());
+    }
+
+    @Override
     public boolean isAvailable(ResourcePath resource) {
         checkNotNull(resource);