NetBox Models
Model Types
A NetBox model represents a discrete object type such as a device or IP address. Per Django convention, each model is defined as a Python class and has its own SQL table. All NetBox data models can be categorized by type.
The Django content types framework can be used to reference models within the database. A ContentType instance references a model by its app_label
and name
: For example, the Site model is referred to as dcim.site
. The content type combined with an object's primary key form a globally unique identifier for the object (e.g. dcim.site:123
).
Features Matrix
- Change logging - Changes to these objects are automatically recorded in the change log
- Webhooks - NetBox is capable of generating outgoing webhooks for these objects
- Custom fields - These models support the addition of user-defined fields
- Export templates - Users can create custom export templates for these models
- Tagging - The models can be tagged with user-defined tags
- Journaling - These models support persistent historical commentary
- Nesting - These models can be nested recursively to create a hierarchy
Type | Change Logging | Webhooks | Custom Fields | Export Templates | Tags | Journaling | Nesting |
---|---|---|---|---|---|---|---|
Primary | |||||||
Organizational | |||||||
Nested Group | |||||||
Component | |||||||
Component Template |
Models Index
Primary Models
- circuits.Circuit
- circuits.Provider
- circuits.ProviderNetwork
- dcim.Cable
- dcim.Device
- dcim.DeviceType
- dcim.PowerFeed
- dcim.PowerPanel
- dcim.Rack
- dcim.RackReservation
- dcim.Site
- dcim.VirtualChassis
- dcim.VirtualDeviceContext
- ipam.Aggregate
- ipam.ASN
- ipam.FHRPGroup
- ipam.IPAddress
- ipam.IPRange
- ipam.L2VPN
- ipam.L2VPNTermination
- ipam.Prefix
- ipam.RouteTarget
- ipam.Service
- ipam.VLAN
- ipam.VRF
- tenancy.Contact
- tenancy.Tenant
- virtualization.Cluster
- virtualization.VirtualMachine
- wireless.WirelessLAN
- wireless.WirelessLink
Organizational Models
- circuits.CircuitType
- dcim.DeviceRole
- dcim.Manufacturer
- dcim.Platform
- dcim.RackRole
- ipam.RIR
- ipam.Role
- ipam.VLANGroup
- tenancy.ContactRole
- virtualization.ClusterGroup
- virtualization.ClusterType
Nested Group Models
- dcim.Location (formerly RackGroup)
- dcim.Region
- dcim.SiteGroup
- tenancy.ContactGroup
- tenancy.TenantGroup
- wireless.WirelessLANGroup
Component Models
- dcim.ConsolePort
- dcim.ConsoleServerPort
- dcim.DeviceBay
- dcim.FrontPort
- dcim.Interface
- dcim.InventoryItem
- dcim.PowerOutlet
- dcim.PowerPort
- dcim.RearPort
- virtualization.VMInterface