ONOS-745 Refactoring topology to compute only broadcast tree and not pre-compute paths.
ONOS-744 Refactoring graph search to allow requesting max number of paths.
Change-Id: I28467246b92df32ebb3155c45774ecc051fdd3dd
diff --git a/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java b/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java
index 9eadec1..aaf170f 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/DefaultTopologyCluster.java
@@ -15,8 +15,6 @@
*/
package org.onosproject.net.topology;
-import org.onosproject.net.DeviceId;
-
import java.util.Objects;
import static com.google.common.base.MoreObjects.toStringHelper;
@@ -29,7 +27,7 @@
private final ClusterId id;
private final int deviceCount;
private final int linkCount;
- private final DeviceId root;
+ private final TopologyVertex root;
/**
* Creates a new topology cluster descriptor with the specified attributes.
@@ -40,7 +38,7 @@
* @param root cluster root node
*/
public DefaultTopologyCluster(ClusterId id, int deviceCount, int linkCount,
- DeviceId root) {
+ TopologyVertex root) {
this.id = id;
this.deviceCount = deviceCount;
this.linkCount = linkCount;
@@ -63,7 +61,7 @@
}
@Override
- public DeviceId root() {
+ public TopologyVertex root() {
return root;
}
diff --git a/core/api/src/main/java/org/onosproject/net/topology/Topology.java b/core/api/src/main/java/org/onosproject/net/topology/Topology.java
index d64f0b6..df8d63c 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/Topology.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/Topology.java
@@ -61,13 +61,4 @@
*/
int linkCount();
- /**
- * Returns the number of infrastructure paths computed between devices
- * in the topology. This means the number of all the shortest paths
- * (hop-count) between all device pairs.
- *
- * @return number of paths
- */
- int pathCount();
-
}
diff --git a/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java b/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java
index fe93c91..fa19afc 100644
--- a/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java
+++ b/core/api/src/main/java/org/onosproject/net/topology/TopologyCluster.java
@@ -15,8 +15,6 @@
*/
package org.onosproject.net.topology;
-import org.onosproject.net.DeviceId;
-
/**
* Representation of an SCC (strongly-connected component) in a network topology.
*/
@@ -44,10 +42,10 @@
int linkCount();
/**
- * Returns the device identifier of the cluster root device.
+ * Returns the cluster root vertex.
*
- * @return cluster root device identifier
+ * @return cluster root vertex
*/
- DeviceId root();
+ TopologyVertex root();
}
diff --git a/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyClusterTest.java b/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyClusterTest.java
index 199b773..08b2555 100644
--- a/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyClusterTest.java
+++ b/core/api/src/test/java/org/onosproject/net/topology/DefaultTopologyClusterTest.java
@@ -43,11 +43,12 @@
assertEquals("incorrect id", clusterId(6), cluster.id());
assertEquals("incorrect id", 5, cluster.deviceCount());
assertEquals("incorrect id", 4, cluster.linkCount());
- assertEquals("incorrect id", deviceId("of:111"), cluster.root());
+ assertEquals("incorrect id", deviceId("of:111"), cluster.root().deviceId());
}
private TopologyCluster cluster(int id, int dc, int lc, String root) {
- return new DefaultTopologyCluster(clusterId(id), dc, lc, deviceId(root));
+ return new DefaultTopologyCluster(clusterId(id), dc, lc,
+ new DefaultTopologyVertex(deviceId(root)));
}
}