change setFlowProperties() to setVertexProperties()
diff --git a/src/main/java/net/onrc/onos/graph/DBOperation.java b/src/main/java/net/onrc/onos/graph/DBOperation.java
index b39771e..730f727 100644
--- a/src/main/java/net/onrc/onos/graph/DBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/DBOperation.java
@@ -422,10 +422,21 @@
}
@Override
- public void setFlowProperties(IFlowEntry flowEntry, Map<String, Object> map) {
+ public void setVertexProperties(Vertex vertex, Map<String, Object> map) {
log.debug("setProperties start: size {}", map.size());
- RamCloudVertex v = (RamCloudVertex) flowEntry.asVertex();
+ RamCloudVertex v = (RamCloudVertex) vertex;
v.setProperties(map);
log.debug("setProperties end: size {}, id {}", map.size(), v.getId());
}
+
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ for(ISwitchObject sw: getAllSwitches()) {
+ sb.append("sw: " + sw.getDPID() + "\n");
+ for(IPortObject port: sw.getPorts()) {
+ sb.append(" port: " + port.getPortId() + "\n");
+ }
+ }
+ return sb.toString();
+ }
}
diff --git a/src/main/java/net/onrc/onos/graph/IDBOperation.java b/src/main/java/net/onrc/onos/graph/IDBOperation.java
index a2c6044..cb67bf8 100644
--- a/src/main/java/net/onrc/onos/graph/IDBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/IDBOperation.java
@@ -2,6 +2,8 @@
import java.util.Map;
+import com.tinkerpop.blueprints.Vertex;
+
import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IDeviceObject;
import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowEntry;
import net.onrc.onos.ofcontroller.core.INetMapTopologyObjects.IFlowPath;
@@ -42,7 +44,7 @@
public Iterable<IFlowEntry> getAllFlowEntries();
public void removeFlowEntry(IFlowEntry flowEntry);
- public void setFlowProperties(IFlowEntry flowEntry, Map<String, Object> map);
+ public void setVertexProperties(Vertex vertex, Map<String, Object> map);
public IDBConnection getDBConnection();
public void commit();
diff --git a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java
index e59ab93..7b17aaa 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/flowmanager/FlowEntryProperty.java
@@ -145,6 +145,6 @@
* @param dbhandler
*/
public void commitProperties() {
- dbhandler.setFlowProperties(flowEntry ,map);
+ dbhandler.setVertexProperties(flowEntry.asVertex() ,map);
}
}