blob: 8a8a00828b0712f7801b240e0f0781056fdb37d6 [file] [log] [blame]
Fahad Naeem Khan5b558f22014-10-16 10:35:20 -07001package net.onrc.onos.apps.segmentrouting.web;
2
Srikanth Vavilapalli7ff259b2014-10-17 16:19:16 -07003import net.floodlightcontroller.restserver.RestletRoutable;
4
Fahad Naeem Khan5b558f22014-10-16 10:35:20 -07005import org.restlet.Context;
6import org.restlet.Restlet;
7import org.restlet.routing.Router;
Fahad Naeem Khan5b558f22014-10-16 10:35:20 -07008/**
9 * Handle all URI's for SegmentRouter web
10 *
11 */
12
13public class SegmentRoutingWebRoutable implements RestletRoutable {
14
15 @Override
16 public Restlet getRestlet(Context context) {
17 Router router = new Router(context);
Fahad Naeem Khan6ead4622014-10-16 12:33:29 -070018 //TODO: rewrite SwitchesResource for router specific info.
19 router.attach("/routers", RouterStatisticsResource.class);
20 router.attach("/router/{routerId}/{statsType}", RouterStatisticsResource.class);
Srikanth Vavilapalli7ff259b2014-10-17 16:19:16 -070021 router.attach("/tunnel", SegmentRouterTunnelResource.class);
22 // router.attach("/tunnel/{tunnelparams}",
23 // SegmentRouterTunnelResource.class);
Fahad Naeem Khan5b558f22014-10-16 10:35:20 -070024 return router;
25 }
26
27 @Override
28 public String basePath() {
29 return "/wm/onos/segmentrouting";
30 }
31
32}