Merge branch 'RAMCloud' of https://github.com/yoshitomo0912/ONOS into RAMCloud
diff --git a/pom.xml b/pom.xml
index 7652dea..3cd33e9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -255,7 +255,7 @@
     <dependency>
       <groupId>com.tinkerpop.blueprints</groupId>
       <artifactId>blueprints-core</artifactId>
-      <version>2.3.0</version>
+      <version>2.4.0</version>
     </dependency>
     -->
     <dependency>
diff --git a/src/main/java/net/onrc/onos/graph/GraphDBManager.java b/src/main/java/net/onrc/onos/graph/GraphDBManager.java
index 0709cc4..ec7eb7f 100644
--- a/src/main/java/net/onrc/onos/graph/GraphDBManager.java
+++ b/src/main/java/net/onrc/onos/graph/GraphDBManager.java
@@ -25,15 +25,13 @@
     }
 
     public static DBOperation getDBOperation(final String dbStore, final String dbConfigFile) {
-        if (operation == null) {
-	    if (dbStore.equals("ramcloud")) {
-		operation = new RamCloudDBOperation();
-	    } else if (dbStore.equals("titan")) {
-		operation = new TitanDBOperation();
-	    }
-	    if (operation != null) {
-		operation.conn = GraphDBManager.getConnection(dbStore, dbConfigFile);
-	    }
+	if (dbStore.equals("ramcloud")) {
+	    operation = new RamCloudDBOperation();
+	} else if (dbStore.equals("titan")) {
+	    operation = new TitanDBOperation();
+	}
+	if (operation != null) {
+	    operation.conn = GraphDBManager.getConnection(dbStore, dbConfigFile);
 	}
         return operation;
     }
diff --git a/src/main/java/net/onrc/onos/graph/RamCloudDBConnection.java b/src/main/java/net/onrc/onos/graph/RamCloudDBConnection.java
index 9f3b9a0..c53e66e 100644
--- a/src/main/java/net/onrc/onos/graph/RamCloudDBConnection.java
+++ b/src/main/java/net/onrc/onos/graph/RamCloudDBConnection.java
@@ -22,7 +22,6 @@
     private static Logger log = LoggerFactory.getLogger(RamCloudDBConnection.class);
 
     public RamCloudDBConnection(final String dbConfigFile) {
-        System.out.println("dbconfigfile is + "+ dbConfigFile);
         final String coordinatorURL = open(getConfiguration(new File(dbConfigFile)));
 	System.out.println("coordinatorURL "+ coordinatorURL);
         //graph = new RamCloudGraph(coordinatorURL);
@@ -31,7 +30,6 @@
     
     @Override
     public FramedGraph getFramedGraph() {
-	System.out.println("RamCloud getFramedGraph");
         if (isValid()) {
             FramedGraph<RamCloudGraph> fg = new FramedGraph<RamCloudGraph>(graph);
             return fg;
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
index 9ba5ecf..6ee3c46 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
@@ -39,7 +39,8 @@
 	@Override
 	public void init(final String dbStore, final String conf) {
 		try {
-			ope = GraphDBManager.getDBOperation(dbStore, conf);
+			ope = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+			//ope = GraphDBManager.getDBOperation(dbStore, conf);
 		} catch (Exception e) {
 			log.error(e.getMessage());
 		}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java
index 84a6c9c..1396009 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/LinkStorageImpl.java
@@ -33,7 +33,9 @@
 	 */
 	@Override
 	public void init(final String dbStore, final String conf) {
-		this.dbop = GraphDBManager.getDBOperation(dbStore, conf);
+		//this.dbop = GraphDBManager.getDBOperation(dbStore, conf);
+		this.dbop = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+
 	}
 
 	// Method designing policy:
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
index 8bc4fdd..15c41f3 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/SwitchStorageImpl.java
@@ -34,7 +34,8 @@
 	*/
 	@Override
 	public void init(final String dbStore, final String conf) {
-		op = GraphDBManager.getDBOperation(dbStore, conf);
+		op = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+		//op = GraphDBManager.getDBOperation(dbStore, conf);
 	}
 
 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java
index 5892ef8..a1f717e 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoLinkServiceImpl.java
@@ -33,7 +33,8 @@
 	@Override
 	public List<Link> getActiveLinks() {
 		// TODO Auto-generated method stub
-		dbop = GraphDBManager.getDBOperation("", "");
+		dbop = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+		//dbop = GraphDBManager.getDBOperation("", "");
 		dbop.commit(); //Commit to ensure we see latest data
 		Iterable<ISwitchObject> switches = dbop.getActiveSwitches();
 		List<Link> links = new ArrayList<Link>(); 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoSwitchServiceImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoSwitchServiceImpl.java
index 2ae8bd1..aa9f72d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoSwitchServiceImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/TopoSwitchServiceImpl.java
@@ -15,7 +15,8 @@
 	protected final static Logger log = LoggerFactory.getLogger(TopoSwitchServiceImpl.class);
 
 	public TopoSwitchServiceImpl(final String dbStore, String conf) {
-		op = GraphDBManager.getDBOperation(dbStore, conf);;
+		op = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+		//op = GraphDBManager.getDBOperation(dbStore, conf);;
 	}
 
 	public TopoSwitchServiceImpl() {
diff --git a/src/main/java/net/onrc/onos/ofcontroller/floodlightlistener/NetworkGraphPublisher.java b/src/main/java/net/onrc/onos/ofcontroller/floodlightlistener/NetworkGraphPublisher.java
index 1a1cad6..38aff97 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/floodlightlistener/NetworkGraphPublisher.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/floodlightlistener/NetworkGraphPublisher.java
@@ -440,7 +440,8 @@
 		String conf = configMap.get(DBConfigFile);
                 String dbStore = configMap.get(GraphDBStore);
 		System.out.println("conf" + conf + "dbStore" + dbStore);
-		op = GraphDBManager.getDBOperation(dbStore, conf);
+		op = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+		//op = GraphDBManager.getDBOperation(dbStore, conf);
 		if (op == null) {
 		    System.out.println("publisher op is null");
 		}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
index 68450c2..2a55ae1 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowManager.java
@@ -82,8 +82,11 @@
      */
     @Override
     public void init(final String dbStore, final String conf) {
-	dbHandlerApi = GraphDBManager.getDBOperation(dbStore, conf);
-	dbHandlerInner = GraphDBManager.getDBOperation(dbStore, conf);
+	dbHandlerApi = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+	dbHandlerInner = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+
+	//dbHandlerApi = GraphDBManager.getDBOperation(dbStore, conf);
+	//dbHandlerInner = GraphDBManager.getDBOperation(dbStore, conf);
 	
     }
 
diff --git a/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java b/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java
index d605fc1..bc82bc0 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/topology/TopologyManager.java
@@ -79,7 +79,8 @@
      */
     public void init(final String dbStore, String config) {
 	try {
-	    dbHandler = GraphDBManager.getDBOperation(dbStore, config);
+	    dbHandler = GraphDBManager.getDBOperation("ramcloud", "/tmp/ramcloudconf");
+	    //dbHandler = GraphDBManager.getDBOperation(dbStore, config);
 	} catch (Exception e) {
 	    log.error(e.getMessage());
 	}