Devices REST API
diff --git a/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java b/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
index 1cf6f7b..4af1deb 100644
--- a/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
+++ b/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
@@ -74,7 +74,8 @@
@Incidence(label="on",direction = Direction.IN)
public ISwitchObject getSwitch();
- @JsonIgnore
+
+ @JsonProperty("devices")
@Adjacency(label="host")
public Iterable<IDeviceObject> getDevices();
@@ -119,8 +120,16 @@
@GremlinGroovy("_().in('host').in('on')")
public Iterable<ISwitchObject> getSwitch();
+/* @JsonProperty("dpid")
+ @GremlinGroovy("_().in('host').in('on').next().getProperty('dpid')")
+ public Iterable<String> getSwitchDPID();
+
+ @JsonProperty("number")
+ @GremlinGroovy("_().in('host').transform{it.number}")
+ public Iterable<Short> getPortNumber();
+
@JsonProperty("AttachmentPoint")
@GremlinGroovy("_().in('host').in('on').path(){it.number}{it.dpid}")
- public List<SwitchPort> getAttachmentPoints();
+ public Iterable<SwitchPort> getAttachmentPoints();*/
}
}
diff --git a/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java b/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
index a3c5c01..c110651 100644
--- a/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
+++ b/src/main/java/net/floodlightcontroller/core/web/CoreWebRoutable.java
@@ -19,6 +19,7 @@
import net.floodlightcontroller.core.module.ModuleLoaderResource;
import net.floodlightcontroller.linkdiscovery.web.TopoLinksResource;
+import net.floodlightcontroller.devicemanager.web.TopoDevicesResource;
import net.floodlightcontroller.restserver.RestletRoutable;
import org.restlet.Context;
@@ -63,6 +64,7 @@
router.attach("/system/uptime/json", SystemUptimeResource.class);
router.attach("/topology/switches/{filter}/json", TopoSwitchesResource.class);
router.attach("/topology/links/json", TopoLinksResource.class);
+ router.attach("/topology/devices/json", TopoDevicesResource.class);
return router;
}
}