blob: 962dbbb159f63a6bb4dce4b84cdb3c9a2cf7b32f [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 Radoslavov5ab68512013-02-18 09:59:33 -080025 return router;
26 }
27
28 /**
29 * Set the base path for the Topology
30 */
31 @Override
32 public String basePath() {
33 return "/wm/flow";
34 }
35}