blob: 79894137ac496ae1bfd37e93d72538a98d26ef74 [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
6import net.floodlightcontroller.linkdiscovery.web.LinksResource;
7import net.floodlightcontroller.restserver.RestletRoutable;
8
9public class TopologyWebRoutable implements RestletRoutable {
10 /**
11 * Create the Restlet router and bind to the proper resources.
12 */
13 @Override
14 public Router getRestlet(Context context) {
15 Router router = new Router(context);
16 router.attach("/links/json", LinksResource.class);
17 router.attach("/tunnellinks/json", TunnelLinksResource.class);
18 router.attach("/switchclusters/json", SwitchClustersResource.class);
19 router.attach("/broadcastdomainports/json", BroadcastDomainPortsResource.class);
20 router.attach("/enabledports/json", EnabledPortsResource.class);
21 router.attach("/blockedports/json", BlockedPortsResource.class);
22 router.attach("/route/{src-dpid}/{src-port}/{dst-dpid}/{dst-port}/json", RouteResource.class);
23 return router;
24 }
25
26 /**
27 * Set the base path for the Topology
28 */
29 @Override
30 public String basePath() {
31 return "/wm/topology";
32 }
33}