Link virtual OPNsense firewalls to their Proxmox host automatically

The MAC matching only read linux.base and windows.base snapshots and ran only after
those. OPNsense sends a flat opnsense.base snapshot (hardware.device_type,
interfaces.entries); it is now normalised into the same scopes, triggers the
reconciliation and appears in the host's guest list. Manual decisions still win.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 13:05:36 +01:00
co-authored by Claude Opus 5.5
parent b6d7bf4a93
commit f3a471c1c5
5 changed files with 44 additions and 12 deletions
+1 -1
View File
@@ -190,7 +190,7 @@ pub async fn ingest(
.fetch_one(&mut *tx)
.await?;
ensure!(stored == hash, "message identity conflict");
if matches!(s.scope.as_str(), "linux.base" | "windows.base") {
if matches!(s.scope.as_str(), "linux.base" | "windows.base" | "opnsense.base") {
crate::proxmox_links::reconcile(&mut tx, tenant).await;
}
}