HIGUCHI Yuta | efa5488 | 2013-06-12 13:13:02 -0700 | [diff] [blame^] | 1 | package net.onrc.onos.ofcontroller.flowcache.web; |
Pavlin Radoslavov | 5ab6851 | 2013-02-18 09:59:33 -0800 | [diff] [blame] | 2 | |
| 3 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 4 | |
| 5 | import org.restlet.Context; |
| 6 | import org.restlet.Restlet; |
| 7 | import org.restlet.routing.Router; |
| 8 | |
| 9 | public class FlowWebRoutable implements RestletRoutable { |
| 10 | /** |
| 11 | * Create the Restlet router and bind to the proper resources. |
| 12 | */ |
| 13 | @Override |
| 14 | public Restlet getRestlet(Context context) { |
| 15 | Router router = new Router(context); |
Pavlin Radoslavov | 0e0525e | 2013-03-04 15:49:11 -0800 | [diff] [blame] | 16 | router.attach("/add/json", AddFlowResource.class); |
Pavlin Radoslavov | b9fe6b4 | 2013-03-27 16:25:05 -0700 | [diff] [blame] | 17 | router.attach("/add-shortest-path/json", AddShortestPathFlowResource.class); |
Pavlin Radoslavov | 916832f | 2013-03-14 17:48:41 -0700 | [diff] [blame] | 18 | router.attach("/clear/{flow-id}/json", ClearFlowResource.class); |
Pavlin Radoslavov | 5ab6851 | 2013-02-18 09:59:33 -0800 | [diff] [blame] | 19 | router.attach("/delete/{flow-id}/json", DeleteFlowResource.class); |
| 20 | router.attach("/get/{flow-id}/json", GetFlowByIdResource.class); |
Pavlin Radoslavov | 706df05 | 2013-03-06 10:49:07 -0800 | [diff] [blame] | 21 | router.attach("/getall-by-installer-id/{installer-id}/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", GetAllFlowsByInstallerIdResource.class); |
| 22 | router.attach("/getall-by-endpoints/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", GetAllFlowsByEndpointsResource.class); |
Pavlin Radoslavov | 5ab6851 | 2013-02-18 09:59:33 -0800 | [diff] [blame] | 23 | router.attach("/getall/json", GetAllFlowsResource.class); |
Umesh Krishnaswamy | 57a32a9 | 2013-03-21 14:21:15 -0700 | [diff] [blame] | 24 | router.attach("/getsummary/{flow-id}/{max-flows}/json", GetSummaryFlowsResource.class); |
Pavlin Radoslavov | 4ef543e | 2013-05-07 13:36:57 -0700 | [diff] [blame] | 25 | router.attach("/measurement-store-path/json", MeasurementStorePathFlowResource.class); |
| 26 | router.attach("/measurement-install-paths/{num-threads}/json", MeasurementInstallPathsFlowResource.class); |
| 27 | router.attach("/measurement-get-install-paths-time-nsec/json", MeasurementGetInstallPathsTimeNsecFlowResource.class); |
Pavlin Radoslavov | f5d8041 | 2013-05-24 05:14:07 +0000 | [diff] [blame] | 28 | router.attach("/measurement-get-per-flow-install-time/json", MeasurementGetPerFlowInstallTimeFlowResource.class); |
Pavlin Radoslavov | 4ef543e | 2013-05-07 13:36:57 -0700 | [diff] [blame] | 29 | router.attach("/measurement-clear-all-paths/json", MeasurementClearAllPathsFlowResource.class); |
Pavlin Radoslavov | 5ab6851 | 2013-02-18 09:59:33 -0800 | [diff] [blame] | 30 | return router; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Set the base path for the Topology |
| 35 | */ |
| 36 | @Override |
| 37 | public String basePath() { |
| 38 | return "/wm/flow"; |
| 39 | } |
| 40 | } |