Add debug log
diff --git a/src/main/java/net/onrc/onos/graph/DBOperation.java b/src/main/java/net/onrc/onos/graph/DBOperation.java
index d965ad5..f92260d 100644
--- a/src/main/java/net/onrc/onos/graph/DBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/DBOperation.java
@@ -190,6 +190,7 @@
*/
@Override
public IFlowPath newFlowPath() {
+ System.out.println("newFlowPath");
IFlowPath flowPath = (IFlowPath)conn.getFramedGraph().addVertex(null, IFlowPath.class);
if (flowPath != null) {
flowPath.setType("flow");
@@ -255,6 +256,7 @@
*/
@Override
public IFlowPath searchFlowPath(final FlowId flowId) {
+ System.out.println("searchFlowPath");
return conn.getFramedGraph().getVertices("flow_id", flowId.toString()).iterator().hasNext()
? (IFlowPath) conn.getFramedGraph().getVertices("flow_id", flowId.toString(),
IFlowPath.class).iterator().next() : null;
@@ -265,6 +267,7 @@
*/
@Override
public Iterable<IFlowPath> getAllFlowPaths() {
+ System.out.println("getAllFlowPaths");
Iterable<IFlowPath> flowPaths = conn.getFramedGraph().getVertices("type", "flow", IFlowPath.class);
List<IFlowPath> nonNullFlows = new ArrayList<IFlowPath>();
@@ -292,6 +295,7 @@
*/
@Override
public IFlowEntry searchFlowEntry(FlowEntryId flowEntryId) {
+ System.out.println("searchFlowEntry");
return conn.getFramedGraph().getVertices("flow_entry_id", flowEntryId.toString()).iterator().hasNext()
? (IFlowEntry)conn.getFramedGraph().getVertices("flow_entry_id", flowEntryId.toString(),
IFlowEntry.class).iterator().next() : null;
@@ -319,6 +323,7 @@
*/
@Override
public IFlowEntry newFlowEntry() {
+ System.out.println("newFlowEntry");
IFlowEntry flowEntry = (IFlowEntry) conn.getFramedGraph().addVertex(null, IFlowEntry.class);
if (flowEntry != null) {
flowEntry.setType("flow_entry");
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
index 7b3904b..dd56241 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowDatabaseOperation.java
@@ -45,7 +45,9 @@
IFlowPath flowObj = null;
boolean found = false;
try {
- if ((flowObj = dbHandler.searchFlowPath(flowPath.flowId())) != null) {
+ flowObj = dbHandler.searchFlowPath(flowPath.flowId());
+ System.out.println("flowObj : " + flowObj);
+ if (flowObj != null) {
System.out.println("found = true");
found = true;
} else {