10 KiB
NetBox v2.9
v2.9.0 (2020-08-21)
WARNING: This is a beta release and is not suitable for production use. It is intended for development and evaluation purposes only. No upgrade path to the final v2.9 release will be provided from this beta, and users should assume that all data entered into the application will be lost. Please reference the v2.9 beta documentation for further information regarding this release.
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 permission 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 allow the associated users/groups to perform an action only on devices assigned to a tenant belonging to the "Customers" group.
Background Execution of Scripts & Reports (#2006)
When running a report or custom script, its execution is now queued for background processing and the user receives an immediate response indicating its status. This prevents long-running scripts from resulting in a timeout error. Once the execution 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.)
Named Virtual Chassis (#2018)
The VirtualChassis model now has a mandatory name field. Names are assigned to the virtual chassis itself rather than referencing the master VC member. Additionally, the designation of a master is now optional: a virtual chassis may have only non-master members.
Changes to Tag Creation (#3703)
Tags are no longer created automatically: A tag must be created by a user before it can be applied to any object. Additionally, the REST API representation of assigned tags has been expanded to be consistent with other objects.
Dedicated Model for VM Interfaces (#4721)
A new model has been introduced to represent virtual machine interfaces. Although this change is largely transparent to the end user, note that the IP address model no longer has a foreign key to the Interface model under the DCIM app. This has been replaced with a generic foreign key named assigned_object.
REST API Endpoints for Users and Groups (#4877)
Two new REST API endpoints have been added to facilitate the retrieval and manipulation of users and groups:
/api/users/groups//api/users/users/
Enhancements
- #4615 - Add
labelfield for all device components and component templates - #4639 - Improve performance of web UI prefixes list
- #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
- #4885 - Add MultiChoiceVar for custom scripts
- #4940 - Add an
occupiedfield to rack unit representations for rack elevation views - #4945 - Add a user-friendly 403 error page
- #4969 - Replace secret role user/group assignment with object permissions
- #4982 - Extended ObjectVar to allow filtering API query
- #4994 - Add
cableattribute to PowerFeed API serializer - #4997 - The browsable API now lists available endpoints alphabetically
- #5024 - List available options for choice fields within CSV import forms
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
- Added new endpoints for users, groups, and permissions under
/api/users/. - A
urlfield is now included on all object representations, identifying the unique REST API URL for each object. - The
tagsfield of an object now includes a more complete representation of each tag, rather than just its name. - 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"}
]
- Legacy numeric values for choice fields are no longer conveyed or accepted.
- circuits.CircuitTermination: Added
cablefield - dcim.Cable: Added
tagsfield - dcim.ConsolePort: Added
labelfield - dcim.ConsolePortTemplate: Added
descriptionandlabelfields - dcim.ConsoleServerPort: Added
labelfield - dcim.ConsoleServerPortTemplate: Added
descriptionandlabelfields - dcim.DeviceBay: Added
labelfield - dcim.DeviceBayTemplate: Added
descriptionandlabelfields - dcim.FrontPort: Added
labelfield - dcim.FrontPortTemplate: Added
descriptionandlabelfields - dcim.Interface: Added
labelfield - dcim.InterfaceTemplate: Added
descriptionandlabelfields - dcim.PowerFeed: Added
cablefield - dcim.PowerPanel: Added
tagsfield - dcim.PowerPort: Added ``label` field
- dcim.PowerPortTemplate: Added
descriptionandlabelfields - dcim.PowerOutlet: Added
labelfield - dcim.PowerOutletTemplate: Added
descriptionandlabelfields - dcim.Rack: Added an
occupiedfield to rack unit representations for rack elevation views - dcim.RackGroup: Added a
_depthattribute indicating an object's position in the tree. - dcim.RackReservation: Added
tagsfield - dcim.RearPort: Added
labelfield - dcim.RearPortTemplate: Added
descriptionandlabelfields - dcim.Region: Added a
_depthattribute indicating an object's position in the tree. - dcim.VirtualChassis: Added
namefield (required) - extras.ConfigContext: Added
createdandlast_updatedfields - extras.JobResult: Added the
/api/extras/job-results/endpoint - 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. - extras.Tag: The count of
tagged_itemsis no longer included when viewing the tags list whenbriefis passed. - ipam.IPAddress: Removed
interfacefield; replaced withassigned_objectgeneric foreign key. This may represent either a device interface or a virtual machine interface. Assign an object by settingassigned_object_typeandassigned_object_id. - ipam.VRF: Added
display_name - tenancy.TenantGroup: Added a
_depthattribute indicating an object's position in the tree. - users.ObjectPermissions: Added the
/api/users/permissions/endpoint - virtualization.VMInterface: Removed
typefield (VM interfaces have no type)
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/add/rather than via the devices list. - A name is required when creating a virtual chassis.