From f4ba38a7351e8db8d947d5000de607658f3caf47 Mon Sep 17 00:00:00 2001 From: Damien Arnodo Date: Wed, 4 Feb 2026 15:08:01 +0000 Subject: [PATCH] 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. --- scripts/provision_fabric.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/provision_fabric.py b/scripts/provision_fabric.py index d96f75a..6c6a7fd 100644 --- a/scripts/provision_fabric.py +++ b/scripts/provision_fabric.py @@ -56,7 +56,7 @@ DEVICE_TYPE_SLUG = "ceos-lab" CUSTOM_FIELDS = [ # Device custom fields { - "content_types": ["dcim.device"], + "object_types": ["dcim.device"], "name": "asn", "label": "ASN", "type": "integer", @@ -64,7 +64,7 @@ CUSTOM_FIELDS = [ "description": "BGP Autonomous System Number assigned to this device", }, { - "content_types": ["dcim.device"], + "object_types": ["dcim.device"], "name": "mlag_domain_id", "label": "MLAG Domain ID", "type": "text", @@ -72,7 +72,7 @@ CUSTOM_FIELDS = [ "description": "MLAG domain identifier", }, { - "content_types": ["dcim.device"], + "object_types": ["dcim.device"], "name": "mlag_peer_address", "label": "MLAG Peer Address", "type": "text", @@ -80,7 +80,7 @@ CUSTOM_FIELDS = [ "description": "MLAG peer IP address", }, { - "content_types": ["dcim.device"], + "object_types": ["dcim.device"], "name": "mlag_local_address", "label": "MLAG Local Address", "type": "text", @@ -88,7 +88,7 @@ CUSTOM_FIELDS = [ "description": "MLAG local IP address", }, { - "content_types": ["dcim.device"], + "object_types": ["dcim.device"], "name": "mlag_virtual_mac", "label": "MLAG Virtual MAC", "type": "text", @@ -97,7 +97,7 @@ CUSTOM_FIELDS = [ }, # Interface custom fields { - "content_types": ["dcim.interface"], + "object_types": ["dcim.interface"], "name": "mlag_peer_link", "label": "MLAG Peer Link", "type": "boolean", @@ -105,7 +105,7 @@ CUSTOM_FIELDS = [ "description": "Marks interface as MLAG peer-link", }, { - "content_types": ["dcim.interface"], + "object_types": ["dcim.interface"], "name": "mlag_id", "label": "MLAG ID", "type": "integer", @@ -114,7 +114,7 @@ CUSTOM_FIELDS = [ }, # VRF custom fields { - "content_types": ["ipam.vrf"], + "object_types": ["ipam.vrf"], "name": "l3vni", "label": "L3 VNI", "type": "integer", @@ -122,7 +122,7 @@ CUSTOM_FIELDS = [ "description": "Layer 3 VNI for EVPN symmetric IRB", }, { - "content_types": ["ipam.vrf"], + "object_types": ["ipam.vrf"], "name": "vrf_vlan", "label": "VRF VLAN", "type": "integer", @@ -131,7 +131,7 @@ CUSTOM_FIELDS = [ }, # IP Address custom fields { - "content_types": ["ipam.ipaddress"], + "object_types": ["ipam.ipaddress"], "name": "virtual_ip", "label": "Virtual IP", "type": "boolean",