-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v3.2.0 #9041
Merged
Merged
Release v3.2.0 #9041
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e with nested inventory items
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking Changes
asn
field has been removed from the site model. Please replicate any site ASN assignments to the ASN model introduced in NetBox v3.1 prior to upgrading.asn
query filter for sites now matches against the AS number of assigned ASN objects.contact_name
,contact_phone
, andcontact_email
fields have been removed from the site model. Please replicate any data remaining in these fields to the contact model introduced in NetBox v3.1 prior to upgrading.created
field of all change-logged models now conveys a full datetime object, rather than only a date. (Previous date-only values will receive a timestamp of 00:00.) While this change is largely unconcerning, strictly-typed API consumers may need to be updated.pre_run()
method has been added to the base Report class. Although unlikely to affect most installations, you may need to alter any reports which already use this name for a method.New Features
Plugins Framework Extensions (#8333)
NetBox's plugins framework has been extended considerably in this release. Additions include:
ObjectView
ObjectEditView
ObjectDeleteView
ObjectListView
BulkImportView
BulkEditView
BulkDeleteView
NetBoxModel
base class, which enables various NetBox features, including:NetBoxModelForm
NetBoxModelCSVForm
NetBoxModelBulkEditForm
NetBoxModelFilterSetForm
NetBoxModelFilterSet
base class for plugin filter setsNetBoxTable
base class for rendering object tables withdjango-tables2
, as well as various custom column classesNetBoxModelViewSet
and several base serializer classes now provide enhanced REST API functionalityNo breaking changes to previously supported components have been introduced in this release. However, plugin authors are encouraged to audit their existing code for misuse of unsupported components, as much of NetBox's internal code base has been reorganized.
Modules & Module Types (#7844)
Several new models have been added to represent field-replaceable device modules, such as line cards installed within a chassis-based switch or router. Similar to devices, each module is instantiated from a user-defined module type, and can have components (interfaces, console ports, etc.) associated with it. These components become available to the parent device once the module has been installed within a module bay. This provides a convenient mechanism to effect the addition and deletion of device components as modules are installed and removed.
Automatic renaming of module components is also supported. When a new module is created, any occurrence of the string
{module}
in a component name will be replaced with the position of the module bay into which the module is being installed.As with device types, the NetBox community offers a selection of curated real-world module type definitions in our device type library. These YAML files can be imported directly to NetBox for your convenience.
Custom Object Fields (#7006)
Two new types of custom field have been introduced: object and multi-object. These can be used to associate an object in NetBox with some other arbitrary object(s) regardless of its type. For example, you might create a custom field named
primary_site
on the tenant model so that each tenant can have particular site designated as its primary. The multi-object custom field type allows for the assignment of multiple objects of the same type.Custom field object assignment is fully supported in the REST API, and functions similarly to built-in foreign key relations. Nested representations are provided automatically for each custom field object.
Custom Status Choices (#8054)
Custom choices can be now added to most object status fields in NetBox. This is done by defining the
FIELD_CHOICES
configuration parameter to map field identifiers to an iterable of custom choices an (optionally) colors. These choices are populated automatically when NetBox initializes. For example, the following configuration will add three custom choices for the site status field, each with a designated color:This will replace all default choices for this field with those listed. If instead the intent is to extend the set of default choices, this can be done by appending a plus sign (
+
) to the end of the field identifier. For example, the following will add a single extra choice while retaining the defaults provided by NetBox:Improved User Preferences (#7759)
A robust new mechanism for managing user preferences is included in this release. The user preferences form has been improved for better usability, and administrators can now define default preferences for all users with the
DEFAULT_USER_PREFERENCES
configuration parameter. For example, this can be used to define the columns which appear by default in a table:Users can adjust their own preferences under their user profile. A complete list of supported preferences is available in NetBox's developer documentation.
Inventory Item Roles (#3087)
A new model has been introduced to represent functional roles for inventory items, similar to device roles. The assignment of roles to inventory items is optional.
Inventory Item Templates (#8118)
Inventory items can now be templatized on a device type similar to other components (such as interfaces or console ports). This enables users to better pre-model fixed hardware components such as power supplies or hard disks.
Inventory item templates can be arranged hierarchically within a device type, and may be assigned to other templated components. These relationships will be mirrored when instantiating inventory items on a newly-created device (see #7846). For example, if defining an optic assigned to an interface template on a device type, the instantiated device will mimic this relationship between the optic and interface.
Service Templates (#1591)
A new service template model has been introduced to assist in standardizing the definition and association of applications with devices and virtual machines. As an alternative to manually defining a name, protocol, and port(s) each time a service is created, a user now has the option of selecting a pre-defined template from which these values will be populated.
Automatic Provisioning of Next Available VLANs (#2658)
A new REST API endpoint has been added at
/api/ipam/vlan-groups/<id>/available-vlans/
. A GET request to this endpoint will return a list of available VLANs within the group. A POST request can be made specifying the name(s) of one or more VLANs to create within the group, and their VLAN IDs will be assigned automatically from the available pool.Where it is desired to limit the range of available VLANs within a group, users can define a minimum and/or maximum VLAN ID per group (see #8168).
Enhancements
AUTH_PASSWORD_VALIDATORS
setting to enforce password validation for local accountsservice_id
field for provider networksspeed
andduplex
fields to device interface modelmin_vid
andmax_vid
fields to VLAN groupdata_type
indicator to REST API serializer for custom fieldscreated
field on all change-logged models from date to datetimepre_run()
method for reportslink
field for contactsNETBOX_CONFIGURATION
environment variableBug Fixes (From Beta2)
object_type
field on CustomField REST API serializerOther Changes
CSRF_TRUSTED_ORIGINS
is now a discrete configuration parameter (rather than being populated fromALLOWED_HOSTS
)obj
toobject
(backward-compatible)