tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.topology; |
| 2 | |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 3 | import org.onlab.graph.Graph; |
| 4 | import org.onlab.graph.GraphPathSearch; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 5 | import org.onlab.onos.net.Description; |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 6 | import org.onlab.onos.net.DeviceId; |
| 7 | import org.onlab.onos.net.Link; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 8 | |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 9 | import java.util.Set; |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 10 | |
| 11 | /** |
| 12 | * Describes attribute(s) of a network topology. |
| 13 | */ |
| 14 | public interface TopologyDescription extends Description { |
| 15 | |
| 16 | /** |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 17 | * Returns the creation timestamp of the topology description. This is |
| 18 | * expressed in system nanos to allow proper sequencing. |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 19 | * |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 20 | * @return topology description creation timestamp |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 21 | */ |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 22 | long timestamp(); |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 23 | |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 24 | /** |
| 25 | * Returns the topology graph. |
| 26 | * |
| 27 | * @return network graph |
| 28 | */ |
| 29 | Graph<TopoVertex, TopoEdge> graph(); |
tom | edf06bb | 2014-08-27 16:22:15 -0700 | [diff] [blame] | 30 | |
tom | cfde062 | 2014-09-09 11:02:42 -0700 | [diff] [blame] | 31 | /** |
| 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); |
tom | edf06bb | 2014-08-27 16:22:15 -0700 | [diff] [blame] | 69 | |
tom | 0eb04ca | 2014-08-25 14:34:51 -0700 | [diff] [blame] | 70 | } |
tom | edf06bb | 2014-08-27 16:22:15 -0700 | [diff] [blame] | 71 | |