Repository navigation
Skip completed NetBox device library imports and support vendor filtering - #1196
Conversation
|
Thanks for this. Keeping the marker in NetBox's database is the right call, and the fail-open handling around the marker lookup and write looks good. I checked the pieces it depends on. Clean up old marker tags. The library and the importer are both pulled from unpinned branches at build time, so the fingerprint changes on every release build. Each upgrade leaves another Match upstream's vendor normalization. The importer reduces each vendor to slug form with Check the success regex against the importer's real output. Docs: note the effect on OUI matching. Malcolm's enrichment fuzzy-matches MAC OUI organization names against NetBox's manufacturer list. Limiting the import to a few vendors also limits which manufacturers can match, so devices from other vendors either won't match or will have manufacturers autocreated with no device types. Please add a sentence about this to the paragraph in Issue linkage. Please change Optional, worth evaluating: the importer has an |
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
21cc494 to
ec663c7
Compare
|
Updated in ec663c7 on contributor-prs. A new marker now removes superseded NetBox library tags, while cleanup failures only produce warnings. Vendor fingerprints follow the upstream slug normalization. I checked the partial and failed import regex against the actual messages in mmguero-dev/Device-Type-Library-Import core/import_run.py and added those lines to the tests. The OUI documentation now explains restricted-vendor effects. Tests are in shared/tests, with 14 targeted tests and 7 subtests passing. I did not run a live NetBox benchmark; the optional --only-new comparison remains for future investigation. |
Refs #406 (NetBox device-type library startup performance). The full first-time importer performance issue remains open.
Changes
malcolm-device-library-*tags after writing the current completion marker; log cleanup failures without invalidating a successful import.mmguero-dev/Device-Type-Library-Importimporter failure summary messages.Validation
cisagov/Malcolm:contributor-prsat7aa2dddd7ce8ed00ffcfd7c4db9e14cdfcfefffd.shared/tests/test_netbox_device_type_import_cache.pyand added the NetBox scripts directory to shared test search paths.--only-newbenchmark remains optional and unverified.