Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
Showing
2 changed files
with
6 additions
and
2 deletions
... | @@ -209,9 +209,13 @@ public class TopologyResource extends BaseResource { | ... | @@ -209,9 +209,13 @@ public class TopologyResource extends BaseResource { |
209 | // Produces JSON for a link. | 209 | // Produces JSON for a link. |
210 | private ObjectNode json(ObjectMapper mapper, AggLink aggLink) { | 210 | private ObjectNode json(ObjectMapper mapper, AggLink aggLink) { |
211 | Link link = aggLink.link; | 211 | Link link = aggLink.link; |
212 | + ConnectPoint src = link.src(); | ||
213 | + ConnectPoint dst = link.dst(); | ||
212 | return mapper.createObjectNode() | 214 | return mapper.createObjectNode() |
213 | - .put("src", link.src().deviceId().toString()) | 215 | + .put("src", src.deviceId().toString()) |
214 | - .put("dst", link.dst().deviceId().toString()) | 216 | + .put("srcPort", src.port().toString()) |
217 | + .put("dst", dst.deviceId().toString()) | ||
218 | + .put("dstPort", dst.port().toString()) | ||
215 | .put("type", link.type().toString().toLowerCase()) | 219 | .put("type", link.type().toString().toLowerCase()) |
216 | .put("linkWidth", aggLink.links.size()); | 220 | .put("linkWidth", aggLink.links.size()); |
217 | } | 221 | } | ... | ... |
-
Please register or login to post a comment