feat(netbox): Add NetBox API client with v4.4 compatibility #22
Reference in New Issue
Block a user
Delete Branch "feat/netbox-data-model"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR adds a comprehensive NetBox API client for retrieving fabric intent data, with full compatibility for NetBox 4.4.
Features
NetBox Client (
src/netbox/client.py)Device & Interface Methods
get_device,get_devices_by_role,get_leaf_devices,get_spine_devicesget_device_interfaces,get_device_loopbacks,get_device_lags,get_device_svisget_interface_ips,get_device_ipsBGP Methods (netbox-bgp plugin)
get_bgp_sessions,get_bgp_peer_groupsL2VPN/EVPN Methods
get_l2vpns,get_l2vpn_terminations,get_vni_for_vlanVRF Methods
get_vrfs,get_vrf,get_device_vrf_interfaces,get_route_targets,get_vrf_l3vniMLAG Methods (Custom Fields)
get_device_mlag_config,get_mlag_peer_link,get_interface_mlag_idAggregated Intent
get_device_intent- Complete intent for a single deviceget_fabric_intent- Complete intent for entire fabricNetBox 4.4 API Compatibility Fixes
asnl2vpnonly, warn ifdevice_nameprovidedDocumentation
docs/netbox-data-model.mdDependencies
pynetbox>=7.5.0(tested with NetBox 4.4)Custom Fields Required
Create these custom fields in NetBox before using the client:
asnmlag_domain_idmlag_peer_addressmlag_local_addressmlag_virtual_macmlag_peer_linkmlag_idl3vnivrf_vlanvirtual_ipTesting
Related
docs/netbox-data-model.md