blob: a18c550f13fa9b9c1d10cc9dace5466e92139a3a [file] [log] [blame]
pingping-lina2cbfad2013-03-07 08:39:21 +08001package net.floodlightcontroller.bgproute;
2
3import org.restlet.Context;
4import org.restlet.Restlet;
5import org.restlet.routing.Router;
6
7import net.floodlightcontroller.restserver.RestletRoutable;
8
9public class BgpRouteWebRoutable implements RestletRoutable {
10 @Override
11 public Restlet getRestlet(Context context) {
12 Router router = new Router(context);
13 router.attach("/json", BgpRouteResource.class);
14 router.attach("/rib/{dest}", BgpRouteResource.class);
pingping-line2a09ca2013-03-23 09:33:58 +080015 router.attach("/{routerid}/{prefix}/{mask}/{nexthop}", BgpRouteResource.class);
16 router.attach("/{routerid}/{prefix}/{mask}/{nexthop}/synch", BgpRouteResourceSynch.class);
pingping-lina2cbfad2013-03-07 08:39:21 +080017 router.attach("/{routerid}/{capability}", BgpRouteResource.class);
18 return router;
19 }
20
21 @Override
22 public String basePath() {
23 return "/wm/bgp";
24 }
25}