| .. | |||
| README.md | 1 day ago | ||
| ipv4-prefixes-import.py | 1 day ago | ||
| ipv6-mark-reserved.py | 1 day ago | ||
This directory contains the NetBox import scripts required for v1 (IPv4-only) deployment. Each script is idempotent; re-running is safe.
ipv4-prefixes-import.pyAdds the IPv4 prefixes required for v1:
/22 (10.12.8.0/22)/22 (10.12.4.0/22) with Provider IP Ranges (FIP pool + API VIPs)/22 (10.12.32.0/22)/16 (default 10.20.0.0/16; configurable via TENANT_POOL_CIDR env var)Run order: first.
NETBOX_URL=https://netbox.baldurkeep.com NETBOX_TOKEN=<token> \
python3 ipv4-prefixes-import.py
ipv6-mark-reserved.pyMarks existing IPv6 prefixes scoped to VR0 DC0 as reservation status per D-015 (v1/v2 fork). The IPv6 entries from earlier session work are NOT deleted — they're preserved to document v2 design intent without implying they are active during v1.
Run order: second (after IPv4 prefixes are in place).
NETBOX_URL=https://netbox.baldurkeep.com NETBOX_TOKEN=<token> \
python3 ipv6-mark-reserved.py
Use --dry-run to preview without changes. Use --revert only when v2 work begins (sets IPv6 prefixes back to active).
vlans-import.py — removed)Per the v1/v2 fork session Q2, additional VR0 DC0-VLANs group entries (VIDs 50, 200, 220, 221, 222, 230, 260, 270) are not imported in v1.
Rationale: MAAS currently uses untagged-per-fabric on the existing network layout. Modeling additional VLAN entries in NetBox without corresponding network-side VLAN tagging would be misleading documentation. The VID 240 (OS-Provider) entry imported during prior session work is sufficient for v1 since it pairs with the Provider /22 prefix.
When v2 work begins, the VLAN import script will be re-introduced under the v2 design with VLAN tagging actually in play.
The IPv6 prefix entries previously imported (Provider /60 + sub-/64s, Metal /60, Data /60, Storage /60, Replication /60, LBaaS Mgmt /60, OOB /60) are reserved in NetBox via ipv6-mark-reserved.py. They become active again under the planned /60 → /64 refactor and full re-import when v2 work begins.
These scripts assume NetBox 4.x:
scope_type="dcim.site" + scope_id=<id> (not legacy site= field)p.scope (not p.site)"reserved" / "active" as lowercase choice slugsIf your NetBox is older, the scripts will need adjustment.
python3 ipv4-prefixes-import.py — succeeds; verification block cleanpython3 ipv6-mark-reserved.py — succeeds; all IPv6 prefixes now reserved