refactor: Discovery protocols re-write (#7380)

* refactor: discovery protocols re-write
extract more code to make it easier to read
use snmpwalk_group
walk lldpRemTable instead of lldpRemoteSystemsData
Optimize discover_device to reduce dns lookups of bad dns names
Make discovery_by_ip behavior consistent between cdp and lldp
move can_skip_discovery to discovery functions

Tested lldp, cdp, and ospf.

* always discover links even if the remote device isn't in system
Fix discover_link always updating

* fix style

* fix update, not fetching id

* increase platform length.  Most devices use sysDescr here, which is max length 255

* remove orphaned links

* update db_schema.yaml
This commit is contained in:
Tony Murray
2017-10-04 02:16:23 -05:00
committed by Neil Lathwood
parent a1d782613b
commit c0b267b49c
7 changed files with 410 additions and 266 deletions

1
sql-schema/210.sql Normal file
View File

@@ -0,0 +1 @@
ALTER TABLE `links` MODIFY `remote_platform` VARCHAR(256);