Built REST APIs to look at the in-memory network graph state.
Amended to clean up serializer code.
Change-Id: Ie020d1173fa108eec12e324e3ae37353c7ca8a00
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/FloodlightToOnosMappers.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/FloodlightToOnosMappers.java
index 8139737..ebff81d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/FloodlightToOnosMappers.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/FloodlightToOnosMappers.java
@@ -18,15 +18,17 @@
public static Port map(NetworkGraph graph, SwitchImpl sw, OFPhysicalPort port) {
PortImpl onosPort = new PortImpl(graph, sw, new Long(port.getPortNumber()));
+ onosPort.setDescription(port.getName());
return onosPort;
}
public static Link map(NetworkGraph graph, net.floodlightcontroller.routing.Link link) {
- Port srcPort = graph.getSwitch(link.getSrc()).getPort(Long.valueOf(link.getSrcPort()));
- Port dstPort = graph.getSwitch(link.getDst()).getPort(Long.valueOf(link.getDstPort()));
- LinkImpl onosLink = new LinkImpl(graph, srcPort, dstPort);
-
+ //Port srcPort = graph.getSwitch(link.getSrc()).getPort(Long.valueOf(link.getSrcPort()));
+ //Port dstPort = graph.getSwitch(link.getDst()).getPort(Long.valueOf(link.getDstPort()));
+ //LinkImpl onosLink = new LinkImpl(graph, srcPort, dstPort);
+ LinkImpl onosLink = new LinkImpl(graph, link.getSrc(), (long)link.getSrcPort(),
+ link.getDst(), (long)link.getDstPort());
+
return onosLink;
-
}
}