Merge IntentInstaller's role into IntentCompiler
It resolves naming mismatch in naming of IntentProcessPhases and states
handled in the phases. It is described in ONOS-1064.
- Define FlowRuleIntent that enables flow rule level operation
as an intent.
- Remove IntentInstaller interface
- Existing installable intents such as PathIntent, LinkCollectionIntent,
OpticalPathIntent and MplsPathIntent now become non installable intents.
Only FlowRuleIntent is categorized as installable intent now.
- Implement intent compilers for PathIntent, LinkCollectionIntent,
OpticalPathIntent and MplsPathIntent. They generates FlowRuleIntents.
- Write unit tests for the newly created intent compilers according to
the intent installers' unit tests
- Remove all intent installers and their unit tests
Change-Id: I22d6c7acb65a4c066145de0018bd0727f44bd54a
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
index a968e4e..f3e91a4 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/phase/CompilingTest.java
@@ -121,12 +121,12 @@
expect(processor.compile(input, null)).andReturn(Arrays.asList(compiled));
replay(processor);
- Compiling sut = new Compiling(processor, pending, null);
+ Compiling sut = new Compiling(processor, pending);
Optional<IntentProcessPhase> output = sut.execute();
verify(processor);
- assertThat(output.get(), is(instanceOf(InstallCoordinating.class)));
+ assertThat(output.get(), is(instanceOf(Installing.class)));
}
/**
@@ -139,11 +139,11 @@
expect(processor.compile(input, null)).andThrow(new IntentCompilationException());
replay(processor);
- Compiling sut = new Compiling(processor, pending, null);
+ Compiling sut = new Compiling(processor, pending);
Optional<IntentProcessPhase> output = sut.execute();
verify(processor);
- assertThat(output.get(), is(instanceOf(CompilingFailed.class)));
+ assertThat(output.get(), is(instanceOf(CompileFailed.class)));
}
}