Fix single node in visual topology
[controller.git] / opendaylight / web / topology / src / main / java / org / opendaylight / controller / topology / web / Topology.java
index 0f4569fc19ded417398157a33cc529810e94ed14..b4695defdb4468d5e3a1324e723e6bab169513ae 100644 (file)
@@ -287,6 +287,8 @@ public class Topology implements IObjectReader, IConfigurationAware {
                                Map<String, String> data = (Map<String, String>) nodeEntry.get("data");
                        data.put("$desc", description);
                        nodeEntry.put("data", data);
+                       // clear adjacencies since this is now a single node
+                       nodeEntry.put("adjacencies", new LinkedList<Map<String, Object>>());
                stagedNodes.put(node.id(), nodeEntry);
             } else {
                newNodes.put(node.id(), node.out());