WIP: Initial implementation of runtime #2: take PathIntents and build a plan
Change-Id: I33acebecb76bd693f01a7440cee60c0fcfb49623
diff --git a/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java b/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java
index e2a9a64..d31b9b6 100644
--- a/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java
+++ b/src/test/java/net/onrc/onos/intent/runtime/UseCaseTest.java
@@ -56,9 +56,14 @@
// compile high-level intents into low-level intents (calculate paths)
PathCalcRuntime runtime1 = new PathCalcRuntime(g);
runtime1.addInputIntents(intents);
+
+ // compile low-level intents into flow entry installation plan
+ PlanCalcRuntime runtime2 = new PlanCalcRuntime(g);
+ runtime2.addIntents(runtime1.getOutputIntents());
// show results
showResult(runtime1.getOutputIntents());
+ System.out.println(runtime2.getPlan());
}
@Test
@@ -75,8 +80,13 @@
PathCalcRuntime runtime1 = new PathCalcRuntime(g);
runtime1.addInputIntents(intents);
+ // compile low-level intents into flow entry installation plan
+ PlanCalcRuntime runtime2 = new PlanCalcRuntime(g);
+ runtime2.addIntents(runtime1.getOutputIntents());
+
// show results
showResult(runtime1.getOutputIntents());
+ System.out.println(runtime2.getPlan());
}
@Test
@@ -93,7 +103,12 @@
PathCalcRuntime runtime1 = new PathCalcRuntime(g);
runtime1.addInputIntents(intents);
+ // compile low-level intents into flow entry installation plan
+ PlanCalcRuntime runtime2 = new PlanCalcRuntime(g);
+ runtime2.addIntents(runtime1.getOutputIntents());
+
// show results
showResult(runtime1.getOutputIntents());
+ System.out.println(runtime2.getPlan());
}
}