* When a Flow is deleted, send the FlowEntry notifications for the deleted
Flow Entries
* Modify the deleteFlow() call to be blocking (so we know that the deletion
is completed).
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java
index b414bc6..931bdd1 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEventHandler.java
@@ -328,9 +328,14 @@
if (flowPath.flowPathUserState() ==
FlowPathUserState.FP_USER_DELETE) {
log.debug("Deleting Flow Path From Database: {}", flowPath);
+ // TODO: For now the deleting of a Flow Path is blocking
ParallelFlowDatabaseOperation.deleteFlow(dbHandler,
- flowPath.flowId(),
- datagridService);
+ flowPath.flowId());
+ // Send the notifications for the deleted Flow Entries
+ for (FlowEntry flowEntry : flowPath.flowEntries()) {
+ datagridService.notificationSendFlowEntryRemoved(flowEntry.flowEntryId());
+ }
+
continue;
}