Fix invalid DOT cluster label emission for host inventory

This commit is contained in:
beatz174-bit
2026-05-13 10:17:37 +10:00
parent 2619d86dc1
commit 10c4373c0e
+3 -2
View File
@@ -153,10 +153,11 @@ def generate_physical_topology(compose: dict, inventory: dict, out_dot: Path, ou
else:
orphans.append(vm)
for host, record in sorted(phys_names.items()):
host_role = record.get("role", "")
host_role = str(record.get("role", "") or "")
cluster_label = f"{host}\\n{host_role}" if host_role else host
lines.extend([
f' subgraph "cluster_{host}" {{',
f' label="{host}\\n{host_role}".strip();',
f' label="{cluster_label}";',
' style="rounded,filled";',
' color="#60a5fa";',
' fillcolor="#eff6ff";',