Refactor the FlowManager addFlow() API:
* It returns the FlowID on success, otherwise null
* If the FlowID of the FlowPath is not set (i.e., its value is -1),
the FlowManager will assign it.
* Modified the web/add_flow.py usage to explain the value of Flow ID of -1
* Removed method addAndMaintainShortestPathFlow() from the FlowManager,
because it is not needed anymore.
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/IFlowService.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/IFlowService.java
index 423604b..a25602d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/IFlowService.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/IFlowService.java
@@ -21,14 +21,10 @@
/**
* Add a flow.
*
- * Internally, ONOS will automatically register the installer for
- * receiving Flow Path Notifications for that path.
- *
* @param flowPath the Flow Path to install.
- * @param flowId the return-by-reference Flow ID as assigned internally.
- * @return true on success, otherwise false.
+ * @return the Flow ID on success, otherwise null.
*/
- boolean addFlow(FlowPath flowPath, FlowId flowId);
+ FlowId addFlow(FlowPath flowPath);
/**
* Delete all previously added flows.
@@ -68,21 +64,6 @@
* @return the Flow Paths if found, otherwise null.
*/
ArrayList<FlowPath> getAllFlowsSummary(FlowId flowId, int maxFlows);
-
- /**
- * Add and maintain a shortest-path flow.
- *
- * NOTE: The Flow Path argument does NOT contain all flow entries.
- * Instead, it contains a single dummy flow entry that is used to
- * store the matching condition(s).
- * That entry is replaced by the appropriate entries from the
- * internally performed shortest-path computation.
- *
- * @param flowPath the Flow Path with the endpoints and the match
- * conditions to install.
- * @return the added shortest-path flow on success, otherwise null.
- */
- FlowPath addAndMaintainShortestPathFlow(FlowPath flowPath);
/**
* Get the network topology.