Support frozen Intents
- setReroutable() and isReroutable() methods are added to Intent classes
- The intent is called as "frozen intent" if its isReroutable() method returns false
- Path calculation of Each frozen intent is skipped in PathCalcRuntimeModule.reroutePaths() method
Note:
Before this commit, the frozen intent was defined with its ID starting from "F".
Now this ID-based expression of frozen intent is completely removed from Intent classes,
but it still remains in REST API.
We should redesign REST API to remove the ID-based definition completely in the future.
Change-Id: Id8050052ca5be5d18911bcf22f647d4c54064651
diff --git a/src/main/java/net/onrc/onos/intent/Intent.java b/src/main/java/net/onrc/onos/intent/Intent.java
index c6a960f..eba6e32 100644
--- a/src/main/java/net/onrc/onos/intent/Intent.java
+++ b/src/main/java/net/onrc/onos/intent/Intent.java
@@ -21,6 +21,7 @@
private String id;
private IntentState state = IntentState.CREATED;
+ private boolean pathFrozen = false;
@Optional(value="logs")
private LinkedList<String> logs = new LinkedList<>();
@@ -62,6 +63,14 @@
return oldState;
}
+ public boolean isPathFrozen() {
+ return pathFrozen;
+ }
+
+ public void setPathFrozen(boolean isFrozen) {
+ pathFrozen = isFrozen;
+ }
+
public LinkedList<String> getLogs() {
return logs;
}