pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame^] | 1 | package net.floodlightcontroller.bgproute; |
| 2 | |
| 3 | import org.restlet.Context; |
| 4 | import org.restlet.Restlet; |
| 5 | import org.restlet.routing.Router; |
| 6 | |
| 7 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 8 | |
| 9 | public 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); |
| 15 | router.attach("/{routerid}/{prefix}/{mask}/{nexthop}", BgpRouteResource.class); |
| 16 | router.attach("/{routerid}/{capability}", BgpRouteResource.class); |
| 17 | return router; |
| 18 | } |
| 19 | |
| 20 | @Override |
| 21 | public String basePath() { |
| 22 | return "/wm/bgp"; |
| 23 | } |
| 24 | } |