Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.linkdiscovery.web; |
| 2 | |
| 3 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 4 | |
| 5 | import org.restlet.Context; |
| 6 | import org.restlet.routing.Router; |
| 7 | |
| 8 | public class LinkDiscoveryWebRoutable 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); |
| 15 | router.attach("/autoportfast/{state}/json", AutoPortFast.class); // enable/true or disable/false |
| 16 | return router; |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * Set the base path for the Topology |
| 21 | */ |
| 22 | @Override |
| 23 | public String basePath() { |
| 24 | return "/wm/linkdiscovery"; |
| 25 | } |
| 26 | } |