summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/core/api/src/main/java/org/onosproject/net/topology')
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/ClusterId.java76
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultGraphDescription.java124
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java97
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyEdge.java85
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyVertex.java66
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java72
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GraphDescription.java57
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java36
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/LinkWeight.java25
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java36
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java44
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathService.java109
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/Topology.java71
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java51
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEdge.java33
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEvent.java78
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyGraph.java25
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyListener.java24
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProvider.java30
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderRegistry.java25
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderService.java37
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java188
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java199
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStoreDelegate.java24
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyVertex.java33
-rw-r--r--framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/package-info.java20
26 files changed, 0 insertions, 1665 deletions
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/ClusterId.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/ClusterId.java
deleted file mode 100644
index 1e6780fa..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/ClusterId.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.topology;
-
-import java.util.Objects;
-
-import static com.google.common.base.MoreObjects.toStringHelper;
-
-/**
- * Representation of the topology cluster identity.
- */
-public final class ClusterId {
-
- private final int id;
-
- // Public construction is prohibit
- private ClusterId(int id) {
- this.id = id;
- }
-
- /**
- * Returns the cluster identifier, represented by the specified integer
- * serial number.
- *
- * @param id integer serial number
- * @return cluster identifier
- */
- public static ClusterId clusterId(int id) {
- return new ClusterId(id);
- }
-
- /**
- * Returns the backing integer index.
- *
- * @return backing integer index
- */
- public int index() {
- return id;
- }
-
- @Override
- public int hashCode() {
- return id;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj instanceof ClusterId) {
- final ClusterId other = (ClusterId) obj;
- return Objects.equals(this.id, other.id);
- }
- return false;
- }
-
- @Override
- public String toString() {
- return toStringHelper(this).add("id", id).toString();
- }
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultGraphDescription.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultGraphDescription.java
deleted file mode 100644
index 965c05d4..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultGraphDescription.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-package org.onosproject.net.topology;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Maps;
-import org.onosproject.net.AbstractDescription;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.Device;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.Link;
-import org.onosproject.net.SparseAnnotations;
-import org.slf4j.Logger;
-
-import java.util.Map;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static org.slf4j.LoggerFactory.getLogger;
-
-/**
- * Default implementation of an immutable topology graph data carrier.
- */
-public class DefaultGraphDescription extends AbstractDescription
- implements GraphDescription {
-
- private static final Logger log = getLogger(DefaultGraphDescription.class);
-
- private final long nanos;
- private final long creationTime;
- private final ImmutableSet<TopologyVertex> vertexes;
- private final ImmutableSet<TopologyEdge> edges;
-
- private final Map<DeviceId, TopologyVertex> vertexesById = Maps.newHashMap();
-
- /**
- * Creates a minimal topology graph description to allow core to construct
- * and process the topology graph.
- *
- * @param nanos time in nanos of when the topology description was created
- * @param millis time in millis of when the topology description was created
- * @param devices collection of infrastructure devices
- * @param links collection of infrastructure links
- * @param annotations optional key/value annotations map
- */
- public DefaultGraphDescription(long nanos, long millis,
- Iterable<Device> devices,
- Iterable<Link> links,
- SparseAnnotations... annotations) {
- super(annotations);
- this.nanos = nanos;
- this.creationTime = millis;
- this.vertexes = buildVertexes(devices);
- this.edges = buildEdges(links);
- vertexesById.clear();
- }
-
- @Override
- public long timestamp() {
- return nanos;
- }
-
- @Override
- public long creationTime() {
- return creationTime;
- }
-
- @Override
- public ImmutableSet<TopologyVertex> vertexes() {
- return vertexes;
- }
-
- @Override
- public ImmutableSet<TopologyEdge> edges() {
- return edges;
- }
-
- // Builds a set of topology vertexes from the specified list of devices
- private ImmutableSet<TopologyVertex> buildVertexes(Iterable<Device> devices) {
- ImmutableSet.Builder<TopologyVertex> vertexes = ImmutableSet.builder();
- for (Device device : devices) {
- TopologyVertex vertex = new DefaultTopologyVertex(device.id());
- vertexes.add(vertex);
- vertexesById.put(vertex.deviceId(), vertex);
- }
- return vertexes.build();
- }
-
- // Builds a set of topology vertexes from the specified list of links
- private ImmutableSet<TopologyEdge> buildEdges(Iterable<Link> links) {
- ImmutableSet.Builder<TopologyEdge> edges = ImmutableSet.builder();
- for (Link link : links) {
- try {
- edges.add(new DefaultTopologyEdge(vertexOf(link.src()),
- vertexOf(link.dst()),
- link));
- } catch (IllegalArgumentException e) {
- log.debug("Ignoring {}, missing vertex", link);
- }
- }
- return edges.build();
- }
-
- // Fetches a vertex corresponding to the given connection point device.
- private TopologyVertex vertexOf(ConnectPoint connectPoint) {
- DeviceId id = connectPoint.deviceId();
- TopologyVertex vertex = vertexesById.get(id);
- checkArgument(vertex != null, "Vertex missing for %s", id);
- return vertex;
- }
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java
deleted file mode 100644
index ac32316c..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-package org.onosproject.net.topology;
-
-import java.util.Objects;
-
-import static com.google.common.base.MoreObjects.toStringHelper;
-
-/**
- * Default implementation of a network topology cluster.
- */
-public class DefaultTopologyCluster implements TopologyCluster {
-
- private final ClusterId id;
- private final int deviceCount;
- private final int linkCount;
- private final TopologyVertex root;
-
- /**
- * Creates a new topology cluster descriptor with the specified attributes.
- *
- * @param id cluster id
- * @param deviceCount number of devices in the cluster
- * @param linkCount number of links in the cluster
- * @param root cluster root node
- */
- public DefaultTopologyCluster(ClusterId id, int deviceCount, int linkCount,
- TopologyVertex root) {
- this.id = id;
- this.deviceCount = deviceCount;
- this.linkCount = linkCount;
- this.root = root;
- }
-
- @Override
- public ClusterId id() {
- return id;
- }
-
- @Override
- public int deviceCount() {
- return deviceCount;
- }
-
- @Override
- public int linkCount() {
- return linkCount;
- }
-
- @Override
- public TopologyVertex root() {
- return root;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, deviceCount, linkCount, root);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj instanceof DefaultTopologyCluster) {
- final DefaultTopologyCluster other = (DefaultTopologyCluster) obj;
- return Objects.equals(this.id, other.id) &&
- Objects.equals(this.deviceCount, other.deviceCount) &&
- Objects.equals(this.linkCount, other.linkCount) &&
- Objects.equals(this.root, other.root);
- }
- return false;
- }
-
- @Override
- public String toString() {
- return toStringHelper(this)
- .add("id", id)
- .add("deviceCount", deviceCount)
- .add("linkCount", linkCount)
- .add("root", root)
- .toString();
- }
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyEdge.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyEdge.java
deleted file mode 100644
index 99d700e1..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyEdge.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.net.Link;
-
-import java.util.Objects;
-
-import static com.google.common.base.MoreObjects.toStringHelper;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Implementation of the topology edge backed by a link.
- */
-public class DefaultTopologyEdge implements TopologyEdge {
-
- private final Link link;
- private final TopologyVertex src;
- private final TopologyVertex dst;
-
- /**
- * Creates a new topology edge.
- *
- * @param src source vertex
- * @param dst destination vertex
- * @param link infrastructure link
- */
- public DefaultTopologyEdge(TopologyVertex src, TopologyVertex dst, Link link) {
- this.src = src;
- this.dst = dst;
- this.link = checkNotNull(link);
- }
-
- @Override
- public Link link() {
- return link;
- }
-
- @Override
- public TopologyVertex src() {
- return src;
- }
-
- @Override
- public TopologyVertex dst() {
- return dst;
- }
-
- @Override
- public int hashCode() {
- return link.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj instanceof DefaultTopologyEdge) {
- final DefaultTopologyEdge other = (DefaultTopologyEdge) obj;
- return Objects.equals(this.link, other.link);
- }
- return false;
- }
-
- @Override
- public String toString() {
- return toStringHelper(this).add("src", src).add("dst", dst).toString();
- }
-
-}
-
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyVertex.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyVertex.java
deleted file mode 100644
index 4782bc95..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyVertex.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.net.DeviceId;
-
-import java.util.Objects;
-
-/**
- * Implementation of the topology vertex backed by a device id.
- */
-public class DefaultTopologyVertex implements TopologyVertex {
-
- private final DeviceId deviceId;
-
- /**
- * Creates a new topology vertex.
- *
- * @param deviceId backing infrastructure device identifier
- */
- public DefaultTopologyVertex(DeviceId deviceId) {
- this.deviceId = deviceId;
- }
-
- @Override
- public DeviceId deviceId() {
- return deviceId;
- }
-
- @Override
- public int hashCode() {
- return deviceId.hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj instanceof DefaultTopologyVertex) {
- final DefaultTopologyVertex other = (DefaultTopologyVertex) obj;
- return Objects.equals(this.deviceId, other.deviceId);
- }
- return false;
- }
-
- @Override
- public String toString() {
- return deviceId.toString();
- }
-
-}
-
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java
deleted file mode 100644
index c966902e..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GeoDistanceLinkWeight.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-
-package org.onosproject.net.topology;
-
-import org.onlab.util.GeoLocation;
-import org.onosproject.net.AnnotationKeys;
-import org.onosproject.net.Annotations;
-import org.onosproject.net.Device;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.device.DeviceService;
-
-import static java.lang.Double.MAX_VALUE;
-
-/**
- * Link weight for measuring link cost using the geo distance between link
- * vertices as determined by the element longitude/latitude annotation.
- */
-public class GeoDistanceLinkWeight implements LinkWeight {
-
- private static final double MAX_KM = 40_075 / 2.0;
-
- private final DeviceService deviceService;
-
- /**
- * Creates a new link-weight with access to the specified device service.
- *
- * @param deviceService device service reference
- */
- public GeoDistanceLinkWeight(DeviceService deviceService) {
- this.deviceService = deviceService;
- }
-
- @Override
- public double weight(TopologyEdge edge) {
- GeoLocation src = getLocation(edge.link().src().deviceId());
- GeoLocation dst = getLocation(edge.link().dst().deviceId());
- return src != null && dst != null ? src.kilometersTo(dst) : MAX_KM;
- }
-
- private GeoLocation getLocation(DeviceId deviceId) {
- Device d = deviceService.getDevice(deviceId);
- Annotations a = d != null ? d.annotations() : null;
- double latitude = getDouble(a, AnnotationKeys.LATITUDE);
- double longitude = getDouble(a, AnnotationKeys.LONGITUDE);
- return latitude == MAX_VALUE || longitude == MAX_VALUE ? null :
- new GeoLocation(latitude, longitude);
- }
-
- private double getDouble(Annotations a, String key) {
- String value = a != null ? a.value(key) : null;
- try {
- return value != null ? Double.parseDouble(value) : MAX_VALUE;
- } catch (NumberFormatException e) {
- return MAX_VALUE;
- }
- }
-}
-
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GraphDescription.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GraphDescription.java
deleted file mode 100644
index 806a5a45..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/GraphDescription.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-package org.onosproject.net.topology;
-
-import org.onosproject.net.Description;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Describes attribute(s) of a network graph.
- */
-public interface GraphDescription extends Description {
-
- /**
- * Returns the creation timestamp of the graph description. This is
- * expressed in system nanos to allow proper sequencing.
- *
- * @return graph description creation timestamp
- */
- long timestamp();
-
- /**
- * Returns the creation timestamp of the graph description. This is
- * expressed in system millis to allow proper date and time formatting.
- *
- * @return graph description creation timestamp in millis
- */
- long creationTime();
-
- /**
- * Returns the set of topology graph vertexes.
- *
- * @return set of graph vertexes
- */
- ImmutableSet<TopologyVertex> vertexes();
-
- /**
- * Returns the set of topology graph edges.
- *
- * @return set of graph edges
- */
- ImmutableSet<TopologyEdge> edges();
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java
deleted file mode 100644
index c557016b..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/HopCountLinkWeight.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.onosproject.net.topology;
-
-import static org.onosproject.net.Link.State.ACTIVE;
-import static org.onosproject.net.Link.Type.INDIRECT;
-
-/**
- * Link weight for measuring link cost as hop count with indirect links
- * being as expensive as traversing the entire graph to assume the worst.
- */
-public class HopCountLinkWeight implements LinkWeight {
- private final int indirectLinkCost;
-
- /**
- * Creates a new hop-count weight.
- */
- public HopCountLinkWeight() {
- this.indirectLinkCost = Short.MAX_VALUE;
- }
-
- /**
- * Creates a new hop-count weight with the specified cost of indirect links.
- */
- public HopCountLinkWeight(int indirectLinkCost) {
- this.indirectLinkCost = indirectLinkCost;
- }
-
- @Override
- public double weight(TopologyEdge edge) {
- // To force preference to use direct paths first, make indirect
- // links as expensive as the linear vertex traversal.
- return edge.link().state() ==
- ACTIVE ? (edge.link().type() ==
- INDIRECT ? indirectLinkCost : 1) : -1;
- }
-}
-
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/LinkWeight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/LinkWeight.java
deleted file mode 100644
index a19abd40..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/LinkWeight.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.topology;
-
-import org.onlab.graph.EdgeWeight;
-
-/**
- * Entity capable of determining cost or weight of a specified topology
- * graph edge.
- */
-public interface LinkWeight extends EdgeWeight<TopologyVertex, TopologyEdge> {
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java
deleted file mode 100644
index 8463e087..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/MetricLinkWeight.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-
-package org.onosproject.net.topology;
-
-import org.onosproject.net.AnnotationKeys;
-
-/**
- * Link weight for measuring link cost using the link metric annotation.
- */
-public class MetricLinkWeight implements LinkWeight {
-
- @Override
- public double weight(TopologyEdge edge) {
- String v = edge.link().annotations().value(AnnotationKeys.METRIC);
- try {
- return v != null ? Double.parseDouble(v) : 1;
- } catch (NumberFormatException e) {
- return 1;
- }
- }
-}
-
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java
deleted file mode 100644
index 9d077e1e..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathAdminService.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-
-package org.onosproject.net.topology;
-
-import org.onlab.graph.GraphPathSearch;
-
-/**
- * Provides administrative abilities to tailor the path service behaviours.
- */
-public interface PathAdminService {
-
- /**
- * Sets the specified link-weight function to be used as a default.
- * If null is specified, the builtin default hop-count link-weight will be
- * used.
- *
- * @param linkWeight default link-weight function
- */
- void setDefaultLinkWeight(LinkWeight linkWeight);
-
- /**
- * Sets the specified graph path search algorightm to be used as a default.
- * If null is specified, the builtin default all-shortest-paths Dijkstra
- * algorithm will be used.
- *
- * @param graphPathSearch default graph path search algorithm
- */
- void setDefaultGraphPathSearch(GraphPathSearch<TopologyVertex, TopologyEdge> graphPathSearch);
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathService.java
deleted file mode 100644
index 38954079..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/PathService.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.net.DisjointPath;
-import org.onosproject.net.ElementId;
-import org.onosproject.net.Link;
-import org.onosproject.net.Path;
-
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Service for obtaining pre-computed paths or for requesting computation of
- * paths using the current topology snapshot.
- */
-public interface PathService {
-
- /**
- * Returns the set of all shortest paths between the specified source and
- * destination elements. The path is computed using the default edge-weight
- * function, which by default is hop-count.
- *
- * @param src source element
- * @param dst destination element
- * @return set of all shortest paths between the two elements
- */
- Set<Path> getPaths(ElementId src, ElementId dst);
-
- /**
- * Returns the set of all shortest paths between the specified source and
- * destination network elements. The path is computed using the supplied
- * edge-weight function.
- *
- * @param src source element
- * @param dst destination element
- * @param weight edge-weight entity
- * @return set of all shortest paths between the two element
- */
- Set<Path> getPaths(ElementId src, ElementId dst, LinkWeight weight);
-
- /**
- * Returns the set of all disjoint shortest path pairs between the
- * specified source and destination elements. The path is computed using
- * the default edge-weight function, which by default is hop-count.
- *
- * @param src source device
- * @param dst destination device
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst);
-
- /**
- * Returns the set of all disjoint shortest path pairs between the
- * specified source and destination elements. The path is computed using
- * the supplied edge-weight function.
- *
- * @param src source device
- * @param dst destination device
- * @param weight edge-weight entity
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
- LinkWeight weight);
-
- /**
- * Returns the set of all disjoint shortest path pairs between the
- * specified source and destination elements and taking into consideration
- * the provided risk profile. The path is computed using the default
- * edge-weight function, which by default is hop-count.
- *
- * @param src source device
- * @param dst destination device
- * @param riskProfile map of edges to risk profiles
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
- Map<Link, Object> riskProfile);
-
- /**
- * Returns the set of all disjoint shortest path pairs between the
- * specified source and destination elements and taking into consideration
- * the provided risk profile. The path is computed using the supplied
- * edge-weight function.
- *
- * @param src source device
- * @param dst destination device
- * @param weight edge-weight entity
- * @param riskProfile map of edges to risk profiles
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(ElementId src, ElementId dst,
- LinkWeight weight,
- Map<Link, Object> riskProfile);
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/Topology.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/Topology.java
deleted file mode 100644
index 6337807c..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/Topology.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-package org.onosproject.net.topology;
-
-import org.onosproject.net.Provided;
-
-/**
- * Represents a network topology computation snapshot.
- */
-public interface Topology extends Provided {
-
- /**
- * Returns the time, specified in system nanos of when the topology became
- * available.
- *
- * @return time in system nanos
- */
- long time();
-
- /**
- * Returns the time, specified in system millis of when the topology became
- * available.
- *
- * @return time in system nanos
- */
- long creationTime();
-
- /**
- * Returns the time, specified in system nanos of how long the topology took
- * to compute.
- *
- * @return elapsed time in system nanos
- */
- long computeCost();
-
- /**
- * Returns the number of SCCs (strongly connected components) in the
- * topology.
- *
- * @return number of clusters
- */
- int clusterCount();
-
- /**
- * Returns the number of infrastructure devices in the topology.
- *
- * @return number of devices
- */
- int deviceCount();
-
- /**
- * Returns the number of infrastructure links in the topology.
- *
- * @return number of links
- */
- int linkCount();
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java
deleted file mode 100644
index 8e685534..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2014-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.
- */
-package org.onosproject.net.topology;
-
-/**
- * Representation of an SCC (strongly-connected component) in a network topology.
- */
-public interface TopologyCluster {
-
- /**
- * Returns the cluster id.
- *
- * @return cluster identifier
- */
- ClusterId id();
-
- /**
- * Returns the number of devices in the cluster.
- *
- * @return number of cluster devices
- */
- int deviceCount();
-
- /**
- * Returns the number of infrastructure links in the cluster.
- *
- * @return number of cluster links
- */
- int linkCount();
-
- /**
- * Returns the cluster root vertex.
- *
- * @return cluster root vertex
- */
- TopologyVertex root();
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEdge.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEdge.java
deleted file mode 100644
index 008c8c44..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEdge.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.topology;
-
-import org.onlab.graph.Edge;
-import org.onosproject.net.Link;
-
-/**
- * Represents an edge in the topology graph.
- */
-public interface TopologyEdge extends Edge<TopologyVertex> {
-
- /**
- * Returns the associated infrastructure link.
- *
- * @return backing infrastructure link
- */
- Link link();
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEvent.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEvent.java
deleted file mode 100644
index 10c8dfc3..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyEvent.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.event.AbstractEvent;
-import org.onosproject.event.Event;
-
-import java.util.List;
-
-/**
- * Describes network topology event.
- */
-public class TopologyEvent extends AbstractEvent<TopologyEvent.Type, Topology> {
-
- private final List<Event> reasons;
-
- /**
- * Type of topology events.
- */
- public enum Type {
- /**
- * Signifies that topology has changed.
- */
- TOPOLOGY_CHANGED
- }
-
- /**
- * Creates an event of a given type and for the specified topology and the
- * current time.
- *
- * @param type topology event type
- * @param topology event topology subject
- * @param reasons list of events that triggered topology change
- */
- public TopologyEvent(Type type, Topology topology, List<Event> reasons) {
- super(type, topology);
- this.reasons = reasons;
- }
-
- /**
- * Creates an event of a given type and for the specified topology and time.
- *
- * @param type link event type
- * @param topology event topology subject
- * @param reasons list of events that triggered topology change
- * @param time occurrence time
- */
- public TopologyEvent(Type type, Topology topology, List<Event> reasons,
- long time) {
- super(type, topology, time);
- this.reasons = reasons;
- }
-
-
- /**
- * Returns the list of events that triggered the topology change.
- *
- * @return list of events responsible for change in topology; null if
- * initial topology computation
- */
- public List<Event> reasons() {
- return reasons;
- }
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyGraph.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyGraph.java
deleted file mode 100644
index f3565fa4..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyGraph.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.topology;
-
-import org.onlab.graph.Graph;
-
-/**
- * Represents an immutable topology graph.
- */
-public interface TopologyGraph extends Graph<TopologyVertex, TopologyEdge> {
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyListener.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyListener.java
deleted file mode 100644
index 625587b0..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyListener.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.event.EventListener;
-
-/**
- * Entity capable of receiving network topology related events.
- */
-public interface TopologyListener extends EventListener<TopologyEvent> {
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProvider.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProvider.java
deleted file mode 100644
index f52b798b..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProvider.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.net.provider.Provider;
-
-/**
- * Means for injecting topology information into the core.
- */
-public interface TopologyProvider extends Provider {
-
- /**
- * Triggers topology recomputation.
- */
- void triggerRecompute();
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderRegistry.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderRegistry.java
deleted file mode 100644
index 15eeed45..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderRegistry.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.net.provider.ProviderRegistry;
-
-/**
- * Abstraction of a network topology provider registry.
- */
-public interface TopologyProviderRegistry extends
- ProviderRegistry<TopologyProvider, TopologyProviderService> {
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderService.java
deleted file mode 100644
index 742110a2..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyProviderService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.event.Event;
-import org.onosproject.net.provider.ProviderService;
-
-import java.util.List;
-
-/**
- * Means for injecting topology information into the core.
- */
-public interface TopologyProviderService extends ProviderService<TopologyProvider> {
-
- /**
- * Signals the core that some aspect of the topology has changed.
- *
- * @param graphDescription information about the network graph
- * @param reasons events that triggered topology change
- */
- void topologyChanged(GraphDescription graphDescription,
- List<Event> reasons);
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java
deleted file mode 100644
index 466e4f9b..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyService.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.event.ListenerService;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.DisjointPath;
-import org.onosproject.net.Link;
-import org.onosproject.net.Path;
-
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Service for providing network topology information.
- */
-public interface TopologyService
- extends ListenerService<TopologyEvent, TopologyListener> {
-
- /**
- * Returns the current topology descriptor.
- *
- * @return current topology
- */
- Topology currentTopology();
-
- /**
- * Indicates whether the specified topology is the latest or not.
- *
- * @param topology topology descriptor
- * @return true if the topology is the most recent; false otherwise
- */
- boolean isLatest(Topology topology);
-
- /**
- * Returns the graph view of the specified topology.
- *
- * @param topology topology descriptor
- * @return topology graph view
- */
- TopologyGraph getGraph(Topology topology);
-
- /**
- * Returns the set of clusters in the specified topology.
- *
- * @param topology topology descriptor
- * @return set of topology clusters
- */
- Set<TopologyCluster> getClusters(Topology topology);
-
- /**
- * Returns the cluster with the specified ID.
- *
- * @param topology topology descriptor
- * @param clusterId cluster identifier
- * @return topology cluster
- */
- TopologyCluster getCluster(Topology topology, ClusterId clusterId);
-
- /**
- * Returns the set of devices that belong to the specified cluster.
- *
- * @param topology topology descriptor
- * @param cluster topology cluster
- * @return set of cluster devices
- */
- Set<DeviceId> getClusterDevices(Topology topology, TopologyCluster cluster);
-
- /**
- * Returns the set of links that form the specified cluster.
- *
- * @param topology topology descriptor
- * @param cluster topology cluster
- * @return set of cluster links
- */
- Set<Link> getClusterLinks(Topology topology, TopologyCluster cluster);
-
- /**
- * Returns the set of all shortest paths, precomputed in terms of hop-count,
- * between the specified source and destination devices.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @return set of all shortest paths between the two devices
- */
- Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst);
-
- /**
- * Returns the set of all shortest paths, computed using the supplied
- * edge-weight entity, between the specified source and destination devices.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param weight edge-weight entity
- * @return set of all shortest paths between the two devices
- */
- Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
- LinkWeight weight);
-
- /**
- * Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count,
- * between the specified source and destination devices.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst);
-
- /**
- * Returns the set of all disjoint shortest path pairs, computed using the supplied
- * edge-weight entity, between the specified source and destination devices.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param weight edge-weight entity
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
- LinkWeight weight);
-
- /**
- * Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count,
- * between the specified source and destination devices.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param riskProfile map of edges to risk profiles
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
- Map<Link, Object> riskProfile);
-
- /**
- * Returns the set of all disjoint shortest path pairs, precomputed in terms of hop-count,
- * between the specified source and destination devices.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param weight edge-weight entity
- * @param riskProfile map of edges to risk profiles
- * @return set of all shortest paths between the two devices
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
- LinkWeight weight, Map<Link, Object> riskProfile);
-
- /**
- * Indicates whether the specified connection point is part of the network
- * infrastructure or part of network edge.
- *
- * @param topology topology descriptor
- * @param connectPoint connection point
- * @return true of connection point is in infrastructure; false if edge
- */
- boolean isInfrastructure(Topology topology, ConnectPoint connectPoint);
-
-
- /**
- * Indicates whether broadcast is allowed for traffic received on the
- * specified connection point.
- *
- * @param topology topology descriptor
- * @param connectPoint connection point
- * @return true if broadcast is permissible
- */
- boolean isBroadcastPoint(Topology topology, ConnectPoint connectPoint);
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java
deleted file mode 100644
index 039a205c..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStore.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.event.Event;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.Link;
-import org.onosproject.net.Path;
-import org.onosproject.net.DisjointPath;
-import org.onosproject.net.provider.ProviderId;
-import org.onosproject.store.Store;
-
-import java.util.List;
-import java.util.Set;
-import java.util.Map;
-
-/**
- * Manages inventory of topology snapshots; not intended for direct use.
- */
-public interface TopologyStore extends Store<TopologyEvent, TopologyStoreDelegate> {
-
- /**
- * Returns the current topology snapshot.
- *
- * @return current topology descriptor
- */
- Topology currentTopology();
-
- /**
- * Indicates whether the topology is the latest.
- *
- * @param topology topology descriptor
- * @return true if topology is the most recent one
- */
- boolean isLatest(Topology topology);
-
- /**
- * Returns the immutable graph view of the current topology.
- *
- * @param topology topology descriptor
- * @return graph view
- */
- TopologyGraph getGraph(Topology topology);
-
- /**
- * Returns the set of topology SCC clusters.
- *
- * @param topology topology descriptor
- * @return set of clusters
- */
- Set<TopologyCluster> getClusters(Topology topology);
-
- /**
- * Returns the cluster of the specified topology.
- *
- * @param topology topology descriptor
- * @param clusterId cluster identity
- * @return topology cluster
- */
- TopologyCluster getCluster(Topology topology, ClusterId clusterId);
-
- /**
- * Returns the cluster of the specified topology.
- *
- * @param topology topology descriptor
- * @param cluster topology cluster
- * @return set of cluster links
- */
- Set<DeviceId> getClusterDevices(Topology topology, TopologyCluster cluster);
-
- /**
- * Returns the cluster of the specified topology.
- *
- * @param topology topology descriptor
- * @param cluster topology cluster
- * @return set of cluster links
- */
- Set<Link> getClusterLinks(Topology topology, TopologyCluster cluster);
-
- /**
- * Returns the set of pre-computed shortest paths between src and dest.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @return set of shortest paths
- */
- Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst);
-
- /**
- * Computes and returns the set of shortest paths between src and dest.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param weight link weight function
- * @return set of shortest paths
- */
- Set<Path> getPaths(Topology topology, DeviceId src, DeviceId dst,
- LinkWeight weight);
-
- /**
- * Computes and returns the set of disjoint shortest path pairs
- * between src and dst.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param weight link weight function
- * @return set of shortest paths
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
- LinkWeight weight);
-
- /**
- * Computes and returns the set of disjoint shortest path pairs
- * between src and dst.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @return set of shortest paths
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst);
-
- /**
- * Computes and returns the set of SRLG disjoint shortest path pairs between source
- * and dst, given a mapping of edges to SRLG risk groups.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param weight link weight function
- * @param riskProfile map of edges to objects. Edges that map to the same object will
- * be treated as if they were in the same risk group.
- * @return set of shortest paths
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
- LinkWeight weight, Map<Link, Object> riskProfile);
-
- /**
- * Returns the set of pre-computed SRLG shortest paths between src and dest.
- *
- * @param topology topology descriptor
- * @param src source device
- * @param dst destination device
- * @param riskProfile map of edges to objects. Edges that map to the same object will
- * be treated as if they were in the same risk group.
- * @return set of shortest paths
- */
- Set<DisjointPath> getDisjointPaths(Topology topology, DeviceId src, DeviceId dst,
- Map<Link, Object> riskProfile);
-
-
- /**
- * Indicates whether the given connect point is part of the network fabric.
- *
- * @param topology topology descriptor
- * @param connectPoint connection point
- * @return true if infrastructure; false otherwise
- */
- boolean isInfrastructure(Topology topology, ConnectPoint connectPoint);
-
- /**
- * Indicates whether broadcast is allowed for traffic received on the
- * given connection point.
- *
- * @param topology topology descriptor
- * @param connectPoint connection point
- * @return true if broadcast allowed; false otherwise
- */
- boolean isBroadcastPoint(Topology topology, ConnectPoint connectPoint);
-
- /**
- * Generates a new topology snapshot from the specified description.
- *
- * @param providerId provider identification
- * @param graphDescription topology graph description
- * @param reasons list of events that triggered the update
- * @return topology update event or null if the description is old
- */
- TopologyEvent updateTopology(ProviderId providerId,
- GraphDescription graphDescription,
- List<Event> reasons);
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStoreDelegate.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStoreDelegate.java
deleted file mode 100644
index c425970b..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyStoreDelegate.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.topology;
-
-import org.onosproject.store.StoreDelegate;
-
-/**
- * Topology store delegate abstraction.
- */
-public interface TopologyStoreDelegate extends StoreDelegate<TopologyEvent> {
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyVertex.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyVertex.java
deleted file mode 100644
index 9f37dcb4..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/TopologyVertex.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.topology;
-
-import org.onlab.graph.Vertex;
-import org.onosproject.net.DeviceId;
-
-/**
- * Represents a vertex in the topology graph.
- */
-public interface TopologyVertex extends Vertex {
-
- /**
- * Returns the associated infrastructure device identification.
- *
- * @return device identifier
- */
- DeviceId deviceId();
-
-}
diff --git a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/package-info.java b/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/package-info.java
deleted file mode 100644
index 3cd6ceb8..00000000
--- a/framework/src/onos/core/api/src/main/java/org/onosproject/net/topology/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * Network topology model &amp; related services API definitions.
- */
-package org.onosproject.net.topology;