Remove dependency on LinkResourceAllocaations from IntentCompiler
This change breaks backward compatibility of IntentCompier API
Change-Id: I471d0e28d97c2379f66d980d3176f89022c3a470
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/CompilerRegistry.java b/core/net/src/main/java/org/onosproject/net/intent/impl/CompilerRegistry.java
index 1b70bc6..a2a125b 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/CompilerRegistry.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/CompilerRegistry.java
@@ -79,7 +79,7 @@
registerSubclassCompilerIfNeeded(intent);
// FIXME: get previous resources
List<Intent> installable = new ArrayList<>();
- for (Intent compiled : getCompiler(intent).compile(intent, previousInstallables, null)) {
+ for (Intent compiled : getCompiler(intent).compile(intent, previousInstallables)) {
installable.addAll(compile(compiled, previousInstallables));
}
return installable;
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
index 7e544af..91dfc96 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompiler.java
@@ -31,12 +31,10 @@
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.PathIntent;
import org.onosproject.net.intent.constraint.AsymmetricPathConstraint;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import java.util.Set;
import static org.onosproject.net.flow.DefaultTrafficSelector.builder;
@@ -61,8 +59,7 @@
}
@Override
- public List<Intent> compile(HostToHostIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(HostToHostIntent intent, List<Intent> installable) {
boolean isAsymmetric = intent.constraints().contains(new AsymmetricPathConstraint());
Path pathOne = getPath(intent, intent.one(), intent.two());
Path pathTwo = isAsymmetric ?
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
index e1bed15..68cafb1 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompiler.java
@@ -38,7 +38,6 @@
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.IntentCompiler;
import org.onosproject.net.intent.LinkCollectionIntent;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.ArrayList;
import java.util.Collections;
@@ -69,8 +68,7 @@
}
@Override
- public List<Intent> compile(LinkCollectionIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(LinkCollectionIntent intent, List<Intent> installable) {
SetMultimap<DeviceId, PortNumber> inputPorts = HashMultimap.create();
SetMultimap<DeviceId, PortNumber> outputPorts = HashMultimap.create();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java
index 8490077..d66cd80 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentFlowObjectivesCompiler.java
@@ -39,7 +39,6 @@
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.IntentCompiler;
import org.onosproject.net.intent.LinkCollectionIntent;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.ArrayList;
import java.util.Collections;
@@ -73,8 +72,7 @@
}
@Override
- public List<Intent> compile(LinkCollectionIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(LinkCollectionIntent intent, List<Intent> installable) {
SetMultimap<DeviceId, PortNumber> inputPorts = HashMultimap.create();
SetMultimap<DeviceId, PortNumber> outputPorts = HashMultimap.create();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java
index f3c5aa9..3433dd7 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompiler.java
@@ -20,7 +20,6 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import org.apache.felix.scr.annotations.Activate;
@@ -34,7 +33,6 @@
import org.onosproject.net.intent.MplsIntent;
import org.onosproject.net.intent.MplsPathIntent;
import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
/**
* @deprecated in Goldeneye Release, in favour of encapsulation
@@ -62,8 +60,7 @@
}
@Override
- public List<Intent> compile(MplsIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(MplsIntent intent, List<Intent> installable) {
ConnectPoint ingressPoint = intent.ingressPoint();
ConnectPoint egressPoint = intent.egressPoint();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
index 095c8e9..37c0dcb 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompiler.java
@@ -51,7 +51,6 @@
import org.onosproject.net.newresource.Resource;
import org.onosproject.net.newresource.ResourceService;
import org.onosproject.net.newresource.Resources;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.slf4j.Logger;
import java.util.Collections;
@@ -90,8 +89,7 @@
protected ApplicationId appId;
@Override
- public List<Intent> compile(MplsPathIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(MplsPathIntent intent, List<Intent> installable) {
Map<LinkKey, MplsLabel> labels = assignMplsLabel(intent);
List<FlowRule> rules = generateRules(intent, labels);
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java
index 06d0e9a..b0507dc 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompiler.java
@@ -34,7 +34,6 @@
import org.onosproject.net.intent.LinkCollectionIntent;
import org.onosproject.net.intent.MultiPointToSinglePointIntent;
import org.onosproject.net.intent.PointToPointIntent;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.onosproject.net.topology.PathService;
import java.util.Collections;
@@ -74,8 +73,7 @@
}
@Override
- public List<Intent> compile(MultiPointToSinglePointIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(MultiPointToSinglePointIntent intent, List<Intent> installable) {
Map<DeviceId, Link> links = new HashMap<>();
ConnectPoint egressPoint = intent.egressPoint();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
index aa8698c..8dea447 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompiler.java
@@ -64,7 +64,6 @@
import org.onosproject.net.newresource.ResourceService;
import org.onosproject.net.newresource.Resources;
import org.onosproject.net.intent.IntentSetMultimap;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.osgi.service.component.ComponentContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -169,8 +168,7 @@
}
@Override
- public List<Intent> compile(OpticalCircuitIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(OpticalCircuitIntent intent, List<Intent> installable) {
// Check if ports are OduClt ports
ConnectPoint src = intent.getSrc();
ConnectPoint dst = intent.getDst();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
index a1c4d10..3555454 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalConnectivityIntentCompiler.java
@@ -47,7 +47,6 @@
import org.onosproject.net.newresource.Resource;
import org.onosproject.net.newresource.ResourceService;
import org.onosproject.net.newresource.Resources;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.onosproject.net.topology.LinkWeight;
import org.onosproject.net.topology.Topology;
import org.onosproject.net.topology.TopologyService;
@@ -99,8 +98,7 @@
@Override
public List<Intent> compile(OpticalConnectivityIntent intent,
- List<Intent> installable,
- Set<LinkResourceAllocations> linkResources) {
+ List<Intent> installable) {
// Check if source and destination are optical OCh ports
ConnectPoint src = intent.getSrc();
ConnectPoint dst = intent.getDst();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java
index 2cc45e7..8341354 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompiler.java
@@ -38,14 +38,12 @@
import org.onosproject.net.intent.IntentCompiler;
import org.onosproject.net.intent.IntentExtensionService;
import org.onosproject.net.intent.OpticalPathIntent;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
-import java.util.Set;
@Component(immediate = true)
public class OpticalPathIntentCompiler implements IntentCompiler<OpticalPathIntent> {
@@ -72,8 +70,7 @@
}
@Override
- public List<Intent> compile(OpticalPathIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(OpticalPathIntent intent, List<Intent> installable) {
log.debug("Compiling optical path intent between {} and {}", intent.src(), intent.dst());
// Create rules for forward and reverse path
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
index 7222f0f..36ca6e3 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentCompiler.java
@@ -36,12 +36,10 @@
import org.onosproject.net.intent.IntentCompiler;
import org.onosproject.net.intent.PathIntent;
import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.slf4j.Logger;
import java.util.LinkedList;
import java.util.List;
-import java.util.Set;
import static org.slf4j.LoggerFactory.getLogger;
@@ -50,7 +48,7 @@
public class PathIntentCompiler
extends PathCompiler<FlowRule>
implements IntentCompiler<PathIntent>,
- PathCompiler.PathCompilerCreateFlow<FlowRule> {
+ PathCompiler.PathCompilerCreateFlow<FlowRule> {
private final Logger log = getLogger(getClass());
@@ -77,8 +75,7 @@
}
@Override
- public List<Intent> compile(PathIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(PathIntent intent, List<Intent> installable) {
List<FlowRule> rules = new LinkedList<>();
List<DeviceId> devices = new LinkedList<>();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
index d1ab1cf..4b746fa 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathIntentFlowObjectiveCompiler.java
@@ -17,7 +17,6 @@
import java.util.LinkedList;
import java.util.List;
-import java.util.Set;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
@@ -40,7 +39,6 @@
import org.onosproject.net.intent.IntentCompiler;
import org.onosproject.net.intent.PathIntent;
import org.onosproject.net.newresource.ResourceService;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.slf4j.Logger;
import com.google.common.collect.ImmutableList;
@@ -78,8 +76,7 @@
}
@Override
- public List<Intent> compile(PathIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(PathIntent intent, List<Intent> installable) {
List<Objective> objectives = new LinkedList<>();
List<DeviceId> devices = new LinkedList<>();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java
index 5644ee2..e1c9709 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompiler.java
@@ -26,11 +26,9 @@
import org.onosproject.net.intent.PathIntent;
import org.onosproject.net.intent.PointToPointIntent;
import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.ArrayList;
import java.util.List;
-import java.util.Set;
import static java.util.Arrays.asList;
import static org.onosproject.net.DefaultEdgeLink.createEdgeLink;
@@ -59,8 +57,7 @@
}
@Override
- public List<Intent> compile(PointToPointIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(PointToPointIntent intent, List<Intent> installable) {
ConnectPoint ingressPoint = intent.ingressPoint();
ConnectPoint egressPoint = intent.egressPoint();
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
index 5656590..10449be 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/SinglePointToMultiPointIntentCompiler.java
@@ -26,7 +26,6 @@
import org.onosproject.net.intent.LinkCollectionIntent;
import org.onosproject.net.intent.SinglePointToMultiPointIntent;
import org.onosproject.net.provider.ProviderId;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.Collections;
import java.util.HashSet;
@@ -55,8 +54,7 @@
@Override
public List<Intent> compile(SinglePointToMultiPointIntent intent,
- List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ List<Intent> installable) {
Set<Link> links = new HashSet<>();
for (ConnectPoint egressPoint : intent.egressPoints()) {
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java
index 50a6754..076319a 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/TwoWayP2PIntentCompiler.java
@@ -22,10 +22,8 @@
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.PointToPointIntent;
import org.onosproject.net.intent.TwoWayP2PIntent;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.List;
-import java.util.Set;
/**
* A intent compiler for {@link org.onosproject.net.intent.TwoWayP2PIntent}.
@@ -45,8 +43,7 @@
}
@Override
- public List<Intent> compile(TwoWayP2PIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(TwoWayP2PIntent intent, List<Intent> installable) {
return Lists.newArrayList(
PointToPointIntent.builder()
.appId(intent.appId())
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
index d047883..403d8a2 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/IntentManagerTest.java
@@ -45,7 +45,6 @@
import org.onosproject.net.intent.IntentService;
import org.onosproject.net.intent.IntentState;
import org.onosproject.net.intent.Key;
-import org.onosproject.net.resource.link.LinkResourceAllocations;
import org.onosproject.store.trivial.SimpleIntentStore;
import java.util.Collection;
@@ -165,16 +164,14 @@
private static class TestIntentCompiler implements IntentCompiler<MockIntent> {
@Override
- public List<Intent> compile(MockIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(MockIntent intent, List<Intent> installable) {
return Lists.newArrayList(new MockInstallableIntent());
}
}
private static class TestIntentCompilerMultipleFlows implements IntentCompiler<MockIntent> {
@Override
- public List<Intent> compile(MockIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(MockIntent intent, List<Intent> installable) {
return IntStream.rangeClosed(1, 5)
.mapToObj(mock -> (new MockInstallableIntent()))
@@ -185,8 +182,7 @@
private static class TestIntentCompilerError implements IntentCompiler<MockIntent> {
@Override
- public List<Intent> compile(MockIntent intent, List<Intent> installable,
- Set<LinkResourceAllocations> resources) {
+ public List<Intent> compile(MockIntent intent, List<Intent> installable) {
throw new IntentCompilationException("Compilation always fails");
}
}
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompilerTest.java
index 4eef4f2..ec9f3e8 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/HostToHostIntentCompilerTest.java
@@ -129,7 +129,7 @@
HostToHostIntentCompiler compiler = makeCompiler(hops);
assertThat(compiler, is(notNullValue()));
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(Matchers.notNullValue()));
assertThat(result, hasSize(2));
Intent forwardResultIntent = result.get(0);
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
index 8f84f5c..6249987 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/LinkCollectionIntentCompilerTest.java
@@ -123,7 +123,7 @@
public void testCompile() {
sut.activate();
- List<Intent> compiled = sut.compile(intent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(intent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompilerTest.java
index 03a38a5..cfb7d73 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsIntentCompilerTest.java
@@ -108,7 +108,7 @@
MplsIntentCompiler compiler = makeCompiler(hops);
assertThat(compiler, is(notNullValue()));
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(Matchers.notNullValue()));
assertThat(result, hasSize(1));
Intent forwardResultIntent = result.get(0);
@@ -146,7 +146,7 @@
MplsIntentCompiler compiler = makeCompiler(hops);
assertThat(compiler, is(notNullValue()));
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(Matchers.notNullValue()));
assertThat(result, hasSize(1));
Intent reverseResultIntent = result.get(0);
@@ -188,7 +188,7 @@
String[] hops = {"1"};
MplsIntentCompiler sut = makeCompiler(hops);
- List<Intent> compiled = sut.compile(intent, null, null);
+ List<Intent> compiled = sut.compile(intent, null);
assertThat(compiled, hasSize(1));
assertThat(compiled.get(0), is(instanceOf(MplsPathIntent.class)));
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java
index 922ea42..ee5e9ca 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MplsPathIntentCompilerTest.java
@@ -126,7 +126,7 @@
public void testCompile() {
sut.activate();
- List<Intent> compiled = sut.compile(intent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(intent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompilerTest.java
index 03d664d..4e83020 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MultiPointToSinglePointIntentCompilerTest.java
@@ -153,7 +153,7 @@
MultiPointToSinglePointIntentCompiler compiler = makeCompiler(hops);
assertThat(compiler, is(notNullValue()));
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(Matchers.notNullValue()));
assertThat(result, hasSize(1));
Intent resultIntent = result.get(0);
@@ -188,7 +188,7 @@
MultiPointToSinglePointIntentCompiler compiler = makeCompiler(hops);
assertThat(compiler, is(notNullValue()));
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(notNullValue()));
assertThat(result, hasSize(1));
Intent resultIntent = result.get(0);
@@ -221,7 +221,7 @@
MultiPointToSinglePointIntentCompiler compiler = makeCompiler(hops);
assertThat(compiler, is(notNullValue()));
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(notNullValue()));
assertThat(result, hasSize(1));
Intent resultIntent = result.get(0);
@@ -254,7 +254,7 @@
MultiPointToSinglePointIntentCompiler compiler = makeCompiler(hops);
assertThat(compiler, is(notNullValue()));
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(notNullValue()));
assertThat(result, hasSize(1));
Intent resultIntent = result.get(0);
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java
index 40d730a..836117e 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalCircuitIntentCompilerTest.java
@@ -410,7 +410,7 @@
sut.activate(null);
- List<Intent> compiled = sut.compile(intent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(intent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
@@ -483,7 +483,7 @@
sut.activate(null);
- List<Intent> compiled = sut.compile(intent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(intent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
@@ -551,7 +551,7 @@
sut.activate(null);
- List<Intent> compiled = sut.compile(intent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(intent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java
index 0a3f9d2..66dfc41 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/OpticalPathIntentCompilerTest.java
@@ -105,7 +105,7 @@
public void testCompiler() {
sut.activate();
- List<Intent> compiled = sut.compile(intent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(intent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
index 2716b5a..dff6b74 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PathIntentCompilerTest.java
@@ -189,7 +189,7 @@
public void testCompile() {
sut.activate();
- List<Intent> compiled = sut.compile(intent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(intent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
@@ -236,7 +236,7 @@
public void testVlanEncapCompile() {
sut.activate();
- List<Intent> compiled = sut.compile(constraintVlanIntent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(constraintVlanIntent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
@@ -280,7 +280,7 @@
sut.activate();
List<Intent> compiled = sut.compile(constrainIngressEgressVlanIntent,
- Collections.emptyList(), Collections.emptySet());
+ Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
@@ -373,7 +373,7 @@
public void testMplsEncapCompile() {
sut.activate();
- List<Intent> compiled = sut.compile(constraintMplsIntent, Collections.emptyList(), Collections.emptySet());
+ List<Intent> compiled = sut.compile(constraintMplsIntent, Collections.emptyList());
assertThat(compiled, hasSize(1));
Collection<FlowRule> rules = ((FlowRuleIntent) compiled.get(0)).flowRules();
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
index f42e179..3a3648a 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/PointToPointIntentCompilerTest.java
@@ -136,7 +136,7 @@
String[] hops = {"d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8"};
PointToPointIntentCompiler compiler = makeCompiler(hops);
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(Matchers.notNullValue()));
assertThat(result, hasSize(1));
Intent forwardResultIntent = result.get(0);
@@ -167,7 +167,7 @@
String[] hops = {"d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8"};
PointToPointIntentCompiler compiler = makeCompiler(hops);
- List<Intent> result = compiler.compile(intent, null, null);
+ List<Intent> result = compiler.compile(intent, null);
assertThat(result, is(Matchers.notNullValue()));
assertThat(result, hasSize(1));
Intent reverseResultIntent = result.get(0);
@@ -204,7 +204,7 @@
String[] hops = {"1"};
PointToPointIntentCompiler sut = makeCompiler(hops);
- List<Intent> compiled = sut.compile(intent, null, null);
+ List<Intent> compiled = sut.compile(intent, null);
assertThat(compiled, hasSize(1));
assertThat(compiled.get(0), is(instanceOf(PathIntent.class)));
@@ -233,7 +233,7 @@
String[] hops = {"s1", "s2", "s3"};
final PointToPointIntentCompiler compiler = makeCompiler(hops, resourceService);
- final List<Intent> compiledIntents = compiler.compile(intent, null, null);
+ final List<Intent> compiledIntents = compiler.compile(intent, null);
assertThat(compiledIntents, Matchers.notNullValue());
assertThat(compiledIntents, hasSize(1));
@@ -256,7 +256,7 @@
String[] hops = {"s1", "s2", "s3"};
final PointToPointIntentCompiler compiler = makeCompiler(hops, resourceService);
- compiler.compile(intent, null, null);
+ compiler.compile(intent, null);
fail("Point to Point compilation with insufficient bandwidth does "
+ "not throw exception.");