Files
bf-infra/nautobot
Christoph Emsenhuber a78f385479 Merge branch 'tp5-etappe1-log-lauf'
# Conflicts:
#	docs/teilprojekte.md
2026-08-17 14:35:26 +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/.