Sketched out changes to link resource service to support intent replacement mechanism.
diff --git a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java
index 5ae5187..43cc61c 100644
--- a/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java
+++ b/core/api/src/main/java/org/onlab/onos/net/resource/LinkResourceService.java
@@ -24,6 +24,16 @@
void releaseResources(LinkResourceAllocations allocations);
/**
+ * Updates previously made allocations with a new resource request.
+ *
+ * @param req updated resource request
+ * @param oldAllocations old resource allocations
+ * @return new resource allocations
+ */
+ LinkResourceAllocations updateResources(LinkResourceRequest req,
+ LinkResourceAllocations oldAllocations);
+
+ /**
* Returns all allocated resources.
*
* @return allocated resources
@@ -61,4 +71,15 @@
* @return available resources for the target link
*/
ResourceRequest getAvailableResources(Link link);
+
+ /**
+ * Returns available resources for given link.
+ *
+ * @param link a target link
+ * @param allocations allocations to be included as available
+ * @return available resources for the target link
+ */
+ ResourceRequest getAvailableResources(Link link,
+ LinkResourceAllocations allocations);
+
}