Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.firewall; |
| 2 | |
| 3 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 4 | import org.restlet.Context; |
| 5 | import org.restlet.routing.Router; |
| 6 | |
| 7 | public class FirewallWebRoutable implements RestletRoutable { |
| 8 | /** |
| 9 | * Create the Restlet router and bind to the proper resources. |
| 10 | */ |
| 11 | @Override |
| 12 | public Router getRestlet(Context context) { |
| 13 | Router router = new Router(context); |
| 14 | router.attach("/module/{op}/json", FirewallResource.class); |
| 15 | router.attach("/rules/json", FirewallRulesResource.class); |
| 16 | return router; |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * Set the base path for the Firewall |
| 21 | */ |
| 22 | @Override |
| 23 | public String basePath() { |
| 24 | return "/wm/firewall"; |
| 25 | } |
| 26 | } |