Use the FlowPath Type to decide which Flow should be maintained by
ONOS (i.e., for shortest path re-computation), and remove the
overloading of the DataPathSummary string for the purpose
of deciding whether the path should be maintained by ONOS.
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 74cfcbe..5336520 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
@@ -35,14 +35,11 @@
* @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.
- * @param dataPathSummaryStr the data path summary string if the added
- * flow will be maintained internally, otherwise null.
* @return true on success, otherwise false.
*/
static boolean addFlow(FlowManager flowManager,
GraphDBOperation dbHandler,
- FlowPath flowPath, FlowId flowId,
- String dataPathSummaryStr) {
+ FlowPath flowPath, FlowId flowId) {
IFlowPath flowObj = null;
boolean found = false;
try {
@@ -140,12 +137,7 @@
if (! flowPath.flowEntryActions().actions().isEmpty()) {
flowObj.setActions(flowPath.flowEntryActions().toString());
}
-
- if (dataPathSummaryStr != null) {
- flowObj.setDataPathSummary(dataPathSummaryStr);
- } else {
- flowObj.setDataPathSummary("");
- }
+ flowObj.setDataPathSummary(flowPath.dataPath().dataPathSummary());
if (found)
flowObj.setUserState("FE_USER_MODIFY");