blob: 3cd6979e8e0224492ef0e76a7d0be5e3df47eb83 [file] [log] [blame]
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -07001package net.onrc.onos.core.topology;
2
3import java.util.Collection;
4
5import net.floodlightcontroller.util.MACAddress;
6import net.onrc.onos.core.util.Dpid;
7import net.onrc.onos.core.util.LinkTuple;
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -07008import net.onrc.onos.core.util.PortNumber;
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -07009import net.onrc.onos.core.util.SwitchPort;
10
11/**
12 * Interface to reference internal self-contained elements.
13 */
Yuta HIGUCHIab9dc7b2014-08-26 22:53:13 -070014public interface BaseInternalTopology extends BaseMastership {
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070015
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070016 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070017 * Gets a SwitchData.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070018 *
19 * @param dpid Switch DPID
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070020 * @return the SwitchData for the Switch DPID if found, otherwise null
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070021 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070022 public SwitchData getSwitchData(Dpid dpid);
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070023
24 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070025 * Gets all SwitchData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070026 *
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070027 * @return all SwitchData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070028 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070029 public Collection<SwitchData> getAllSwitchDataEntries();
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070030
31 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070032 * Gets a PortData.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070033 *
34 * @param port Port identifier
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070035 * @return the PortData for the Port identifier if found, otherwise null
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070036 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070037 public PortData getPortData(SwitchPort port);
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070038
39 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070040 * Gets a PortData.
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070041 *
42 * @param dpid Switch DPID
43 * @param portNumber Port number
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070044 * @return the PortData for the (Dpid, PortNumber) if found, otherwise null
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070045 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070046 public PortData getPortData(Dpid dpid, PortNumber portNumber);
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070047
48 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070049 * Gets all PortData entries on a switch.
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070050 *
51 * @param dpid Switch DPID
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070052 * @return all PortData entries on a switch.
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070053 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070054 public Collection<PortData> getPortDataEntries(Dpid dpid);
Yuta HIGUCHI45ccade2014-08-18 17:09:19 -070055
56 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070057 * Gets all PortData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070058 *
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070059 * @return all PortData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070060 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070061 public Collection<PortData> getAllPortDataEntries();
Pavlin Radoslavov054cd592014-08-07 20:57:16 -070062
63 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070064 * Gets a LinkData.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070065 *
66 * @param linkId Link identifier
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070067 * @return the LinkData for the Link identifier if found, otherwise null
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070068 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070069 public LinkData getLinkData(LinkTuple linkId);
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070070
71 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070072 * Gets a LinkData.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070073 *
74 * @param linkId Link identifier
75 * @param type type
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070076 * @return the LinkData for the Link identifier and type if found,
77 * otherwise null
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070078 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070079 public LinkData getLinkData(final LinkTuple linkId, final String type);
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070080
81 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070082 * Gets all LinkData entries departing from a specified port.
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070083 *
84 * @param srcPort source port identifier
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070085 * @return Collection of LinkData entries
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070086 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070087 public Collection<LinkData> getLinkDataEntriesFrom(final SwitchPort srcPort);
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070088
89 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070090 * Gets all LinkData entries pointing toward a specified port.
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070091 *
92 * @param dstPort destination port identifier
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070093 * @return Collection of LinkData entries
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070094 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070095 public Collection<LinkData> getLinkDataEntriesTo(final SwitchPort dstPort);
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -070096
97 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -070098 * Gets a collection of LinkData entries.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -070099 *
100 * @param linkId Link identifier
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700101 * @return Collection of LinkData entries.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700102 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700103 public Collection<LinkData> getLinkDataEntries(LinkTuple linkId);
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700104
105 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700106 * Gets all LinkData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700107 *
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700108 * @return all LinkData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700109 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700110 public Collection<LinkData> getAllLinkDataEntries();
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700111
112 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700113 * Gets a HostData.
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700114 *
115 * @param mac MACAddress of the host
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700116 * @return the HostData for the MACAddress if found, otherwise null
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700117 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700118 public HostData getHostData(MACAddress mac);
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700119
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700120 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700121 * Gets all HostData entries attached to a specified port.
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -0700122 *
123 * @param port attachment point identifier
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700124 * @return Collection of HostData entries.
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -0700125 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700126 public Collection<HostData> getHostDataEntries(SwitchPort port);
Yuta HIGUCHI9e6223d2014-08-26 00:01:32 -0700127
128 /**
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700129 * Gets all HostData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700130 *
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700131 * @return all HostData entries.
Pavlin Radoslavov054cd592014-08-07 20:57:16 -0700132 */
Yuta HIGUCHI93d35ea2014-08-31 23:26:13 -0700133 public Collection<HostData> getAllHostDataEntries();
Yuta HIGUCHI8b389a72014-07-18 13:50:00 -0700134}