Update rerouting features
- add REROUTE_REQ state to Intent class
- add static methods to PathIntent class to create IDs
- add getPathIntentId() to ShortestPathIntent class to retrieve low-level intent
- add mapping of inserting or replacing high level ids to lower level ids.
- change high level intent state to REROUTE_REQ if the state was INST_ACK and the intent was requested rerouting
Change-Id: I50970a0255e2b19451aaedb7dc3c19015031e5d0
diff --git a/src/test/java/net/onrc/onos/intent/PathIntentTest.java b/src/test/java/net/onrc/onos/intent/PathIntentTest.java
index a465118..3c76f3f 100644
--- a/src/test/java/net/onrc/onos/intent/PathIntentTest.java
+++ b/src/test/java/net/onrc/onos/intent/PathIntentTest.java
@@ -29,6 +29,18 @@
}
@Test
+ public void testCreateFirstId() {
+ String id = PathIntent.createFirstId("100");
+ assertEquals("pi100___0", id);
+ }
+
+ @Test
+ public void testCreateNextId() {
+ String id = PathIntent.createNextId("pi100___999");
+ assertEquals("pi100___1000", id);
+ }
+
+ @Test
public void test() {
KryoFactory factory = new KryoFactory();
Kryo kryo = factory.newKryo();