blob: 1e7bd08f1f22d349543cb4de866c8bd9bb59fdec [file] [log] [blame]
Jonathan Hart8f6dc092014-04-18 15:56:43 -07001package net.onrc.onos.apps.sdnip;
pingping-lina2cbfad2013-03-07 08:39:21 +08002
3import net.floodlightcontroller.core.module.IFloodlightService;
4
Jonathan Hartf6978ce2014-06-23 11:20:04 -07005import com.googlecode.concurrenttrees.radix.RadixTree;
6
Jonathan Hart31e15f12014-04-10 10:33:00 -07007/**
8 * The API exported by the main SDN-IP class. This is the interface between the
9 * REST handlers and the SDN-IP module.
10 */
Jonathan Hart8f6dc092014-04-18 15:56:43 -070011public interface ISdnIpService extends IFloodlightService {
pingping-lina2cbfad2013-03-07 08:39:21 +080012
Jonathan Hart31e15f12014-04-10 10:33:00 -070013 /**
Jonathan Hartf6978ce2014-06-23 11:20:04 -070014 * Gets a reference to SDN-IP's radix tree which stores the route table
15 * learnt through BGP.
Jonathan Hart31e15f12014-04-10 10:33:00 -070016 *
17 * XXX This is a poor API because it exposes internal state of SDN-IP.
18 *
Jonathan Hartf6978ce2014-06-23 11:20:04 -070019 * @return the radix tree
Jonathan Hart31e15f12014-04-10 10:33:00 -070020 */
Jonathan Hartf6978ce2014-06-23 11:20:04 -070021 public RadixTree<RibEntry> getPtree();
Jonathan Hart61ba9372013-05-19 20:10:29 -070022
Jonathan Hart31e15f12014-04-10 10:33:00 -070023 /**
24 * Gets the IP address of REST server on the BGPd side. This is used to
25 * communicate with BGPd.
26 *
27 * @return the IP address as a String
28 */
29 public String getBgpdRestIp();
Jonathan Hart61ba9372013-05-19 20:10:29 -070030
Jonathan Hart31e15f12014-04-10 10:33:00 -070031 /**
32 * Gets the router ID, which is sent to BGPd to identify the route table
33 * we're interested in.
34 *
35 * @return the router ID as a String
36 */
Ray Milkey269ffb92014-04-03 14:43:30 -070037 public String getRouterId();
Jonathan Hart61ba9372013-05-19 20:10:29 -070038
Jonathan Hart31e15f12014-04-10 10:33:00 -070039 /**
40 * Clears SDN-IP's route table.
41 */
Ray Milkey269ffb92014-04-03 14:43:30 -070042 public void clearPtree();
43
44 /**
Jonathan Hart8f6dc092014-04-18 15:56:43 -070045 * Pass a RIB update to the {@link ISdnIpService}.
Ray Milkey269ffb92014-04-03 14:43:30 -070046 *
Jonathan Hart31e15f12014-04-10 10:33:00 -070047 * @param update a {@link RibUpdate} object containing details of the
48 * update
Ray Milkey269ffb92014-04-03 14:43:30 -070049 */
50 public void newRibUpdate(RibUpdate update);
Komal Shah399a2922014-05-28 01:57:40 -070051
52 /**
53 * Start SDN-IP Routing.
54 */
pingping-lin1ada7ce2014-08-14 13:45:22 -070055 public void beginRouting();
56
pingping-linaea385b2014-09-04 18:15:19 -070057 /**
58 * Start SDN-IP Routing.
59 * Before intent framework is ready, we need two methods to start the
60 * application.
61 */
62 public void beginRoutingWithNewIntent();
63
pingping-lina2cbfad2013-03-07 08:39:21 +080064}