blob: 39ecbfae82a6396cea92f13cdcf81273c44b7c81 [file] [log] [blame]
Jonathan Hart23701d12014-04-03 10:45:48 -07001package net.onrc.onos.core.linkdiscovery.web;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08002
3import net.floodlightcontroller.restserver.RestletRoutable;
4
5import org.restlet.Context;
6import org.restlet.routing.Router;
7
8public class LinkDiscoveryWebRoutable implements RestletRoutable {
9 /**
10 * Create the Restlet router and bind to the proper resources.
11 */
12 @Override
13 public Router getRestlet(Context context) {
14 Router router = new Router(context);
Naoki Shiota862cc3b2013-12-13 15:42:50 -080015 router.attach("/links/json", LinksResource.class);
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080016 router.attach("/autoportfast/{state}/json", AutoPortFast.class); // enable/true or disable/false
17 return router;
18 }
19
20 /**
Ray Milkeyb41100a2014-04-10 10:42:15 -070021 * Set the base path for the Topology.
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080022 */
23 @Override
24 public String basePath() {
Naoki Shiota862cc3b2013-12-13 15:42:50 -080025 return "/wm/onos/linkdiscovery";
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080026 }
Ray Milkey0f913a02014-04-07 20:58:17 -070027}