NetBox v2.9 replaces Django's built-in permissions framework with one that supports object-based assignment of permissions using arbitrary constraints. When granting a user or group to perform a certain action on one or more types of objects, an administrator can optionally specify a set of constraints. The permission will apply only to objects which match the specified constraints. For example, assigning permission to modify devices with the constraint {"tenant__group__name": "Customers"} would grant the permission only for devices assigned to a tenant belonging to the "Customers" group.
When running a report or custom script, the task is now queued for background processing and a response is immediately returned to the user. This prevents long-running scripts from blocking the response, and avoids WSGI timeout errors. Once the task has completed, the page will automatically refresh to display its results. Both scripts and reports now store their output in the new JobResult model. (The ReportResult model has been removed.)
name field to virtual chassis modellabel field for all device componentsdescription field to device component templatesurl field to all API serializersname field to 64 charactersREMOTE_AUTH_BACKEND to 'netbox.authentication.LDAPBackend'. (LDAP configuration parameters in ldap_config.py remain unchanged.)REMOTE_AUTH_DEFAULT_PERMISSIONS now takes a dictionary rather than a list. This is a mapping of permission names to a dictionary of constraining attributes, or None. For example, ['dcim.add_site', 'dcim.change_site'] would become {'dcim.add_site': None, 'dcim.change_site': None}.tagged_items is no longer included when viewing the tags list when brief is passed.The assignment of tags to an object is now achieved in the same manner as specifying any other related device. The tags field accepts a list of JSON objects each matching a desired tag. (Alternatively, a list of numeric primary keys corresponding to tags may be passed instead.) For example:
"tags": [
{"name": "First Tag"},
{"name": "Second Tag"}
]
The tags field of an object now includes a more complete representation of each tag, rather than just its name.
A label field has been added to all device components and component templates.
The IP address model now uses a generic foreign key to refer to the assigned interface. The interface field on the serializer has been replaced with assigned_object_type and assigned_object_id for write operations. If one exists, the assigned interface is available as assigned_object.
The serialized representation of a virtual machine interface now includes only relevant fields: type, lag, mgmt_only, connected_endpoint_type, connected_endpoint, and cable are no longer included.
dcim.VirtualChassis: Added a mandatory name field
An optional description field has been added to all device component templates
extras.Report: The failed field has been removed. The completed (boolean) and status (string) fields have been introduced to convey the status of a report's most recent execution. Additionally, the result field now conveys the nested representation of a JobResult.
extras.Script: Added module and result fields. The result field now conveys the nested representation of a JobResult.
A url field is now included on all object representations, identifying the unique REST API URL for each object.
A _depth field has been added to all objects which feature a self-recursive hierarchy (namely regions, rack groups, and tenant groups).
Legacy numeric values for choice fields are no longer conveyed or accepted.
VMInterface has been introduced to represent interfaces assigned to VirtualMachine instances. Previously, these interfaces utilized the DCIM model Interface. Instances will be replicated automatically upon upgrade, however any custom code which references or manipulates virtual machine interfaces will need to be updated accordingly.secrets.activate_userkey permission no longer exists. Instead, secrets.change_userkey is checked to determine whether a user has the ability to activate a UserKey.users.delete_token permission is no longer enforced. All users are permitted to delete their own API tokens.webhooks Redis queue configuration (use tasks instead)./admin/webhook-backend-status URL (moved to /admin/background-tasks/)./dcim/virtual-chassis/add rather than via the devices list.