Cleanup interfaces and fix port state issue
diff --git a/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java b/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
index d0cf90f..a54136c 100644
--- a/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
+++ b/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
@@ -21,6 +21,7 @@
@JsonProperty("state")
@Property("state")
public String getState();
+
@Property("state")
public void setState(final String state);
diff --git a/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java b/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
index 3cb8163..0e43ed2 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
@@ -88,7 +88,8 @@
Vertex p = graph.addVertex(null);
p.setProperty("type","port");
p.setProperty("number",port.getPortNumber());
- p.setProperty("state",port.getState());
+ p.setProperty("state", "ACTIVE");
+ p.setProperty("port_state",port.getState());
p.setProperty("desc",port.getName());
Edge e = graph.addEdge(null, sw, p, "on");
e.setProperty("state","ACTIVE");
diff --git a/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java b/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java
index c5b7e66..7a8511b 100644
--- a/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java
+++ b/src/main/java/net/floodlightcontroller/core/web/TopoSwitchesResource.java
@@ -17,12 +17,12 @@
String filter = (String) getRequestAttributes().get("filter");
if (filter.equals("active")) {
- return (Iterator<ISwitchObject>) impl.GetActiveSwitches().iterator();
+ return (Iterator<ISwitchObject>) impl.getActiveSwitches().iterator();
}
if (filter.equals("inactive")) {
- return (Iterator<ISwitchObject>) impl.GetInactiveSwitches().iterator();
+ return (Iterator<ISwitchObject>) impl.getInactiveSwitches().iterator();
} else {
- return (Iterator<ISwitchObject>) impl.GetAllSwitches().iterator();
+ return (Iterator<ISwitchObject>) impl.getAllSwitches().iterator();
}
}