updateOperation = UpdateOperation.LINK_UPDATED;
linkChanged = true;
// Log direct links only. Multi-hop links may be numerous
// Add all to event history
LinkType linkType = getLinkType(lt, newInfo);
if (linkType == ILinkDiscovery.LinkType.DIRECT_LINK) {
log.info("Inter-switch link detected: {}", lt);
evDirectLink.updateEventNoFlush(new DirectLinkEvent(lt.getSrc(),
lt.getSrcPort(), lt.getDst(), lt.getDstPort(), "direct-link-added::rcvd LLDP"));
}
notifier.postNotification("Link added: " + lt.toString());
} else {
linkChanged = updateLink(lt, oldInfo, newInfo);
if (linkChanged) {
updateOperation = UpdateOperation.LINK_UPDATED;
LinkType linkType = getLinkType(lt, newInfo);
if (linkType == ILinkDiscovery.LinkType.DIRECT_LINK) {
log.info("Inter-switch link updated: {}", lt);
evDirectLink.updateEventNoFlush(new DirectLinkEvent(lt.getSrc(),
lt.getSrcPort(), lt.getDst(), lt.getDstPort(),
"link-port-state-updated::rcvd LLDP"));