Add intent error handling features.
- added ErrorIntent class to express intent processing errors
- added ERROR to IntentOperation.Operator enum
- made IntentMap to change intents' state automatically when it processes ErrorIntent instances
- made PathCalcRuntime to create ErrorIntent instance for failed intents
- made PathCalcRuntimeModule to process ErrorIntent and reflect them to high-level intents' states
Change-Id: Ib0cf9c284a37812695864d75d3cde2499a76e2a7
diff --git a/src/main/java/net/onrc/onos/intent/IntentOperation.java b/src/main/java/net/onrc/onos/intent/IntentOperation.java
index 506dd52..93a9f88 100644
--- a/src/main/java/net/onrc/onos/intent/IntentOperation.java
+++ b/src/main/java/net/onrc/onos/intent/IntentOperation.java
@@ -6,15 +6,21 @@
public class IntentOperation {
public enum Operator {
/**
- * Add new intent specified by intent field
+ * Add new intent specified by intent field.
*/
ADD,
/**
* Remove existing intent specified by intent field.
- * The specified intent should be an instance of Intent class (not a child class)
+ * The instance of intent field should be an instance of Intent class (not a child class)
*/
REMOVE,
+
+ /**
+ * Do error handling.
+ * The instance of intent field should be an instance of ErrorIntent
+ */
+ ERROR,
}
public IntentOperation() {}