package net.floodlightcontroller.devicemanager.web;

import java.util.Iterator;

import net.floodlightcontroller.core.INetMapTopologyObjects.IDeviceObject;
import net.onrc.onos.util.GraphDBConnection;

import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;

public class TopoDevicesResource extends ServerResource {
	
	@Get("json")
	public Iterator<IDeviceObject> retrieve() {
		
		GraphDBConnection conn = GraphDBConnection.getInstance("");
		
		return conn.utils().getDevices(conn).iterator();
		
	}
	
}

@@ -193,16 +193,60 @@
 nection;
+%0Aimport net.onrc.onos.util.GraphDBOperation;
 %0A%0Aimport
@@ -507,30 +507,72 @@
 ;%0A%09%09
-%0A%09%09return conn.utils()
+GraphDBOperation op = new GraphDBOperation(conn);%0A%09%09%0A%09%09return op
 .get
@@ -579,20 +579,16 @@
 Devices(
-conn
 ).iterat

refactor TopoDevicesResource class to use GraphDBOperation class.