blob: 4350ba656298fc02603328d0069c721cbbda44ee [file] [log] [blame]
HIGUCHI Yutaa56fbde2013-06-17 14:26:05 -07001package net.onrc.onos.ofcontroller.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 /**
21 * Set the base path for the Topology
22 */
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 }
27}