blob: dd0102d1cfbb64f58d7d39be48898f7fb9ebb6bf [file] [log] [blame]
tom0eb04ca2014-08-25 14:34:51 -07001package org.onlab.onos.net.topology;
2
tomcfde0622014-09-09 11:02:42 -07003import org.onlab.graph.Graph;
4import org.onlab.graph.GraphPathSearch;
tom0eb04ca2014-08-25 14:34:51 -07005import org.onlab.onos.net.Description;
tomcfde0622014-09-09 11:02:42 -07006import org.onlab.onos.net.DeviceId;
7import org.onlab.onos.net.Link;
tom0eb04ca2014-08-25 14:34:51 -07008
tomcfde0622014-09-09 11:02:42 -07009import java.util.Set;
tom0eb04ca2014-08-25 14:34:51 -070010
11/**
12 * Describes attribute(s) of a network topology.
13 */
14public interface TopologyDescription extends Description {
15
16 /**
tomcfde0622014-09-09 11:02:42 -070017 * Returns the creation timestamp of the topology description. This is
18 * expressed in system nanos to allow proper sequencing.
tom0eb04ca2014-08-25 14:34:51 -070019 *
tomcfde0622014-09-09 11:02:42 -070020 * @return topology description creation timestamp
tom0eb04ca2014-08-25 14:34:51 -070021 */
tomcfde0622014-09-09 11:02:42 -070022 long timestamp();
tom0eb04ca2014-08-25 14:34:51 -070023
tomcfde0622014-09-09 11:02:42 -070024 /**
25 * Returns the topology graph.
26 *
27 * @return network graph
28 */
29 Graph<TopoVertex, TopoEdge> graph();
tomedf06bb2014-08-27 16:22:15 -070030
tomcfde0622014-09-09 11:02:42 -070031 /**
32 * Returns the results of the path search through the network graph. This
33 * is assumed to contain results of seach fro the given device to all
34 * other devices.
35 *
36 * @param srcDeviceId source device identifier
37 * @return path search result for the given source node
38 */
39 GraphPathSearch.Result pathResults(DeviceId srcDeviceId);
40
41 /**
42 * Returns the set of topology SCC clusters.
43 *
44 * @return set of SCC clusters
45 */
46 Set<TopologyCluster> clusters();
47
48 /**
49 * Returns the set of devices contained by the specified topology cluster.
50 *
51 * @return set of devices that belong to the specified cluster
52 */
53 Set<DeviceId> clusterDevices(TopologyCluster cluster);
54
55 /**
56 * Returns the set of infrastructure links contained by the specified cluster.
57 *
58 * @return set of links that form the given cluster
59 */
60 Set<Link> clusterLinks(TopologyCluster cluster);
61
62 /**
63 * Returns the topology SCC cluster which contains the given device.
64 *
65 * @param deviceId device identifier
66 * @return topology cluster that contains the specified device
67 */
68 TopologyCluster clusterFor(DeviceId deviceId);
tomedf06bb2014-08-27 16:22:15 -070069
tom0eb04ca2014-08-25 14:34:51 -070070}
tomedf06bb2014-08-27 16:22:15 -070071