Sho SHIMIZU
Committed by Gerrit Code Review

Remove dependency on LinkResourceAllocaations from IntentCompiler

This change breaks backward compatibility of IntentCompier API

Change-Id: I471d0e28d97c2379f66d980d3176f89022c3a470
Showing 30 changed files with 45 additions and 143 deletions
......@@ -16,10 +16,8 @@
package org.onosproject.net.intent;
import com.google.common.annotations.Beta;
import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.List;
import java.util.Set;
/**
* Abstraction of a compiler which is capable of taking an intent
......@@ -34,11 +32,9 @@ public interface IntentCompiler<T extends Intent> {
*
* @param intent intent to be compiled
* @param installable previously compilation result; optional
* @param resources previously allocated resources; optional
* @return list of resulting intents
* @throws IntentException if issues are encountered while compiling the intent
*/
List<Intent> compile(T intent, List<Intent> installable,
Set<LinkResourceAllocations> resources);
List<Intent> compile(T intent, List<Intent> installable);
}
......
/*
* Copyright 2014 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.net.resource.link;
/**
* Representation of allocated link resources.
*
* @deprecated 1.4.0 Emu Release
*/
@Deprecated
public interface LinkResourceAllocations {
}
/*
* Copyright 2015 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Services for reserving links and their capacity as network resources,
* e.g.&nbsp;bandwidth, lambdas.
* <p>
* Note: Classes under the package will be remove.
* Developers should not use the classes.
* This package is marked as deprecated in Emu Release.
* </p>
*/
@Deprecated
package org.onosproject.net.resource.link;
......@@ -84,7 +84,7 @@ public class FakeIntentManager implements TestableIntentService {
try {
// For the fake, we compile using a single level pass
List<Intent> installable = new ArrayList<>();
for (Intent compiled : getCompiler(intent).compile(intent, null, null)) {
for (Intent compiled : getCompiler(intent).compile(intent, null)) {
installable.add(compiled);
}
executeInstallingPhase(intent, installable);
......
......@@ -19,14 +19,12 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.onosproject.core.IdGenerator;
import org.onosproject.net.resource.link.LinkResourceAllocations;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import static org.junit.Assert.*;
import static org.onosproject.net.intent.IntentEvent.Type.*;
......@@ -220,8 +218,7 @@ public class IntentServiceTest {
}
@Override
public List<Intent> compile(TestIntent intent, List<Intent> installable,
Set<LinkResourceAllocations> resources) {
public List<Intent> compile(TestIntent intent, List<Intent> installable) {
if (fail) {
throw new IntentException("compile failed by design");
}
......
......@@ -79,7 +79,7 @@ class CompilerRegistry {
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;
......
......@@ -31,12 +31,10 @@ import org.onosproject.net.intent.HostToHostIntent;
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 @@ public class HostToHostIntentCompiler
}
@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 ?
......
......@@ -38,7 +38,6 @@ import org.onosproject.net.intent.FlowRuleIntent;
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 @@ public class LinkCollectionIntentCompiler implements IntentCompiler<LinkCollecti
}
@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();
......
......@@ -39,7 +39,6 @@ import org.onosproject.net.intent.FlowObjectiveIntent;
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 @@ public class LinkCollectionIntentFlowObjectivesCompiler implements IntentCompile
}
@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();
......
......@@ -20,7 +20,6 @@ import static org.onosproject.net.DefaultEdgeLink.createEdgeLink;
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.Intent;
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 @@ public class MplsIntentCompiler extends ConnectivityIntentCompiler<MplsIntent>
}
@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();
......
......@@ -51,7 +51,6 @@ import org.onosproject.net.intent.MplsPathIntent;
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 @@ public class MplsPathIntentCompiler implements IntentCompiler<MplsPathIntent> {
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);
......
......@@ -34,7 +34,6 @@ import org.onosproject.net.intent.IntentExtensionService;
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 @@ public class MultiPointToSinglePointIntentCompiler
}
@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();
......
......@@ -64,7 +64,6 @@ import org.onosproject.net.newresource.Resource;
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 @@ public class OpticalCircuitIntentCompiler implements IntentCompiler<OpticalCircu
}
@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();
......
......@@ -47,7 +47,6 @@ import org.onosproject.net.newresource.ResourceAllocation;
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 @@ public class OpticalConnectivityIntentCompiler implements IntentCompiler<Optical
@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();
......
......@@ -38,14 +38,12 @@ import org.onosproject.net.intent.Intent;
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 @@ public class OpticalPathIntentCompiler implements IntentCompiler<OpticalPathInte
}
@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
......
......@@ -36,12 +36,10 @@ import org.onosproject.net.intent.Intent;
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 @@ import static org.slf4j.LoggerFactory.getLogger;
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 @@ public class PathIntentCompiler
}
@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<>();
......
......@@ -17,7 +17,6 @@ package org.onosproject.net.intent.impl.compiler;
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.Intent;
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 @@ public class PathIntentFlowObjectiveCompiler
}
@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<>();
......
......@@ -26,11 +26,9 @@ import org.onosproject.net.intent.Intent;
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 @@ public class PointToPointIntentCompiler
}
@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();
......
......@@ -26,7 +26,6 @@ import org.onosproject.net.intent.Intent;
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 @@ public class SinglePointToMultiPointIntentCompiler
@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()) {
......
......@@ -22,10 +22,8 @@ import org.apache.felix.scr.annotations.Deactivate;
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 @@ public class TwoWayP2PIntentCompiler
}
@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())
......
......@@ -45,7 +45,6 @@ import org.onosproject.net.intent.IntentListener;
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 @@ public class IntentManagerTest {
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 @@ public class IntentManagerTest {
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");
}
}
......
......@@ -129,7 +129,7 @@ public class HostToHostIntentCompilerTest extends AbstractIntentTest {
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);
......
......@@ -123,7 +123,7 @@ public class LinkCollectionIntentCompilerTest {
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();
......
......@@ -108,7 +108,7 @@ public class MplsIntentCompilerTest extends AbstractIntentTest {
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 @@ public class MplsIntentCompilerTest extends AbstractIntentTest {
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 @@ public class MplsIntentCompilerTest extends AbstractIntentTest {
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)));
......
......@@ -126,7 +126,7 @@ public class MplsPathIntentCompilerTest {
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();
......
......@@ -153,7 +153,7 @@ public class MultiPointToSinglePointIntentCompilerTest extends AbstractIntentTes
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 @@ public class MultiPointToSinglePointIntentCompilerTest extends AbstractIntentTes
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 @@ public class MultiPointToSinglePointIntentCompilerTest extends AbstractIntentTes
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 @@ public class MultiPointToSinglePointIntentCompilerTest extends AbstractIntentTes
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);
......
......@@ -410,7 +410,7 @@ public class OpticalCircuitIntentCompilerTest {
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 @@ public class OpticalCircuitIntentCompilerTest {
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 @@ public class OpticalCircuitIntentCompilerTest {
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();
......
......@@ -105,7 +105,7 @@ public class OpticalPathIntentCompilerTest {
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();
......
......@@ -189,7 +189,7 @@ public class PathIntentCompilerTest {
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 class PathIntentCompilerTest {
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 @@ public class PathIntentCompilerTest {
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 class PathIntentCompilerTest {
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();
......
......@@ -136,7 +136,7 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest {
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 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest {
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 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest {
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 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest {
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 @@ public class PointToPointIntentCompilerTest extends AbstractIntentTest {
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.");
......