Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.networkgraph; |
| 2 | |
| 3 | import java.net.InetAddress; |
| 4 | |
| 5 | import net.floodlightcontroller.util.MACAddress; |
| 6 | |
| 7 | /** |
| 8 | * The northbound interface to the topology network graph. This interface |
| 9 | * is presented to the rest of ONOS. It is currently read-only, as we want |
| 10 | * only the discovery modules to be allowed to modify the topology. |
| 11 | * |
| 12 | */ |
| 13 | public interface NetworkGraph { |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 14 | public Switch getSwitch(Long dpid); |
| 15 | public Iterable<? extends Switch> getSwitches(); |
Yuta HIGUCHI | c6174df | 2014-02-10 20:44:38 -0800 | [diff] [blame] | 16 | |
| 17 | // TODO Not sure about the use-case of this method? Remove if not used at the end. |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 18 | public Iterable<? extends Link> getLinks(); |
Yuta HIGUCHI | c6174df | 2014-02-10 20:44:38 -0800 | [diff] [blame] | 19 | // XXX next 2 method can be removed. getSwitch(dpid).getOutgoingLinks() is equivalent |
Toshio Koide | 2f570c1 | 2014-02-06 16:55:32 -0800 | [diff] [blame] | 20 | public Iterable<? extends Link> getOutgoingLinksFromSwitch(Long dpid); // Toshi: unnecessary |
| 21 | public Iterable<? extends Link> getIncomingLinksFromSwitch(Long dpid); // Toshi: unnecessary |
Yuta HIGUCHI | c6174df | 2014-02-10 20:44:38 -0800 | [diff] [blame] | 22 | |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 23 | public Iterable<Device> getDeviceByIp(InetAddress ipAddress); |
Toshio Koide | 6c9b7e8 | 2014-02-07 18:01:32 -0800 | [diff] [blame] | 24 | public Device getDeviceByMac(MACAddress address); |
Jonathan Hart | 062a2e8 | 2014-02-03 09:41:57 -0800 | [diff] [blame] | 25 | } |