Cleaned up the SRLG and disjoint path code and naming.
Change-Id: I02b6fe5ee1e3f5eadc4e88800386a23349ee5e58
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 bf911e2..03d664d 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
@@ -21,9 +21,7 @@
import org.onosproject.core.ApplicationId;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
-import org.onosproject.net.DisjointPath;
import org.onosproject.net.ElementId;
-import org.onosproject.net.Link;
import org.onosproject.net.Path;
import org.onosproject.net.device.DeviceServiceAdapter;
import org.onosproject.net.flow.TrafficSelector;
@@ -33,12 +31,10 @@
import org.onosproject.net.intent.IntentTestsMocks;
import org.onosproject.net.intent.LinkCollectionIntent;
import org.onosproject.net.intent.MultiPointToSinglePointIntent;
-import org.onosproject.net.topology.LinkWeight;
-import org.onosproject.net.topology.PathService;
+import org.onosproject.net.topology.PathServiceAdapter;
import java.util.HashSet;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import static org.hamcrest.CoreMatchers.instanceOf;
@@ -63,7 +59,7 @@
/**
* Mock path service for creating paths within the test.
*/
- private static class MockPathService implements PathService {
+ private static class MockPathService extends PathServiceAdapter {
final String[] pathHops;
@@ -89,33 +85,6 @@
return result;
}
-
- @Override
- public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight) {
- return null;
- }
-
- @Override
- public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst) {
- return null;
- }
-
- @Override
- public Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst, LinkWeight weight) {
- return null;
- }
-
- @Override
- public Set<DisjointPath> getSRLGDisjointPaths(ElementId src, ElementId dst,
- Map<Link, Object> riskProfile) {
- return null;
- }
-
- @Override
- public Set<DisjointPath> getSRLGDisjointPaths(ElementId src, ElementId dst, LinkWeight weight,
- Map<Link, Object> riskProfile) {
- return null;
- }
}
/**
diff --git a/core/net/src/test/java/org/onosproject/net/topology/impl/PathManagerTest.java b/core/net/src/test/java/org/onosproject/net/topology/impl/PathManagerTest.java
index fc46c48..1911da5 100644
--- a/core/net/src/test/java/org/onosproject/net/topology/impl/PathManagerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/topology/impl/PathManagerTest.java
@@ -19,19 +19,15 @@
import org.junit.Before;
import org.junit.Test;
import org.onosproject.net.DeviceId;
-import org.onosproject.net.DisjointPath;
import org.onosproject.net.ElementId;
import org.onosproject.net.Host;
import org.onosproject.net.HostId;
-import org.onosproject.net.Link;
import org.onosproject.net.Path;
-import org.onosproject.net.host.HostService;
import org.onosproject.net.host.HostServiceAdapter;
import org.onosproject.net.provider.ProviderId;
import org.onosproject.net.topology.LinkWeight;
import org.onosproject.net.topology.PathService;
import org.onosproject.net.topology.Topology;
-import org.onosproject.net.topology.TopologyService;
import org.onosproject.net.topology.TopologyServiceAdapter;
import java.util.HashMap;
@@ -139,7 +135,7 @@
}
// Fake entity to give out paths.
- private class FakeTopoMgr extends TopologyServiceAdapter implements TopologyService {
+ private class FakeTopoMgr extends TopologyServiceAdapter {
Set<Path> paths = new HashSet<>();
@Override
@@ -151,32 +147,10 @@
public Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeight weight) {
return paths;
}
-
- @Override
- public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst) {
- return null;
- }
-
- @Override
- public Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeight weight) {
- return null;
- }
-
- @Override
- public Set<DisjointPath> getSRLGDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
- Map<Link, Object> riskProfile) {
- return null;
- }
-
- @Override
- public Set<DisjointPath> getSRLGDisjointPaths(Topology topology, DeviceId src, DeviceId dst, LinkWeight weight,
- Map<Link, Object> riskProfile) {
- return null;
- }
}
// Fake entity to give out hosts.
- private class FakeHostMgr extends HostServiceAdapter implements HostService {
+ private class FakeHostMgr extends HostServiceAdapter {
private Map<HostId, Host> hosts = new HashMap<>();
@Override