Add a method to get resource allocation of the given resource

Change-Id: I06b2f83b5a07a1bcbada9db5263abd2e1a4a4d17
diff --git a/core/api/src/main/java/org/onosproject/net/newresource/ResourceService.java b/core/api/src/main/java/org/onosproject/net/newresource/ResourceService.java
index 618042a..82d8474 100644
--- a/core/api/src/main/java/org/onosproject/net/newresource/ResourceService.java
+++ b/core/api/src/main/java/org/onosproject/net/newresource/ResourceService.java
@@ -125,6 +125,15 @@
     boolean release(ResourceConsumer consumer);
 
     /**
+     * Returns resource allocation of the specified resource.
+     *
+     * @param resource resource to check the allocation
+     * @return allocation information enclosed by Optional.
+     * If the resource is not allocated, the return value is empty.
+     */
+    Optional<ResourceAllocation> getResourceAllocation(ResourcePath resource);
+
+    /**
      * Returns allocated resources being as children of the specified parent and being the specified resource type.
      *
      * @param parent parent resource path