feat: transfer client software lists from inventory reports into netbox-slm

The NetBox Windows Agent and the NetBox Synchronizer write the installed
software as a report into the device comments. On every device save the
report is parsed (agent bullet list and synchronizer table) and the device's
netbox-slm installations are brought in line: missing products, versions and
installations are created, installations that left the report are removed.
Installations entered by hand are never touched. Deleting a device removes its
automatic installations first, since netbox-slm protects devices with
installations. The command netbox_utilities_sync_software transfers existing
reports once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-11-18 14:21:52 +01:00
1 parent 63b3b31763
commit e24a12164c
7 files changed
+379 -2

No files matched your search

+19
View File
@@ -529,6 +529,25 @@ exported as CSV. Without an own selection the global tenant filter applies.
The device role filter is pre-set to `software_device_roles`; clearing it
includes all devices.
Software lists of the **NetBox Windows Agent** (mode `netbox`) and the
**NetBox Synchronizer** desktop app (agent scan) arrive as an inventory report
in the device comments. Every time such a device is saved, its software list is
transferred into netbox-slm: missing products, versions and installations are
created, and installations that disappeared from the report are removed. Only
installations created this way (comment *Automatisch aus dem
Inventarbericht übernommen*) are removed; entries made by hand stay. A product
gets the dcim manufacturer of the same name as the publisher, if one exists,
otherwise the publisher goes into its description. Agent lines without a
recognisable version (at least one dot) get the version `unbekannt`. Deleting a
device removes its automatic installations first, so netbox-slm does not block
the deletion.
Devices that already have a report are transferred once with:
```bash
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py netbox_utilities_sync_software
```
Devices with one of these roles get a **Software** tab listing their
installations with add, edit and delete buttons. Other devices show the tab
only if software is recorded for them. Permissions are those of netbox-slm