6.4 KiB
NetBox v2.9
v2.9.0 (FUTURE)
New Features
Object-Based Permissions (#554)
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.
Background Script & Report Execution (#2006)
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.)
Enhancements
- #2018 - Add
namefield to virtual chassis model - #3703 - Tags must be created administratively before being assigned to an object
- #4615 - Add
labelfield for all device components - #4742 - Add tagging for cables, power panels, and rack reservations
- #4788 - Add dedicated views for all device components
- #4792 - Add bulk rename capability for console and power ports
- #4793 - Add
descriptionfield to device component templates - #4795 - Add bulk disconnect capability for console and power ports
- #4806 - Add a
urlfield to all API serializers - #4807 - Add bulk edit ability for device bay templates
- #4817 - Standardize device/VM component
namefield to 64 characters - #4837 - Use dynamic form widget for relationships to MPTT objects (e.g. regions)
- #4840 - Enable change logging for config contexts
Configuration Changes
- If in use, LDAP authentication must be enabled by setting
REMOTE_AUTH_BACKENDto'netbox.authentication.LDAPBackend'. (LDAP configuration parameters inldap_config.pyremain unchanged.) REMOTE_AUTH_DEFAULT_PERMISSIONSnow takes a dictionary rather than a list. This is a mapping of permission names to a dictionary of constraining attributes, orNone. For example,['dcim.add_site', 'dcim.change_site']would become{'dcim.add_site': None, 'dcim.change_site': None}.
REST API Changes
- The count of
tagged_itemsis no longer included when viewing the tags list whenbriefis passed. - The assignment of tags to an object is now achieved in the same manner as specifying any other related device. The
tagsfield 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
tagsfield of an object now includes a more complete representation of each tag, rather than just its name. - A
labelfield 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
interfacefield on the serializer has been replaced withassigned_object_typeandassigned_object_idfor write operations. If one exists, the assigned interface is available asassigned_object. - The serialized representation of a virtual machine interface now includes only relevant fields:
type,lag,mgmt_only,connected_endpoint_type,connected_endpoint, andcableare no longer included. - dcim.VirtualChassis: Added a mandatory
namefield - An optional
descriptionfield has been added to all device component templates - extras.Report: The
failedfield has been removed. Thecompleted(boolean) andstatus(string) fields have been introduced to convey the status of a report's most recent execution. Additionally, theresultfield now conveys the nested representation of a JobResult. - extras.Script: Added
moduleandresultfields. Theresultfield now conveys the nested representation of a JobResult. - A
urlfield is now included on all object representations, identifying the unique REST API URL for each object. - A
_depthfield 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.
Other Changes
- A new model,
VMInterfacehas been introduced to represent interfaces assigned to VirtualMachine instances. Previously, these interfaces utilized the DCIM modelInterface. Instances will be replicated automatically upon upgrade, however any custom code which references or manipulates virtual machine interfaces will need to be updated accordingly. - The
secrets.activate_userkeypermission no longer exists. Instead,secrets.change_userkeyis checked to determine whether a user has the ability to activate a UserKey. - The
users.delete_tokenpermission is no longer enforced. All users are permitted to delete their own API tokens. - Dropped backward compatibility for the
webhooksRedis queue configuration (usetasksinstead). - Dropped backward compatibility for the
/admin/webhook-backend-statusURL (moved to/admin/background-tasks/). - Virtual chassis are now created by navigating to
/dcim/virtual-chassis/addrather than via the devices list. - A name is required when creating a virtual chassis.