blob: a8c3f5bba0d944496f72128915bb83bc835c8266 [file] [log] [blame]
package net.onrc.onos.datagrid.web;
import net.floodlightcontroller.restserver.RestletRoutable;
import org.restlet.Context;
import org.restlet.Restlet;
import org.restlet.routing.Router;
/**
* REST API implementation for the Datagrid.
*/
public class DatagridWebRoutable implements RestletRoutable {
/**
* Create the Restlet router and bind to the proper resources.
*/
@Override
public Restlet getRestlet(Context context) {
Router router = new Router(context);
router.attach("/get/map/{map-name}/json", GetMapResource.class);
router.attach("/add/intents/json", IntentResource.class);
router.attach("/get/intents/json", IntentResource.class);
router.attach("/get/intent/{intent_id}/json", IntentResource.class);
router.attach("/get/ng-events/json", GetNGEventsResource.class);
return router;
}
/**
* Set the base path for the Topology
*/
@Override
public String basePath() {
return "/wm/onos/datagrid";
}
}