Commit Graph

5 Commits

Author SHA1 Message Date
Damien
4e598ae400 fix(script): update populate script 2026-02-04 18:23:04 +01:00
Damien
0a2f658a2a fix(scripts): enhance get_or_create logic and parameter handling
- Replace `endpoint.get()` with `endpoint.filter()` in `get_or_create` to handle object retrieval more robustly and avoid potential exceptions with multiple results.
- Decouple `search_params` from `create_params` to correctly handle differences between API filtering keys (e.g., `group_id`, `vrf_id`) and creation keys (e.g., `group`, `vrf`).
- Refine IP address lookups to include `assigned_object_id` in search parameters, preventing ambiguous matches against IPs not assigned to the target interface.
2026-02-04 16:31:50 +01:00
52c9586667 fix: use 'device' instead of 'device_id' for interface creation
NetBox API requires 'device' field for creation, not 'device_id'.
Separated search and create logic for interfaces.
2026-02-04 15:17:30 +00:00
f4ba38a735 fix: use object_types instead of content_types for NetBox 4.4.x custom fields
The NetBox API changed the field name from content_types to object_types.
2026-02-04 15:08:01 +00:00
1052b2ca3d feat: add NetBox provisioning script for fabric topology
Create comprehensive script to populate NetBox with:
- Custom fields (ASN, MLAG, VRF, virtual IP)
- Organization (Site, Manufacturer, DeviceType, DeviceRole)
- Devices (2 spines, 8 leafs, 4 hosts)
- Interfaces (physical, loopbacks, LAGs, SVIs)
- Cables (spine-leaf, MLAG peer-links, host dual-homing)
- IP addresses (loopbacks, P2P links)
- VLANs and VRF with route targets
- Prefixes

Reference: arista-evpn-vxlan-clab topology
Relates to #5
2026-01-11 16:17:14 +00:00