Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.devicemanager.web; |
| 2 | |
| 3 | import java.util.Iterator; |
| 4 | |
| 5 | import net.floodlightcontroller.core.INetMapTopologyObjects.IDeviceObject; |
| 6 | import net.onrc.onos.util.GraphDBConnection; |
| 7 | |
| 8 | import org.restlet.resource.Get; |
| 9 | import org.restlet.resource.ServerResource; |
| 10 | |
| 11 | public class TopoDevicesResource extends ServerResource { |
| 12 | |
| 13 | @Get("json") |
| 14 | public Iterator<IDeviceObject> retrieve() { |
| 15 | |
| 16 | GraphDBConnection conn = GraphDBConnection.getInstance(""); |
| 17 | |
| 18 | return conn.utils().getDevices(conn).iterator(); |
| 19 | |
| 20 | } |
| 21 | |
| 22 | } |