ONOS-2297: Decouple ResourceRequest and ResourceAllocation
Note: This change may break backward compatibility for those defining a
sub-class of ResourceAllocation
Change-Id: I01807b4ebb0f9af8fa822828953965b5119975d7
diff --git a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java
index 172e902..7828867 100644
--- a/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java
+++ b/core/api/src/main/java/org/onosproject/net/resource/link/LinkResourceAllocations.java
@@ -15,15 +15,40 @@
*/
package org.onosproject.net.resource.link;
+import java.util.Collection;
import java.util.Set;
import org.onosproject.net.Link;
+import org.onosproject.net.intent.IntentId;
import org.onosproject.net.resource.ResourceAllocation;
+import org.onosproject.net.resource.ResourceRequest;
/**
* Representation of allocated link resources.
*/
-public interface LinkResourceAllocations extends LinkResourceRequest {
+public interface LinkResourceAllocations extends ResourceAllocation {
+
+ /**
+ * Returns the {@link IntentId} associated with the request.
+ *
+ * @return the {@link IntentId} associated with the request
+ */
+ IntentId intentId();
+
+ /**
+ * Returns the set of target links.
+ *
+ * @return the set of target links
+ */
+ Collection<Link> links();
+
+ /**
+ * Returns the set of resource requests.
+ *
+ * @return the set of resource requests
+ */
+ Set<ResourceRequest> resources();
+
/**
* Returns allocated resource for the given link.
*