Demo special: send remove operation includes intent which has a complete path
Change-Id: Icd0330a6fe562d7e3e8f0c7ade227b6cc6dc8dc2
diff --git a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
index b5521e2..b559028 100755
--- a/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
+++ b/src/main/java/net/onrc/onos/intent/runtime/PathCalcRuntimeModule.java
@@ -153,6 +153,14 @@
// update the map of low-level intents and publish the low-level
// operations
pathIntents.executeOperations(pathIntentOperations);
+
+ // send remove operation includes intent which has a complete path
+ // TODO need optimization
+ for (IntentOperation op: pathIntentOperations) {
+ if(op.operator.equals(Operator.REMOVE)) {
+ op.intent = pathIntents.getIntent(op.intent.getId());
+ }
+ }
eventChannel.addEntry(key, pathIntentOperations);
return pathIntentOperations;
}