Files
bf-infra/nautobot
Christoph Emsenhuber 1d86983f63 TP25: st-main-5g Parameter-Reihenfolge gefixt + Commands-File
RouterOS exportiert transition-threshold vor wnm; Template-Reihenfolge ans
Export-Format angepasst. Deploy über manuellen Plan (Plan cc8340a8) — 140/140.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-09-15 18:30:24 +02:00
..

Nautobot-Tooling

ingest-baseline.py

Idempotenter Basisdaten-Ingest (Locations, Rollen, Device-Types, Devices, VLANs/Prefixes, ap1-Interfaces + IPs, WLAN-Modelle). Bildet den Ist-Zustand ab, nicht den Zielzustand.

export NAUTOBOT_TOKEN=...          # aus docs/nas-vlan20/stacks/210-nautobot.yml (gitignored)
python3 nautobot/ingest-baseline.py          # Dry-Run
python3 nautobot/ingest-baseline.py --apply  # schreiben

API-Fallen (teuer gelernt)

  • tagged_vlans liest sich per REST als null, obwohl korrekt gespeichert. Verifikation nur über GraphQL: POST /api/graphql/ mit {interfaces(device:"ap1"){name mode untagged_vlan{vid} tagged_vlans{vid}}}.
  • Relationen kommen ohne ?depth=1 ohne display → ein voll gepflegtes Device sieht leer aus.
  • LocationType.content_types muss ipam.vlangroup/ipam.vlan/ipam.prefix/dcim.controller enthalten, sonst 400 beim Anlegen.
  • parent_interface nur für virtuelle Interfaces — WLAN-VAPs können ihren Master nicht als Parent tragen.
  • WirelessNetwork hat kein VLAN-Feld; die VLAN-Bindung hängt an wireless/controller-managed-device-group-wireless-network-assignments und braucht zwingend einen Controller (bei uns logisch, controller_device leer — kein CAPsMAN).
  • RadioProfile.channel_width will Integer ([20,40,80]), nicht "20mhz".
  • IP↔Interface läuft über /ipam/ip-address-to-interface/.

ingest-wifi-access-list-rule.py

Legt ComplianceFeature + ComplianceRule wifi-access-list an (Plattform RouterOS, match_config=/interface wifi access-list). Idempotent, Dry-Run ist Standard.

export NAUTOBOT_TOKEN=...
python3 nautobot/ingest-wifi-access-list-rule.py --apply

Warum es die Rule braucht: ohne sie erzeugen Eintraege in der access-list keinen Drift und lassen sich nicht als Config-Transaktion fuehren -- gc-transaktion.py verlangt eine ComplianceRule als --scope. docs/tp25-pin-s22.sh schreibt dort bei jedem Messrundgang, und TP25 Fund E (signal-range-Boden) landet dauerhaft dort.

Der Soll-Zustand ist leer und steht als Kommentarblock [6c] im Template. Waehrend eines Messlaufs ist der Drift erwartet und gehoert als offene Transaktion gefuehrt.