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/FlowDatabaseOperation.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
index 9433237..75bd8b2 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
@@ -33,11 +33,9 @@
*
* @param dbHandler the Graph Database handler to use.
* @param flowPath the Flow Path to install.
- * @param flowId the return-by-reference Flow ID as assigned internally.
* @return true on success, otherwise false.
*/
- static boolean addFlow(GraphDBOperation dbHandler,
- FlowPath flowPath, FlowId flowId) {
+ static boolean addFlow(GraphDBOperation dbHandler, FlowPath flowPath) {
IFlowPath flowObj = null;
boolean found = false;
try {
@@ -178,11 +176,6 @@
}
dbHandler.commit();
- //
- // TODO: We need a proper Flow ID allocation mechanism.
- //
- flowId.setValue(flowPath.flowId().value());
-
return true;
}