blob: fd9a319c65f3d016574053233d5f70cd93e275f9 [file] [log] [blame]
Pavlin Radoslavov5ab68512013-02-18 09:59:33 -08001package net.floodlightcontroller.flowcache.web;
2
3import net.floodlightcontroller.restserver.RestletRoutable;
4
5import org.restlet.Context;
6import org.restlet.Restlet;
7import org.restlet.routing.Router;
8
9public 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 Radoslavov0e0525e2013-03-04 15:49:11 -080016 router.attach("/add/json", AddFlowResource.class);
Pavlin Radoslavovb9fe6b42013-03-27 16:25:05 -070017 router.attach("/add-shortest-path/json", AddShortestPathFlowResource.class);
Pavlin Radoslavov916832f2013-03-14 17:48:41 -070018 router.attach("/clear/{flow-id}/json", ClearFlowResource.class);
Pavlin Radoslavov5ab68512013-02-18 09:59:33 -080019 router.attach("/delete/{flow-id}/json", DeleteFlowResource.class);
20 router.attach("/get/{flow-id}/json", GetFlowByIdResource.class);
Pavlin Radoslavov706df052013-03-06 10:49:07 -080021 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 Radoslavov5ab68512013-02-18 09:59:33 -080023 router.attach("/getall/json", GetAllFlowsResource.class);
Umesh Krishnaswamy57a32a92013-03-21 14:21:15 -070024 router.attach("/getsummary/{flow-id}/{max-flows}/json", GetSummaryFlowsResource.class);
Pavlin Radoslavov4ef543e2013-05-07 13:36:57 -070025 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 Radoslavovf5d80412013-05-24 05:14:07 +000028 router.attach("/measurement-get-per-flow-install-time/json", MeasurementGetPerFlowInstallTimeFlowResource.class);
Pavlin Radoslavov4ef543e2013-05-07 13:36:57 -070029 router.attach("/measurement-clear-all-paths/json", MeasurementClearAllPathsFlowResource.class);
Pavlin Radoslavov5ab68512013-02-18 09:59:33 -080030 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}