feat(netbox): Add NetBox API client with v4.4 compatibility #22

Merged
Damien merged 5 commits from feat/netbox-data-model into main 2026-01-09 14:26:03 +00:00

5 Commits

Author SHA1 Message Date
darnodo
ac763aa376 fix(netbox): adapt client for NetBox 4.4 API compatibility
- Bump pynetbox dependency to >=7.5.0
- Change get_device_asn to read ASN from device custom field instead of
  filtering ASNs by device (unsupported in NetBox 4.4)
- Remove device_name filter from get_l2vpn_terminations as L2VPN
  terminations cannot be filtered by device in NetBox 4.4
- Refactor get_vrf_interfaces to query IP addresses with VRF filter and
  extract associated interfaces (VRF filtering on interfaces unsupported)
- Add get_interface_mlag_id method to read MLAG ID from interface
  custom field
2026-01-09 10:24:57 +01:00
2f828f43d6 docs: add complete custom fields reference and API compatibility notes
- Add comprehensive custom fields table for Device, Interface, VRF, and IP Address
- Include API examples for custom field creation
- Document working vs non-working API filters for NetBox 4.4
- Add workarounds for filters that don't exist (ASN by device, L2VPN terminations by device)
- Update VRF interface assignment to show IP-based VRF membership
- Add virtual_ip custom field for anycast gateway support
2026-01-08 12:33:17 +00:00
darnodo
b1c46686d2 chore: add missing newline and update dependencies
- Fix missing newline at end of __init__.py
- Add certifi and charset-normalizer packages to uv.lock
- Update lock file with HTTP-related dependencies
2026-01-08 13:02:39 +01:00
darnodo
4799c4cbf2 feat(netbox): Add NetBox API client for fabric intent retrieval
Implements FabricNetBoxClient using pynetbox to fetch:
- Device and interface data
- BGP sessions and peer groups (plugin)
- L2VPN/EVPN VNI mappings
- VRF and route target configuration
- MLAG custom fields

Relates to #5
2026-01-08 13:02:09 +01:00
555f8436f1 docs: Add NetBox data model documentation for fabric intent
Documents how EVPN-VXLAN fabric configuration is represented in NetBox
using native models and the BGP plugin.

Includes:
- Model mapping tables (native + BGP plugin)
- IP addressing scheme
- BGP session configuration
- VXLAN/EVPN L2VPN setup
- MLAG custom fields requirements
- VRF configuration
- Data retrieval examples with pynetbox

Relates to #5
2026-01-08 07:53:37 +00:00