@Override protected Map<IpLink, OspfNeighbor> featureValueOf(OspfProcess actual) { return actual.getOspfNeighbors(); } }
private static SortedSet<VerboseOspfEdge> getOspfEdges(Map<String, Configuration> configs) { SortedSet<VerboseOspfEdge> ospfEdges = new TreeSet<>(); for (Configuration c : configs.values()) { String hostname = c.getHostname(); for (Vrf vrf : c.getVrfs().values()) { OspfProcess proc = vrf.getOspfProcess(); if (proc != null) { for (OspfNeighbor ospfNeighbor : proc.getOspfNeighbors().values()) { OspfNeighbor remoteOspfNeighbor = ospfNeighbor.getRemoteOspfNeighbor(); if (remoteOspfNeighbor != null) { Configuration remoteHost = remoteOspfNeighbor.getOwner(); String remoteHostname = remoteHost.getHostname(); Ip localIp = ospfNeighbor.getLocalIp(); Ip remoteIp = remoteOspfNeighbor.getLocalIp(); IpEdge edge = new IpEdge(hostname, localIp, remoteHostname, remoteIp); ospfEdges.add(new VerboseOspfEdge(ospfNeighbor, remoteOspfNeighbor, edge)); } } } } } return ospfEdges; }
OspfProcess proc = vrf.getOspfProcess(); if (proc != null) { for (OspfNeighbor ospfNeighbor : proc.getOspfNeighbors().values()) { OspfNeighbor remoteOspfNeighbor = ospfNeighbor.getRemoteOspfNeighbor(); if (remoteOspfNeighbor != null) {
OspfProcess remoteProc = remoteVrf.getOspfProcess(); if (remoteProc != null) { if (remoteProc.getOspfNeighbors() == null) { remoteProc.setOspfNeighbors(new TreeMap<>()); Ip remoteIp = remoteIface.getAddress().getIp(); IpLink localKey = new IpLink(localIp, remoteIp); OspfNeighbor neighbor = proc.getOspfNeighbors().get(localKey); if (neighbor == null) { hasNeighbor = true; neighbor.setOwner(c); neighbor.setInterface(iface); proc.getOspfNeighbors().put(localKey, neighbor); remoteNeighbor.setOwner(remoteNode); remoteNeighbor.setInterface(remoteIface); remoteProc.getOspfNeighbors().put(remoteKey, remoteNeighbor); neighbor.setOwner(c); neighbor.setInterface(iface); proc.getOspfNeighbors().put(key, neighbor);
OspfProcess proc = vrf.getOspfProcess(); if (proc != null) { for (OspfNeighbor ospfNeighbor : proc.getOspfNeighbors().values()) { OspfNeighborSummary ospfNeighborSummary = new OspfNeighborSummary(ospfNeighbor); answerElement.addToAll(
OspfProcess proc = vrf.getOspfProcess(); if (proc != null) { for (OspfNeighbor ospfNeighbor : proc.getOspfNeighbors().values()) { OspfNeighbor remoteOspfNeighbor = ospfNeighbor.getRemoteOspfNeighbor(); if (remoteOspfNeighbor != null) {
if (ospf.getOspfNeighbors() != null) { for (Entry<IpLink, OspfNeighbor> entry2 : ospf.getOspfNeighbors().entrySet()) { IpLink link = entry2.getKey(); OspfNeighbor neighbor = entry2.getValue();