Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.topology.web; |
| 2 | |
| 3 | import java.util.Set; |
| 4 | |
| 5 | import net.floodlightcontroller.topology.ITopologyService; |
| 6 | import net.floodlightcontroller.topology.NodePortTuple; |
| 7 | |
| 8 | import org.restlet.resource.Get; |
| 9 | import org.restlet.resource.ServerResource; |
| 10 | |
| 11 | public class TunnelLinksResource extends ServerResource { |
| 12 | @Get("json") |
| 13 | public Set<NodePortTuple> retrieve() { |
| 14 | ITopologyService topology = |
| 15 | (ITopologyService)getContext().getAttributes(). |
| 16 | get(ITopologyService.class.getCanonicalName()); |
| 17 | |
| 18 | return topology.getTunnelPorts(); |
| 19 | } |
| 20 | } |