Naoki Shiota | 2a35b44 | 2013-11-26 19:17:38 -0800 | [diff] [blame^] | 1 | package net.onrc.onos.ofcontroller.flowprogrammer.web; |
| 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 FlowProgrammerWebRoutable implements RestletRoutable { |
| 10 | |
| 11 | @Override |
| 12 | public Restlet getRestlet(Context context) { |
| 13 | Router router = new Router(context); |
| 14 | router.attach("/setrate/{dpid}/{rate}/json", SetPushRateResource.class); |
| 15 | router.attach("/suspend/{dpid}/json", SuspendPusherResource.class); |
| 16 | router.attach("/resume/{dpid}/json", ResumePusherResource.class); |
| 17 | router.attach("/barrier/{dpid}/json", SendBarrierResource.class); |
| 18 | return router; |
| 19 | } |
| 20 | |
| 21 | @Override |
| 22 | public String basePath() { |
| 23 | return "/wm/fprog"; |
| 24 | } |
| 25 | |
| 26 | } |