blob: 363a1948203eb3b1e53fa0d9d74844f90ef65789 [file] [log] [blame]
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08001package net.floodlightcontroller.topology.web;
2
3import org.restlet.Context;
4import org.restlet.routing.Router;
5
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08006import net.floodlightcontroller.restserver.RestletRoutable;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08007
8public class TopologyWebRoutable implements RestletRoutable {
9 /**
10 * Create the Restlet router and bind to the proper resources.
11 */
12 @Override
13 public Router getRestlet(Context context) {
14 Router router = new Router(context);
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080015 router.attach("/tunnellinks/json", TunnelLinksResource.class);
16 router.attach("/switchclusters/json", SwitchClustersResource.class);
17 router.attach("/broadcastdomainports/json", BroadcastDomainPortsResource.class);
18 router.attach("/enabledports/json", EnabledPortsResource.class);
19 router.attach("/blockedports/json", BlockedPortsResource.class);
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080020 return router;
21 }
22
23 /**
24 * Set the base path for the Topology
25 */
26 @Override
27 public String basePath() {
Naoki Shiota862cc3b2013-12-13 15:42:50 -080028 return "/wm/floodlight/topology";
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080029 }
30}