blob: eff595244f0c6f19f3a5dbde033e15028b8820c9 [file] [log] [blame]
Jonathan Hart062a2e82014-02-03 09:41:57 -08001package net.onrc.onos.ofcontroller.networkgraph;
2
3import java.net.InetAddress;
4
5import 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 */
13public interface NetworkGraph {
Toshio Koide2f570c12014-02-06 16:55:32 -080014 public Switch getSwitch(Long dpid);
Jonathan Hart369875b2014-02-13 10:00:31 -080015 public Iterable<Switch> getSwitches();
Yuta HIGUCHIc6174df2014-02-10 20:44:38 -080016
17 // TODO Not sure about the use-case of this method? Remove if not used at the end.
Jonathan Hart369875b2014-02-13 10:00:31 -080018 public Iterable<Link> getLinks();
Yuta HIGUCHIc6174df2014-02-10 20:44:38 -080019 // XXX next 2 method can be removed. getSwitch(dpid).getOutgoingLinks() is equivalent
Jonathan Hart369875b2014-02-13 10:00:31 -080020 public Iterable<Link> getOutgoingLinksFromSwitch(Long dpid); // Toshi: unnecessary
21 public Iterable<Link> getIncomingLinksFromSwitch(Long dpid); // Toshi: unnecessary
Yuta HIGUCHIc6174df2014-02-10 20:44:38 -080022
Jonathan Hart062a2e82014-02-03 09:41:57 -080023 public Iterable<Device> getDeviceByIp(InetAddress ipAddress);
Toshio Koide6c9b7e82014-02-07 18:01:32 -080024 public Device getDeviceByMac(MACAddress address);
Jonathan Hart062a2e82014-02-03 09:41:57 -080025}