tom

Adding model abstractions to help flesh-out the concepts.

1 +package org.onlab.onos.net;
2 +
3 +/**
4 + * Abstraction of a link between an end-station host and the network
5 + * infrastructure.
6 + */
7 +public interface HostLinks extends Link {
8 +
9 + /**
10 + * Returns the host identification.
11 + *
12 + * @return host identifier
13 + */
14 + ElementId hostId();
15 +
16 + /**
17 + * Returns the connection point where the host attaches to the
18 + * network infrastructure.
19 + *
20 + * @return host connection point
21 + */
22 + ConnectPoint connectPoint();
23 +
24 +}
...@@ -12,6 +12,6 @@ public interface HostLocation extends ConnectPoint { ...@@ -12,6 +12,6 @@ public interface HostLocation extends ConnectPoint {
12 * 12 *
13 * @return timestamp in milliseconds since start of epoch 13 * @return timestamp in milliseconds since start of epoch
14 */ 14 */
15 - long timestamp(); 15 + long time();
16 16
17 } 17 }
......
...@@ -5,7 +5,8 @@ import org.onlab.onos.net.provider.Provided; ...@@ -5,7 +5,8 @@ import org.onlab.onos.net.provider.Provided;
5 /** 5 /**
6 * Abstraction of a network infrastructure link. 6 * Abstraction of a network infrastructure link.
7 */ 7 */
8 -public interface Link extends Provided { // TODO: Also should extend graph Edge once the graph module is checked in 8 +public interface Link extends Provided {
9 +// TODO: Consider extending graph Edge<Element> once the graph module is available
9 10
10 /** 11 /**
11 * Coarse representation of the link type. 12 * Coarse representation of the link type.
......
1 +package org.onlab.onos.net;
2 +
3 +import java.util.List;
4 +
5 +/**
6 + * Representation of a contiguous directed path in a network. Path comprises
7 + * of a sequence of links, where adjacent links must share the same device,
8 + * meaning that destination of the source of one link must coincide with the
9 + * destination of the previous link.
10 + */
11 +public interface Path extends Link {
12 +
13 + /**
14 + * Returns sequence of links comprising the path.
15 + *
16 + * @return list of links
17 + */
18 + List<Link> links();
19 +
20 +}
1 +package org.onlab.onos.net;
2 +
3 +/**
4 + * Represents a network topology computation snapshot.
5 + */
6 +public interface Topology {
7 +
8 + /**
9 + * Returns the time, specified in milliseconds since start of epoch,
10 + * when the topology became active and made available.
11 + *
12 + * @return time in milliseconds since start of epoch
13 + */
14 + long time();
15 +
16 + /**
17 + * Returns the number of SCCs (strongly connected components) in the
18 + * topology.
19 + *
20 + * @return number of clusters
21 + */
22 + int clusterCount();
23 +
24 + /**
25 + * Returns the number of infrastructure devices in the topology.
26 + *
27 + * @return number of devices
28 + */
29 + int deviceCount();
30 +
31 +
32 + /**
33 + * Returns the number of infrastructure links in the topology.
34 + *
35 + * @return number of links
36 + */
37 + int linkCount();
38 +
39 + /**
40 + * Returns the number of infrastructure paths computed between devices
41 + * in the topology. This means the number of all the shortest paths
42 + * (hop-count) between all device pairs.
43 + *
44 + * @return number of paths
45 + */
46 + int pathCount();
47 +
48 +}