Jonathan Hart | 382623d | 2014-04-03 09:48:11 -0700 | [diff] [blame] | 1 | package net.onrc.onos.apps.bgproute; |
pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame] | 2 | |
Jonathan Hart | a99ec67 | 2014-04-03 11:30:34 -0700 | [diff] [blame^] | 3 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 4 | |
pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame] | 5 | import org.restlet.Context; |
| 6 | import org.restlet.Restlet; |
| 7 | import org.restlet.routing.Router; |
| 8 | |
pingping-lin | a2cbfad | 2013-03-07 08:39:21 +0800 | [diff] [blame] | 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); |
Jonathan Hart | e4c9869 | 2013-10-18 17:40:03 -0700 | [diff] [blame] | 15 | router.attach("/{sysuptime}/{sequence}/{routerid}/{prefix}/{mask}/{nexthop}", BgpRouteResource.class); |
pingping-lin | e2a09ca | 2013-03-23 09:33:58 +0800 | [diff] [blame] | 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 | } |