Added 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 f92260d..bc8d404 100644
--- a/src/main/java/net/onrc/onos/graph/DBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/DBOperation.java
@@ -51,6 +51,7 @@
*/
@Override
public ISwitchObject newSwitch(final String dpid) {
+ System.out.println("newSwitch");
ISwitchObject obj = (ISwitchObject) conn.getFramedGraph().addVertex(null, ISwitchObject.class);
if (obj != null) {
obj.setType("switch");
@@ -64,6 +65,7 @@
*/
@Override
public Iterable<ISwitchObject> getAllSwitches() {
+ System.out.println("getAllSwitches");
Iterable<ISwitchObject> switches = conn.getFramedGraph().getVertices("type", "switch", ISwitchObject.class);
return switches;
}
@@ -73,6 +75,7 @@
*/
@Override
public Iterable<ISwitchObject> getInactiveSwitches() {
+ System.out.println("getInactiveSwitches");
Iterable<ISwitchObject> switches = conn.getFramedGraph().getVertices("type", "switch", ISwitchObject.class);
List<ISwitchObject> inactiveSwitches = new ArrayList<ISwitchObject>();
@@ -100,11 +103,13 @@
*/
@Override
public void removeSwitch(ISwitchObject sw) {
+ System.out.println("removeSwitch");
conn.getFramedGraph().removeVertex(sw.asVertex());
}
@Override
public IPortObject newPort(String dpid, Short portNum) {
+ System.out.println("newPort");
IPortObject obj = (IPortObject) conn.getFramedGraph().addVertex(null, IPortObject.class);
if (obj != null) {
obj.setType("port");
@@ -137,6 +142,7 @@
*/
@Override
public IPortObject searchPort(String dpid, Short number) {
+ System.out.println("searchPort");
String id = dpid + number.toString();
return (conn.getFramedGraph() != null && conn.getFramedGraph().getVertices("port_id", id).iterator().hasNext())
? (IPortObject) conn.getFramedGraph().getVertices("port_id", id, IPortObject.class).iterator().next() : null;
@@ -149,6 +155,7 @@
*/
@Override
public void removePort(IPortObject port) {
+ System.out.println("removeProt");
if (conn.getFramedGraph() != null) {
conn.getFramedGraph().removeVertex(port.asVertex());
}
@@ -159,6 +166,7 @@
*/
@Override
public IDeviceObject newDevice() {
+ System.out.println("newDevice");
IDeviceObject obj = (IDeviceObject) conn.getFramedGraph().addVertex(null, IDeviceObject.class);
if (obj != null) {
obj.setType("device");
@@ -171,6 +179,7 @@
*/
@Override
public Iterable<IDeviceObject> getDevices() {
+ System.out.println("getDeiveces");
return conn.getFramedGraph() != null ? conn.getFramedGraph().getVertices("type", "device", IDeviceObject.class) : null;
}
@@ -180,6 +189,7 @@
*/
@Override
public void removeDevice(IDeviceObject dev) {
+ System.out.println("removeDevice");
if (conn.getFramedGraph() != null) {
conn.getFramedGraph().removeVertex(dev.asVertex());
}
@@ -219,6 +229,7 @@
*/
@Override
public ISwitchObject searchSwitch(final String dpid) {
+ System.out.println("searchSwitch");
return (conn.getFramedGraph() != null && conn.getFramedGraph().getVertices("dpid", dpid).iterator().hasNext())
? (ISwitchObject) (conn.getFramedGraph().getVertices("dpid", dpid, ISwitchObject.class).iterator().next()) : null;
}
@@ -286,6 +297,7 @@
*/
@Override
public void removeFlowPath(IFlowPath flowPath) {
+ System.out.println("removeFlowPath");
conn.getFramedGraph().removeVertex(flowPath.asVertex());
}
@@ -315,6 +327,7 @@
*/
@Override
public void removeFlowEntry(IFlowEntry flowEntry) {
+ System.out.println("removeFlowEntry");
conn.getFramedGraph().removeVertex(flowEntry.asVertex());
}
@@ -370,6 +383,7 @@
}
public void removeIpv4Address(IIpv4Address ipv4Address) {
+ System.out.println("removeIpv4Address");
conn.getFramedGraph().removeVertex(ipv4Address.asVertex());
}