Jonathan Hart | 4701671 | 2014-02-07 12:41:35 -0800 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.networkgraph.web; |
| 2 | |
| 3 | import org.restlet.Context; |
| 4 | import org.restlet.Restlet; |
| 5 | import org.restlet.routing.Router; |
| 6 | |
| 7 | import net.floodlightcontroller.restserver.RestletRoutable; |
| 8 | |
| 9 | public class NetworkGraphWebRoutable implements RestletRoutable { |
| 10 | |
| 11 | @Override |
| 12 | public Restlet getRestlet(Context context) { |
| 13 | Router router = new Router(context); |
Jonathan Hart | 891d050 | 2014-02-10 10:04:08 -0800 | [diff] [blame] | 14 | router.attach("/rc/switches/json", RamcloudSwitchesResource.class); |
| 15 | router.attach("/rc/links/json", RamcloudLinksResource.class); |
| 16 | router.attach("/ng/switches/json", NetworkGraphSwitchesResource.class); |
| 17 | router.attach("/ng/links/json", NetworkGraphLinksResource.class); |
Jonathan Hart | 4701671 | 2014-02-07 12:41:35 -0800 | [diff] [blame] | 18 | return router; |
| 19 | } |
| 20 | |
| 21 | @Override |
| 22 | public String basePath() { |
| 23 | // TODO Auto-generated method stub |
Jonathan Hart | 891d050 | 2014-02-10 10:04:08 -0800 | [diff] [blame] | 24 | return "/wm/onos"; |
Jonathan Hart | 4701671 | 2014-02-07 12:41:35 -0800 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | } |