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.
This commit is contained in:
@@ -56,7 +56,7 @@ DEVICE_TYPE_SLUG = "ceos-lab"
|
|||||||
CUSTOM_FIELDS = [
|
CUSTOM_FIELDS = [
|
||||||
# Device custom fields
|
# Device custom fields
|
||||||
{
|
{
|
||||||
"content_types": ["dcim.device"],
|
"object_types": ["dcim.device"],
|
||||||
"name": "asn",
|
"name": "asn",
|
||||||
"label": "ASN",
|
"label": "ASN",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -64,7 +64,7 @@ CUSTOM_FIELDS = [
|
|||||||
"description": "BGP Autonomous System Number assigned to this device",
|
"description": "BGP Autonomous System Number assigned to this device",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"content_types": ["dcim.device"],
|
"object_types": ["dcim.device"],
|
||||||
"name": "mlag_domain_id",
|
"name": "mlag_domain_id",
|
||||||
"label": "MLAG Domain ID",
|
"label": "MLAG Domain ID",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -72,7 +72,7 @@ CUSTOM_FIELDS = [
|
|||||||
"description": "MLAG domain identifier",
|
"description": "MLAG domain identifier",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"content_types": ["dcim.device"],
|
"object_types": ["dcim.device"],
|
||||||
"name": "mlag_peer_address",
|
"name": "mlag_peer_address",
|
||||||
"label": "MLAG Peer Address",
|
"label": "MLAG Peer Address",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -80,7 +80,7 @@ CUSTOM_FIELDS = [
|
|||||||
"description": "MLAG peer IP address",
|
"description": "MLAG peer IP address",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"content_types": ["dcim.device"],
|
"object_types": ["dcim.device"],
|
||||||
"name": "mlag_local_address",
|
"name": "mlag_local_address",
|
||||||
"label": "MLAG Local Address",
|
"label": "MLAG Local Address",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -88,7 +88,7 @@ CUSTOM_FIELDS = [
|
|||||||
"description": "MLAG local IP address",
|
"description": "MLAG local IP address",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"content_types": ["dcim.device"],
|
"object_types": ["dcim.device"],
|
||||||
"name": "mlag_virtual_mac",
|
"name": "mlag_virtual_mac",
|
||||||
"label": "MLAG Virtual MAC",
|
"label": "MLAG Virtual MAC",
|
||||||
"type": "text",
|
"type": "text",
|
||||||
@@ -97,7 +97,7 @@ CUSTOM_FIELDS = [
|
|||||||
},
|
},
|
||||||
# Interface custom fields
|
# Interface custom fields
|
||||||
{
|
{
|
||||||
"content_types": ["dcim.interface"],
|
"object_types": ["dcim.interface"],
|
||||||
"name": "mlag_peer_link",
|
"name": "mlag_peer_link",
|
||||||
"label": "MLAG Peer Link",
|
"label": "MLAG Peer Link",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
@@ -105,7 +105,7 @@ CUSTOM_FIELDS = [
|
|||||||
"description": "Marks interface as MLAG peer-link",
|
"description": "Marks interface as MLAG peer-link",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"content_types": ["dcim.interface"],
|
"object_types": ["dcim.interface"],
|
||||||
"name": "mlag_id",
|
"name": "mlag_id",
|
||||||
"label": "MLAG ID",
|
"label": "MLAG ID",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -114,7 +114,7 @@ CUSTOM_FIELDS = [
|
|||||||
},
|
},
|
||||||
# VRF custom fields
|
# VRF custom fields
|
||||||
{
|
{
|
||||||
"content_types": ["ipam.vrf"],
|
"object_types": ["ipam.vrf"],
|
||||||
"name": "l3vni",
|
"name": "l3vni",
|
||||||
"label": "L3 VNI",
|
"label": "L3 VNI",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -122,7 +122,7 @@ CUSTOM_FIELDS = [
|
|||||||
"description": "Layer 3 VNI for EVPN symmetric IRB",
|
"description": "Layer 3 VNI for EVPN symmetric IRB",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"content_types": ["ipam.vrf"],
|
"object_types": ["ipam.vrf"],
|
||||||
"name": "vrf_vlan",
|
"name": "vrf_vlan",
|
||||||
"label": "VRF VLAN",
|
"label": "VRF VLAN",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
@@ -131,7 +131,7 @@ CUSTOM_FIELDS = [
|
|||||||
},
|
},
|
||||||
# IP Address custom fields
|
# IP Address custom fields
|
||||||
{
|
{
|
||||||
"content_types": ["ipam.ipaddress"],
|
"object_types": ["ipam.ipaddress"],
|
||||||
"name": "virtual_ip",
|
"name": "virtual_ip",
|
||||||
"label": "Virtual IP",
|
"label": "Virtual IP",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|||||||
Reference in New Issue
Block a user