blob: 28399c8ce240f26123b8b20fe193db8aad854d14 [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);
return router;
}
/**
* Set the base path for the Topology
*/
@Override
public String basePath() {
return "/wm/onos/datagrid";
}
}