fun discoverOnAllPorts() { log.info("Sending LLDP packets out of all the enabled ports") for (sw in switchService.getAllSwitchDpids()) { val iofSwitch: IOFSwitch = switchService.getSwitch(sw) ?: continue if (!iofSwitch.isActive()) continue val c: Collection<OFPort> = iofSwitch.getEnabledPortNumbers() if (c != null) { for (ofp in c) { if (isLinkDiscoverySuppressed(sw, ofp)) { continue } log.trace("Enabled port: {}", ofp) sendDiscoveryMessage(sw, ofp, true, false) val npt = NodePortTuple(sw, ofp) addToMaintenanceQueue(npt) } } } }
Send LLDPs to all switch-ports