Naoki Shiota | 862cc3b | 2013-12-13 15:42:50 -0800 | [diff] [blame] | 1 | package net.onrc.onos.graph.web; |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 2 | |
| 3 | import java.util.Iterator; |
| 4 | |
Pankaj Berde | 38646d6 | 2013-06-21 11:34:04 -0700 | [diff] [blame] | 5 | import net.onrc.onos.graph.GraphDBOperation; |
HIGUCHI Yuta | 2051490 | 2013-06-12 11:24:16 -0700 | [diff] [blame] | 6 | import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IDeviceObject; |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 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() { |
Toshio Koide | bfe9b92 | 2013-06-18 10:56:05 -0700 | [diff] [blame] | 15 | GraphDBOperation op = new GraphDBOperation(""); |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 16 | |
Toshio Koide | a778d8d | 2013-06-13 13:41:16 -0700 | [diff] [blame] | 17 | return op.getDevices().iterator(); |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 18 | } |
Pankaj Berde | ac1a8c3 | 2013-02-26 17:45:57 -0800 | [diff] [blame] | 19 | } |