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); |
pingping-lin | e2a09ca | 2013-03-23 09:33:58 +0800 | [diff] [blame] | 15 | router.attach("/{routerid}/{prefix}/{mask}/{nexthop}", BgpRouteResource.class); |
| 16 | router.attach("/{routerid}/{prefix}/{mask}/{nexthop}/synch", BgpRouteResourceSynch.class); |
pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame] | 17 | router.attach("/{routerid}/{capability}", BgpRouteResource.class); |
| 18 | return router; |
| 19 | } |
| 20 | |
| 21 | @Override |
| 22 | public String basePath() { |
| 23 | return "/wm/bgp"; |
| 24 | } |
| 25 | } |