[PR #11180] [MERGED] Release v3.4.0 #13754

Closed
opened 2025-12-29 23:20:36 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/11180
Author: @jeremystretch
Created: 12/14/2022
Status: Merged
Merged: 12/14/2022
Merged by: @jeremystretch

Base: masterHead: develop


📝 Commits (10+)

  • 27d7274 #10172 upgrade Django to 4.1.1
  • ce6bf9e #10172 fixes for Django 4.1
  • cd5581a Merge pull request #10341 from netbox-community/10172-upgrade-django
  • 87af94a Merge branch 'develop' into feature
  • 6a9274a Closes #10314: Move clone() method from NetBoxModel to CloningMixin
  • 4208dbd Closes #10358: Raise minimum required PostgreSQL version from 10 to 11
  • 1eb0e5d Merge branch 'develop' into feature
  • 824b4e0 Add scheduling for reports and scripts
  • 25ac1ed Merge branch 'netbox-community:develop' into 8366-job-scheduling
  • ed3d04c Merge branch 'develop' into feature

📊 Changes

455 files changed (+15072 additions, -7138 deletions)

View changed files

📝 .github/ISSUE_TEMPLATE/bug_report.yaml (+2 -1)
📝 .github/ISSUE_TEMPLATE/feature_request.yaml (+1 -1)
📝 .github/workflows/ci.yml (+1 -1)
📝 base_requirements.txt (+2 -2)
📝 docs/configuration/data-validation.md (+3 -0)
📝 docs/configuration/miscellaneous.md (+16 -0)
📝 docs/configuration/required-parameters.md (+1 -1)
📝 docs/configuration/security.md (+8 -0)
📝 docs/configuration/system.md (+8 -0)
📝 docs/customization/custom-fields.md (+1 -0)
📝 docs/customization/custom-scripts.md (+3 -1)
📝 docs/customization/reports.md (+3 -1)
📝 docs/development/adding-models.md (+1 -1)
📝 docs/development/extending-models.md (+7 -3)
📝 docs/development/models.md (+1 -0)
docs/development/search.md (+37 -0)
📝 docs/features/customization.md (+2 -2)
📝 docs/features/devices-cabling.md (+4 -0)
📝 docs/features/journaling.md (+1 -1)
docs/features/search.md (+27 -0)

...and 80 more files

📄 Description

WARNING: NetBox v3.4 requires PostgreSQL 11 or later.

Breaking Changes

  • Device and virtual machine names are no longer case-sensitive. Attempting to create e.g. "device1" and "DEVICE1" within the same site will raise a validation error.
  • The asn, noc_contact, admin_contact, and portal_url fields have been removed from the provider model. Please replicate any data remaining in these fields to the ASN and contact models introduced in NetBox v3.1 prior to upgrading.
  • The content_type fields on the CustomLink and ExportTemplate models have been renamed to content_types and now support the assignment of multiple content types per object.
  • Within the Python API, the cf property on an object with custom fields now returns deserialized values. For example, a custom field referencing an object will return the object instance rather than its numeric ID. To access the raw serialized values, reference the object's custom_field_data attribute instead.
  • The NetBoxModelCSVForm class has been renamed to NetBoxModelImportForm. Backward compatability with the previous name has been retained for this release, but will be dropped in NetBox v3.5.

New Features

New Global Search (#10560)

NetBox's global search functionality has been completely overhauled and replaced by a new cache-based lookup. This new implementation provides a much faster, more intelligent search capability. Results are returned in order of precedence regardless of object type, and matching field values are highlighted in the results. Additionally, custom field values are now included in global search results (where enabled). Plugins can also register their own models with the new global search engine.

Virtual Device Contexts (#7854)

A new model representing virtual device contexts (VDCs) has been added. VDCs are logical partitions of resources within a device that can be managed independently. A VDC is created within a device and may have device interfaces assigned to it. An interface can be allocated to any number of VDCs on its device.

Saved Filters (#9623)

Object lists can be filtered by a variety of different fields and characteristics. Applied filters can now be saved for reuse. For example, the query string

?status=active&region_id=12&tenant=acme

can be saved and applied to future queries as

?filter=my-custom-filter

Saved filters can be kept private, or shared among NetBox users. They can be applied to both UI and REST API searches.

JSON/YAML Bulk Imports (#4347)

NetBox's bulk import feature, which was previously limited to CSV-formatted data for most types of objects, has been extended to accept data formatted in JSON or YAML as well. This enables users to directly import objects from a variety of sources without needing to first convert data to CSV. NetBox will attempt to automatically determine the format of import data if not specified by the user.

Update Existing Objects via Bulk Import (#7961)

NetBox's CSV-based bulk import functionality has been extended to support also modifying existing objects. When an id column is present in the import form, it will be used to infer the object to be modified, rather than a new object being created. All fields (columns) are optional when modifying existing objects.

Scheduled Reports & Scripts (#8366)

Reports and custom scripts can now be scheduled for execution at a desired future time. Background scheduling is handled entirely by the existing RQ workers; there is no need to configure additional tasks to support scheduled jobs. When creating a scheduled job, the user may optionally specify an interval at which the job will run repeatedly (e.g. every 24 hours).

API for Staged Changes (#10851)

This release introduces a new programmatic API that enables plugins and custom scripts to prepare changes in NetBox without actually committing them to the active database. To stage changes, create and activate a branch using the checkout() context manager. Any changes made within this context will be captured, recorded, and rolled back for future use. Once ready, a branch can be applied to the active database by calling merge().

NOTE: This feature is still under active development and considered experimental in nature. Its use in production is strongly discouraged at this time.

Enhancements

  • #815 - Enable specifying terminations when bulk importing circuits
  • #6003 - Enable the inclusion of custom field values in global search
  • #7376 - Enable the assignment of tags during CSV import
  • #8245 - Enable GraphQL filtering of related objects
  • #8274 - Enable associating a custom link with multiple object types
  • #8485 - Enable journaling for all organizational models
  • #8853 - Introduce the ALLOW_TOKEN_RETRIEVAL config parameter to restrict the display of API tokens
  • #9249 - Device and virtual machine names are no longer case-sensitive
  • #9478 - Add link_peers field to GraphQL types for cabled objects
  • #9654 - Add weight field to racks, device types, and module types
  • #9817 - Add assigned_object field to GraphQL type for IP addresses and L2VPN terminations
  • #9832 - Add mounting_depth field to rack model
  • #9892 - Add optional name field for FHRP groups
  • #10348 - Add decimal custom field type
  • #10371 - Add status field for modules
  • #10545 - Standardize the use of description and comments fields on all primary models
  • #10556 - Include a display field in all GraphQL object types
  • #10595 - Add GraphQL relationships for additional generic foreign key fields
  • #10675 - Add max_weight field to track maximum load capacity for racks
  • #10698 - Omit app label from content type in table columns
  • #10710 - Add status field to WirelessLAN
  • #10761 - Enable associating an export template with multiple object types
  • #10945 - Enable recurring execution of scheduled reports & scripts
  • #11022 - Introduce QUEUE_MAPPINGS configuration parameter to allow customization of background task prioritization

Bug Fixes (from v3.4-beta1)

  • #10946 - Fix AttributeError exception when viewing a device with a primary IP and no platform assigned
  • #10948 - Linkify primary IPs for VDCs
  • #10950 - Fix validation of VDC primary IPs
  • #10957 - Add missing VDCs column to interface tables
  • #10973 - Fix device links in VDC table
  • #10980 - Fix view tabs for plugin objects
  • #10982 - Catch NoReverseMatch exception when rendering tabs with no registered URL
  • #10984 - Fix navigation menu expansion for plugin menus comprising multiple words
  • #11000 - Improve validation of YAML-formatted import data
  • #11046 - Fix exception when caching very large field values for search
  • #11154 - Index VM interface MAC address and MTU for global search
  • #11171 - Fix querying of related objects under GraphQL API

Plugins API

  • #4751 - Enable embedding custom content on core list views via list_buttons() method
  • #8927 - Enable inclusion of plugin models in global search via SearchIndex
  • #9071 - Enable plugins to register top-level navigation menus using PluginMenu
  • #9072 - Enable registration of tabbed plugin views for core NetBox models
  • #9880 - Enable plugins to install and register other Django apps via django_apps attribute
  • #9887 - Inspect docs_url property to determine link to model documentation
  • #10314 - Move clone() method from NetBoxModel to CloningMixin
  • #10543 - Introduce get_plugin_config() utility function
  • #10739 - Introduce get_queryset() method on generic views

Other Changes

  • #9045 - Remove legacy ASN field from provider model
  • #9046 - Remove legacy contact fields from provider model
  • #10052 - The cf attribute on objects now returns deserialized custom field data
  • #10358 - Raise minimum required PostgreSQL version from 10 to 11
  • #10694 - Emit the post_save signal when creating device components in bulk
  • #10697 - Move application registry into core app
  • #10699 - Remove unused custom import_object() function
  • #10781 - Add support for Python v3.11
  • #10816 - Pass the current request as context when instantiating a FilterSet within UI views
  • #10820 - Switch timezone library from pytz to zoneinfo
  • #10821 - Enable data localization

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/11180 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/14/2022 **Status:** ✅ Merged **Merged:** 12/14/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `master` ← **Head:** `develop` --- ### 📝 Commits (10+) - [`27d7274`](https://github.com/netbox-community/netbox/commit/27d72746ca4aec377001cfc69fa416bf4bd652dc) #10172 upgrade Django to 4.1.1 - [`ce6bf9e`](https://github.com/netbox-community/netbox/commit/ce6bf9e5c1bc08edc80f6ea1e55cf1318ae6e14b) #10172 fixes for Django 4.1 - [`cd5581a`](https://github.com/netbox-community/netbox/commit/cd5581aada47c68dd568270f903a10e4eb632acb) Merge pull request #10341 from netbox-community/10172-upgrade-django - [`87af94a`](https://github.com/netbox-community/netbox/commit/87af94a7d2e23ae06396ebceddcc90fb505909aa) Merge branch 'develop' into feature - [`6a9274a`](https://github.com/netbox-community/netbox/commit/6a9274a95f87ad8c3c5dcdb1da47d6781d70a4da) Closes #10314: Move clone() method from NetBoxModel to CloningMixin - [`4208dbd`](https://github.com/netbox-community/netbox/commit/4208dbd514feb2a68bf89b969246cb03d2fdf3b5) Closes #10358: Raise minimum required PostgreSQL version from 10 to 11 - [`1eb0e5d`](https://github.com/netbox-community/netbox/commit/1eb0e5d307e362f12881e4dcb938dbeec736b804) Merge branch 'develop' into feature - [`824b4e0`](https://github.com/netbox-community/netbox/commit/824b4e0923f5d215153cf8623c5f20fc7190f857) Add scheduling for reports and scripts - [`25ac1ed`](https://github.com/netbox-community/netbox/commit/25ac1edb4859d9341a05680371588d86885a49e1) Merge branch 'netbox-community:develop' into 8366-job-scheduling - [`ed3d04c`](https://github.com/netbox-community/netbox/commit/ed3d04c7ba03994a7c32e7ce6fb8e058bafedc11) Merge branch 'develop' into feature ### 📊 Changes **455 files changed** (+15072 additions, -7138 deletions) <details> <summary>View changed files</summary> 📝 `.github/ISSUE_TEMPLATE/bug_report.yaml` (+2 -1) 📝 `.github/ISSUE_TEMPLATE/feature_request.yaml` (+1 -1) 📝 `.github/workflows/ci.yml` (+1 -1) 📝 `base_requirements.txt` (+2 -2) 📝 `docs/configuration/data-validation.md` (+3 -0) 📝 `docs/configuration/miscellaneous.md` (+16 -0) 📝 `docs/configuration/required-parameters.md` (+1 -1) 📝 `docs/configuration/security.md` (+8 -0) 📝 `docs/configuration/system.md` (+8 -0) 📝 `docs/customization/custom-fields.md` (+1 -0) 📝 `docs/customization/custom-scripts.md` (+3 -1) 📝 `docs/customization/reports.md` (+3 -1) 📝 `docs/development/adding-models.md` (+1 -1) 📝 `docs/development/extending-models.md` (+7 -3) 📝 `docs/development/models.md` (+1 -0) ➕ `docs/development/search.md` (+37 -0) 📝 `docs/features/customization.md` (+2 -2) 📝 `docs/features/devices-cabling.md` (+4 -0) 📝 `docs/features/journaling.md` (+1 -1) ➕ `docs/features/search.md` (+27 -0) _...and 80 more files_ </details> ### 📄 Description **WARNING:** NetBox v3.4 requires PostgreSQL 11 or later. ### Breaking Changes * Device and virtual machine names are no longer case-sensitive. Attempting to create e.g. "device1" and "DEVICE1" within the same site will raise a validation error. * The `asn`, `noc_contact`, `admin_contact`, and `portal_url` fields have been removed from the provider model. Please replicate any data remaining in these fields to the ASN and contact models introduced in NetBox v3.1 prior to upgrading. * The `content_type` fields on the CustomLink and ExportTemplate models have been renamed to `content_types` and now support the assignment of multiple content types per object. * Within the Python API, the `cf` property on an object with custom fields now returns deserialized values. For example, a custom field referencing an object will return the object instance rather than its numeric ID. To access the raw serialized values, reference the object's `custom_field_data` attribute instead. * The `NetBoxModelCSVForm` class has been renamed to `NetBoxModelImportForm`. Backward compatability with the previous name has been retained for this release, but will be dropped in NetBox v3.5. ### New Features #### New Global Search ([#10560](https://github.com/netbox-community/netbox/issues/10560)) NetBox's global search functionality has been completely overhauled and replaced by a new cache-based lookup. This new implementation provides a much faster, more intelligent search capability. Results are returned in order of precedence regardless of object type, and matching field values are highlighted in the results. Additionally, custom field values are now included in global search results (where enabled). Plugins can also register their own models with the new global search engine. #### Virtual Device Contexts ([#7854](https://github.com/netbox-community/netbox/issues/7854)) A new model representing virtual device contexts (VDCs) has been added. VDCs are logical partitions of resources within a device that can be managed independently. A VDC is created within a device and may have device interfaces assigned to it. An interface can be allocated to any number of VDCs on its device. #### Saved Filters ([#9623](https://github.com/netbox-community/netbox/issues/9623)) Object lists can be filtered by a variety of different fields and characteristics. Applied filters can now be saved for reuse. For example, the query string ``` ?status=active&region_id=12&tenant=acme ``` can be saved and applied to future queries as ``` ?filter=my-custom-filter ``` Saved filters can be kept private, or shared among NetBox users. They can be applied to both UI and REST API searches. #### JSON/YAML Bulk Imports ([#4347](https://github.com/netbox-community/netbox/issues/4347)) NetBox's bulk import feature, which was previously limited to CSV-formatted data for most types of objects, has been extended to accept data formatted in JSON or YAML as well. This enables users to directly import objects from a variety of sources without needing to first convert data to CSV. NetBox will attempt to automatically determine the format of import data if not specified by the user. #### Update Existing Objects via Bulk Import ([#7961](https://github.com/netbox-community/netbox/issues/7961)) NetBox's CSV-based bulk import functionality has been extended to support also modifying existing objects. When an `id` column is present in the import form, it will be used to infer the object to be modified, rather than a new object being created. All fields (columns) are optional when modifying existing objects. #### Scheduled Reports & Scripts ([#8366](https://github.com/netbox-community/netbox/issues/8366)) Reports and custom scripts can now be scheduled for execution at a desired future time. Background scheduling is handled entirely by the existing RQ workers; there is no need to configure additional tasks to support scheduled jobs. When creating a scheduled job, the user may optionally specify an interval at which the job will run repeatedly (e.g. every 24 hours). #### API for Staged Changes ([#10851](https://github.com/netbox-community/netbox/issues/10851)) This release introduces a new programmatic API that enables plugins and custom scripts to prepare changes in NetBox without actually committing them to the active database. To stage changes, create and activate a branch using the `checkout()` context manager. Any changes made within this context will be captured, recorded, and rolled back for future use. Once ready, a branch can be applied to the active database by calling `merge()`. **NOTE:** This feature is still under active development and considered experimental in nature. Its use in production is strongly discouraged at this time. ### Enhancements * [#815](https://github.com/netbox-community/netbox/issues/815) - Enable specifying terminations when bulk importing circuits * [#6003](https://github.com/netbox-community/netbox/issues/6003) - Enable the inclusion of custom field values in global search * [#7376](https://github.com/netbox-community/netbox/issues/7376) - Enable the assignment of tags during CSV import * [#8245](https://github.com/netbox-community/netbox/issues/8245) - Enable GraphQL filtering of related objects * [#8274](https://github.com/netbox-community/netbox/issues/8274) - Enable associating a custom link with multiple object types * [#8485](https://github.com/netbox-community/netbox/issues/8485) - Enable journaling for all organizational models * [#8853](https://github.com/netbox-community/netbox/issues/8853) - Introduce the `ALLOW_TOKEN_RETRIEVAL` config parameter to restrict the display of API tokens * [#9249](https://github.com/netbox-community/netbox/issues/9249) - Device and virtual machine names are no longer case-sensitive * [#9478](https://github.com/netbox-community/netbox/issues/9478) - Add `link_peers` field to GraphQL types for cabled objects * [#9654](https://github.com/netbox-community/netbox/issues/9654) - Add `weight` field to racks, device types, and module types * [#9817](https://github.com/netbox-community/netbox/issues/9817) - Add `assigned_object` field to GraphQL type for IP addresses and L2VPN terminations * [#9832](https://github.com/netbox-community/netbox/issues/9832) - Add `mounting_depth` field to rack model * [#9892](https://github.com/netbox-community/netbox/issues/9892) - Add optional `name` field for FHRP groups * [#10348](https://github.com/netbox-community/netbox/issues/10348) - Add decimal custom field type * [#10371](https://github.com/netbox-community/netbox/issues/10371) - Add `status` field for modules * [#10545](https://github.com/netbox-community/netbox/issues/10545) - Standardize the use of `description` and `comments` fields on all primary models * [#10556](https://github.com/netbox-community/netbox/issues/10556) - Include a `display` field in all GraphQL object types * [#10595](https://github.com/netbox-community/netbox/issues/10595) - Add GraphQL relationships for additional generic foreign key fields * [#10675](https://github.com/netbox-community/netbox/issues/10675) - Add `max_weight` field to track maximum load capacity for racks * [#10698](https://github.com/netbox-community/netbox/issues/10698) - Omit app label from content type in table columns * [#10710](https://github.com/netbox-community/netbox/issues/10710) - Add `status` field to WirelessLAN * [#10761](https://github.com/netbox-community/netbox/issues/10761) - Enable associating an export template with multiple object types * [#10945](https://github.com/netbox-community/netbox/issues/10945) - Enable recurring execution of scheduled reports & scripts * [#11022](https://github.com/netbox-community/netbox/issues/11022) - Introduce `QUEUE_MAPPINGS` configuration parameter to allow customization of background task prioritization ### Bug Fixes (from v3.4-beta1) * [#10946](https://github.com/netbox-community/netbox/issues/10946) - Fix AttributeError exception when viewing a device with a primary IP and no platform assigned * [#10948](https://github.com/netbox-community/netbox/issues/10948) - Linkify primary IPs for VDCs * [#10950](https://github.com/netbox-community/netbox/issues/10950) - Fix validation of VDC primary IPs * [#10957](https://github.com/netbox-community/netbox/issues/10957) - Add missing VDCs column to interface tables * [#10973](https://github.com/netbox-community/netbox/issues/10973) - Fix device links in VDC table * [#10980](https://github.com/netbox-community/netbox/issues/10980) - Fix view tabs for plugin objects * [#10982](https://github.com/netbox-community/netbox/issues/10982) - Catch `NoReverseMatch` exception when rendering tabs with no registered URL * [#10984](https://github.com/netbox-community/netbox/issues/10984) - Fix navigation menu expansion for plugin menus comprising multiple words * [#11000](https://github.com/netbox-community/netbox/issues/11000) - Improve validation of YAML-formatted import data * [#11046](https://github.com/netbox-community/netbox/issues/11046) - Fix exception when caching very large field values for search * [#11154](https://github.com/netbox-community/netbox/issues/11154) - Index VM interface MAC address and MTU for global search * [#11171](https://github.com/netbox-community/netbox/issues/11171) - Fix querying of related objects under GraphQL API ### Plugins API * [#4751](https://github.com/netbox-community/netbox/issues/4751) - Enable embedding custom content on core list views via `list_buttons()` method * [#8927](https://github.com/netbox-community/netbox/issues/8927) - Enable inclusion of plugin models in global search via `SearchIndex` * [#9071](https://github.com/netbox-community/netbox/issues/9071) - Enable plugins to register top-level navigation menus using PluginMenu * [#9072](https://github.com/netbox-community/netbox/issues/9072) - Enable registration of tabbed plugin views for core NetBox models * [#9880](https://github.com/netbox-community/netbox/issues/9880) - Enable plugins to install and register other Django apps via `django_apps` attribute * [#9887](https://github.com/netbox-community/netbox/issues/9887) - Inspect `docs_url` property to determine link to model documentation * [#10314](https://github.com/netbox-community/netbox/issues/10314) - Move `clone()` method from NetBoxModel to CloningMixin * [#10543](https://github.com/netbox-community/netbox/issues/10543) - Introduce `get_plugin_config()` utility function * [#10739](https://github.com/netbox-community/netbox/issues/10739) - Introduce `get_queryset()` method on generic views ### Other Changes * [#9045](https://github.com/netbox-community/netbox/issues/9045) - Remove legacy ASN field from provider model * [#9046](https://github.com/netbox-community/netbox/issues/9046) - Remove legacy contact fields from provider model * [#10052](https://github.com/netbox-community/netbox/issues/10052) - The `cf` attribute on objects now returns deserialized custom field data * [#10358](https://github.com/netbox-community/netbox/issues/10358) - Raise minimum required PostgreSQL version from 10 to 11 * [#10694](https://github.com/netbox-community/netbox/issues/10694) - Emit the `post_save` signal when creating device components in bulk * [#10697](https://github.com/netbox-community/netbox/issues/10697) - Move application registry into core app * [#10699](https://github.com/netbox-community/netbox/issues/10699) - Remove unused custom `import_object()` function * [#10781](https://github.com/netbox-community/netbox/issues/10781) - Add support for Python v3.11 * [#10816](https://github.com/netbox-community/netbox/issues/10816) - Pass the current request as context when instantiating a FilterSet within UI views * [#10820](https://github.com/netbox-community/netbox/issues/10820) - Switch timezone library from pytz to zoneinfo * [#10821](https://github.com/netbox-community/netbox/issues/10821) - Enable data localization --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:20:36 +01:00
adam closed this issue 2025-12-29 23:20:36 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13754