feat: optionally maintain agent client software as netbox-slm installations

New option "Installierte Software in netbox-slm pflegen" in the client transfer
dialog (off by default, remembered per profile). For clients scanned with the
NetBox Windows Agent, missing manufacturers, software products, versions and
installations are created in the netbox-slm plugin; automatic installations
the agent no longer reports are removed, installations entered by hand stay.
Products that netbox-utilities created without a manufacturer get one.

Names, versions and the marker comment match the software transfer of
netbox-utilities, so both run side by side without duplicates and its client
software overview shows the result. Without netbox-slm the option is skipped
with a log message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-11-18 14:37:47 +01:00
1 parent 4b8ab882f0
commit c4c35ed8d4
8 files changed
+426 -5

No files matched your search

+13
View File
@@ -115,8 +115,17 @@ class ClientTargetDialog(_Dialog):
"unverändert.")
self.update_existing = checkbox("Vorhandene Geräte aktualisieren (Modell, Plattform, Seriennummer)",
options.get("update_existing", True))
self.software = checkbox("Installierte Software in netbox-slm pflegen (nur Agent-Clients)",
options.get("sync_software", False),
tooltip="Legt für die vom NetBox Windows Agent gemeldete Software fehlende "
"Hersteller, Softwareprodukte, Versionen und Installationen im Plugin "
"netbox-slm an und entfernt automatisch angelegte Installationen, die "
"nicht mehr gemeldet werden. Von Hand erfasste Installationen bleiben "
"unverändert. Die Client-Software-Übersicht von netbox-utilities zeigt "
"diese Daten an.")
self.root.addWidget(self.interfaces)
self.root.addWidget(self.update_existing)
self.root.addWidget(self.software)
self.root.addWidget(label("Zuordnung über den Gerätenamen (ohne Groß-/Kleinschreibung). Standort und Rolle "
"vorhandener Geräte bleiben unverändert.", muted=True, wrap=True))
self.root.addWidget(self.error_banner)
@@ -144,6 +153,7 @@ class ClientTargetDialog(_Dialog):
"site_id": site, "role_id": role, "role_name": role_text,
"tenant_id": tenant,
"interfaces": self.interfaces.isChecked(), "update_existing": self.update_existing.isChecked(),
"software": self.software.isChecked(),
}
super().accept()
@@ -166,6 +176,9 @@ class ClientPreviewDialog(_Dialog):
assets = report.get("assets_created", 0) + report.get("assets_updated", 0)
if assets:
items.append((f"{assets} Assets", "info"))
software = report.get("software_installed", 0) + report.get("software_removed", 0)
if software:
items.append((f"{software} Software-Installationen", "info"))
if report["errors"]:
items.append((f"{len(report['errors'])} Probleme", "error"))
for text, kind in items: