tom

Adding model abstractions to help flesh-out the concepts.

package org.onlab.onos.net;
/**
* Abstraction of a link between an end-station host and the network
* infrastructure.
*/
public interface HostLinks extends Link {
/**
* Returns the host identification.
*
* @return host identifier
*/
ElementId hostId();
/**
* Returns the connection point where the host attaches to the
* network infrastructure.
*
* @return host connection point
*/
ConnectPoint connectPoint();
}
......@@ -12,6 +12,6 @@ public interface HostLocation extends ConnectPoint {
*
* @return timestamp in milliseconds since start of epoch
*/
long timestamp();
long time();
}
......
......@@ -5,7 +5,8 @@ import org.onlab.onos.net.provider.Provided;
/**
* Abstraction of a network infrastructure link.
*/
public interface Link extends Provided { // TODO: Also should extend graph Edge once the graph module is checked in
public interface Link extends Provided {
// TODO: Consider extending graph Edge<Element> once the graph module is available
/**
* Coarse representation of the link type.
......
package org.onlab.onos.net;
import java.util.List;
/**
* Representation of a contiguous directed path in a network. Path comprises
* of a sequence of links, where adjacent links must share the same device,
* meaning that destination of the source of one link must coincide with the
* destination of the previous link.
*/
public interface Path extends Link {
/**
* Returns sequence of links comprising the path.
*
* @return list of links
*/
List<Link> links();
}
package org.onlab.onos.net;
/**
* Represents a network topology computation snapshot.
*/
public interface Topology {
/**
* Returns the time, specified in milliseconds since start of epoch,
* when the topology became active and made available.
*
* @return time in milliseconds since start of epoch
*/
long time();
/**
* 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();
/**
* 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();
}