blob: 77dd72d08012e9d5aa77853d5c4ed3f0dc28dfff [file] [log] [blame]
Naoki Shiotab32edf52013-12-12 14:09:36 -08001package net.onrc.onos.registry.controller.web;
Umesh Krishnaswamyb56bb292013-02-12 20:28:27 -08002
Jonathan Hart3d7730a2013-02-22 11:51:17 -08003import net.floodlightcontroller.restserver.RestletRoutable;
4
Umesh Krishnaswamyb56bb292013-02-12 20:28:27 -08005import org.restlet.Context;
6import org.restlet.Restlet;
7import org.restlet.routing.Router;
8
Jonathan Hartd82f20d2013-02-21 18:04:24 -08009public class RegistryWebRoutable implements RestletRoutable {
Umesh Krishnaswamyb56bb292013-02-12 20:28:27 -080010
11 @Override
12 public Restlet getRestlet(Context context) {
13 Router router = new Router(context);
Jonathan Hart3d7730a2013-02-22 11:51:17 -080014 router.attach("/controllers/json", ControllerRegistryResource.class);
15 router.attach("/switches/json", SwitchRegistryResource.class);
Umesh Krishnaswamyb56bb292013-02-12 20:28:27 -080016 return router;
17 }
18
19 @Override
20 public String basePath() {
Naoki Shiota862cc3b2013-12-13 15:42:50 -080021 return "/wm/onos/registry";
Umesh Krishnaswamyb56bb292013-02-12 20:28:27 -080022 }
23
24}