[PR #1913] [MERGED] Release v2.3.0 #12283

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/1913
Author: @jeremystretch
Created: 2/26/2018
Status: Merged
Merged: 2/26/2018
Merged by: @jeremystretch

Base: masterHead: develop


📝 Commits (10+)

  • 198170c Closes #1553: Introduced support for bulk object creation via the API
  • 593ae29 Removed prefix parent filter (see #1684)
  • c3e5106 Restored search method on prefix filter
  • 4f2dc50 Extended prefix 'available-ips' endpoint to accept multiple objects (related to #1553)
  • e01e5e6 Standardize on JSON data format for all POST/PUT test client requests
  • 5d46a11 #1694: Initial work on "next available" prefix provisioning
  • 3df8c63 Merge branch 'develop' into develop-2.3
  • 5c13382 Closes #1706: Added deprecation warning for Python 2
  • ba42ad2 Merge branch '150-interface-vlans' into develop-2.3
  • 04ba57c Fixed up validation of Interface VLAN assignments

📊 Changes

91 files changed (+4632 additions, -1145 deletions)

View changed files

📝 docs/data-model/dcim.md (+8 -0)
📝 docs/installation/netbox.md (+1 -3)
📝 netbox/circuits/api/serializers.py (+9 -7)
📝 netbox/circuits/api/views.py (+4 -5)
📝 netbox/circuits/constants.py (+16 -0)
📝 netbox/circuits/filters.py (+5 -0)
📝 netbox/circuits/forms.py (+21 -4)
netbox/circuits/migrations/0010_circuit_status.py (+20 -0)
📝 netbox/circuits/models.py (+10 -2)
📝 netbox/circuits/tables.py (+6 -1)
📝 netbox/circuits/tests/test_api.py (+63 -8)
📝 netbox/dcim/api/serializers.py (+102 -19)
📝 netbox/dcim/api/urls.py (+3 -0)
📝 netbox/dcim/api/views.py (+39 -33)
📝 netbox/dcim/apps.py (+3 -0)
📝 netbox/dcim/constants.py (+34 -15)
📝 netbox/dcim/filters.py (+79 -4)
📝 netbox/dcim/forms.py (+473 -50)
netbox/dcim/migrations/0050_interface_vlan_tagging.py (+32 -0)
netbox/dcim/migrations/0051_rackreservation_tenant.py (+22 -0)

...and 71 more files

📄 Description

New Features

Virtual Chassis (#99)

A virtual chassis represents a set of physical devices with a shared control plane; for example, a stack of switches managed as a single device. Viewing the master device of a virtual chassis will show all member interfaces and IP addresses.

Interface VLAN Assignments (#150)

Interfaces can now be assigned an 802.1Q mode (access or trunked) and associated with particular VLANs. Thanks to John Anderson for his work on this!

Bulk Object Creation via the API (#1553)

The REST API now supports the creation of multiple objects of the same type using a single POST request. For example, to create multiple devices:

curl -X POST -H "Authorization: Token <TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/dcim/devices/ --data '[
{"name": "device1", "device_type": 24, "device_role": 17, "site": 6},
{"name": "device2", "device_type": 24, "device_role": 17, "site": 6},
{"name": "device3", "device_type": 24, "device_role": 17, "site": 6},
]'

Bulk creation is all-or-none: If any of the creations fails, the entire operation is rolled back.

Automatic Provisioning of Next Available Prefixes (#1694)

Similar to IP addresses, NetBox now supports automated provisioning of available prefixes from within a parent prefix. For example, to retrieve the next three available /28s within a parent /24:

curl -X POST -H "Authorization: Token <TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/ipam/prefixes/10153/available-prefixes/ --data '[
{"prefix_length": 28},
{"prefix_length": 28},
{"prefix_length": 28}
]'

If the parent prefix cannot accommodate all requested prefixes, the operation is cancelled and no new prefixes are created.

Bulk Renaming of Device/VM Components (#1781)

Device components (interfaces, console ports, etc.) can now be renamed in bulk via the web interface. This was implemented primarily to support the bulk renumbering of interfaces whose parent is part of a virtual chassis.

Enhancements

  • #1283 - Added a time_zone field to the site model
  • #1321 - Added created and last_updated fields for relevant models to their API serializers
  • #1553 - Introduced support for bulk object creation via the API
  • #1592 - Added tenancy assignment for rack reservations
  • #1744 - Allow associating a platform with a specific manufacturer
  • #1758 - Added a status field to the site model
  • #1821 - Added a description field to the site model
  • #1864 - Added a status field to the circuit model

Bug Fixes

  • #1136 - Enforce model validation during bulk update
  • #1645 - Simplified interface serialzier for IP addresses and optimized API view queryset
  • #1838 - Fix KeyError when attempting to create a VirtualChassis with no devices selected
  • #1847 - RecursionError when a virtual chasis master device has no name
  • #1848 - Allow null value for interface encapsulation mode
  • #1867 - Allow filtering on device status with multiple values
  • #1881* - Fixed bulk editing of interface 802.1Q settings
  • #1884* - Provide additional context to identify devices when creating/editing a virtual chassis
  • #1907 - Allow removing an IP as the primary for a device when editing the IP directly

* New since v2.3-beta2

Breaking Changes

  • Constants representing device status have been renamed for clarity (for example, STATUS_ACTIVE is now DEVICE_STATUS_ACTIVE). Custom validation reports will need to be updated if they reference any of these constants.

API Changes

  • API creation calls now accept either a single JSON object or a list of JSON objects. If multiple objects are passed and one or more them fail validation, no objects will be created.
  • Added created and last_updated fields for objects inheriting from CreatedUpdatedModel.
  • Removed the parent filter for prefixes (use within or within_include instead).
  • The IP address serializer now includes only a minimal nested representation of the assigned interface (if any) and its parent device or virtual machine.
  • The rack reservation serializer now includes a nested representation of its owning user (as well as the assigned tenant, if any).
  • Added endpoints for virtual chassis and VC memberships.
  • Added status, time_zone (pytz format), and description fields to dcim.Site.
  • Added a manufacturer foreign key field on dcim.Platform.
  • Added a status field on circuits.Circuit.

🔄 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/1913 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/26/2018 **Status:** ✅ Merged **Merged:** 2/26/2018 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `master` ← **Head:** `develop` --- ### 📝 Commits (10+) - [`198170c`](https://github.com/netbox-community/netbox/commit/198170ca48504f7d0d5861513dcac6e2ba287e8d) Closes #1553: Introduced support for bulk object creation via the API - [`593ae29`](https://github.com/netbox-community/netbox/commit/593ae295e393553d98b4eb6faf9fbc6d9be4e4f4) Removed prefix `parent` filter (see #1684) - [`c3e5106`](https://github.com/netbox-community/netbox/commit/c3e5106b04171ae2ac76c582ee71b9e2e05d4299) Restored search method on prefix filter - [`4f2dc50`](https://github.com/netbox-community/netbox/commit/4f2dc50b5c23c064a7137774e6c0fe25ec55299d) Extended prefix 'available-ips' endpoint to accept multiple objects (related to #1553) - [`e01e5e6`](https://github.com/netbox-community/netbox/commit/e01e5e6b0e5e31cfdd44bdaafc2267881512a6b4) Standardize on JSON data format for all POST/PUT test client requests - [`5d46a11`](https://github.com/netbox-community/netbox/commit/5d46a112f808ff197af29c643418784075134bd6) #1694: Initial work on "next available" prefix provisioning - [`3df8c63`](https://github.com/netbox-community/netbox/commit/3df8c63d5ca37b5673cf3fbba2f6618b8f1aea69) Merge branch 'develop' into develop-2.3 - [`5c13382`](https://github.com/netbox-community/netbox/commit/5c1338207127f139fff587512cee991b8335e57e) Closes #1706: Added deprecation warning for Python 2 - [`ba42ad2`](https://github.com/netbox-community/netbox/commit/ba42ad211596725a359d6b70efbca4dfc32460db) Merge branch '150-interface-vlans' into develop-2.3 - [`04ba57c`](https://github.com/netbox-community/netbox/commit/04ba57cb385dbf4e334fd529a0a9a16e7dcc02b8) Fixed up validation of Interface VLAN assignments ### 📊 Changes **91 files changed** (+4632 additions, -1145 deletions) <details> <summary>View changed files</summary> 📝 `docs/data-model/dcim.md` (+8 -0) 📝 `docs/installation/netbox.md` (+1 -3) 📝 `netbox/circuits/api/serializers.py` (+9 -7) 📝 `netbox/circuits/api/views.py` (+4 -5) 📝 `netbox/circuits/constants.py` (+16 -0) 📝 `netbox/circuits/filters.py` (+5 -0) 📝 `netbox/circuits/forms.py` (+21 -4) ➕ `netbox/circuits/migrations/0010_circuit_status.py` (+20 -0) 📝 `netbox/circuits/models.py` (+10 -2) 📝 `netbox/circuits/tables.py` (+6 -1) 📝 `netbox/circuits/tests/test_api.py` (+63 -8) 📝 `netbox/dcim/api/serializers.py` (+102 -19) 📝 `netbox/dcim/api/urls.py` (+3 -0) 📝 `netbox/dcim/api/views.py` (+39 -33) 📝 `netbox/dcim/apps.py` (+3 -0) 📝 `netbox/dcim/constants.py` (+34 -15) 📝 `netbox/dcim/filters.py` (+79 -4) 📝 `netbox/dcim/forms.py` (+473 -50) ➕ `netbox/dcim/migrations/0050_interface_vlan_tagging.py` (+32 -0) ➕ `netbox/dcim/migrations/0051_rackreservation_tenant.py` (+22 -0) _...and 71 more files_ </details> ### 📄 Description ## New Features ### Virtual Chassis ([#99](https://github.com/digitalocean/netbox/issues/99)) A virtual chassis represents a set of physical devices with a shared control plane; for example, a stack of switches managed as a single device. Viewing the master device of a virtual chassis will show all member interfaces and IP addresses. ### Interface VLAN Assignments ([#150](https://github.com/digitalocean/netbox/issues/150)) Interfaces can now be assigned an 802.1Q mode (access or trunked) and associated with particular VLANs. Thanks to [John Anderson](https://github.com/lampwins) for his work on this! ### Bulk Object Creation via the API ([#1553](https://github.com/digitalocean/netbox/issues/1553)) The REST API now supports the creation of multiple objects of the same type using a single POST request. For example, to create multiple devices: ``` curl -X POST -H "Authorization: Token <TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/dcim/devices/ --data '[ {"name": "device1", "device_type": 24, "device_role": 17, "site": 6}, {"name": "device2", "device_type": 24, "device_role": 17, "site": 6}, {"name": "device3", "device_type": 24, "device_role": 17, "site": 6}, ]' ``` Bulk creation is all-or-none: If any of the creations fails, the entire operation is rolled back. ### Automatic Provisioning of Next Available Prefixes ([#1694](https://github.com/digitalocean/netbox/issues/1694)) Similar to IP addresses, NetBox now supports automated provisioning of available prefixes from within a parent prefix. For example, to retrieve the next three available /28s within a parent /24: ``` curl -X POST -H "Authorization: Token <TOKEN>" -H "Content-Type: application/json" -H "Accept: application/json; indent=4" http://localhost:8000/api/ipam/prefixes/10153/available-prefixes/ --data '[ {"prefix_length": 28}, {"prefix_length": 28}, {"prefix_length": 28} ]' ``` If the parent prefix cannot accommodate all requested prefixes, the operation is cancelled and no new prefixes are created. ### Bulk Renaming of Device/VM Components ([#1781](https://github.com/digitalocean/netbox/issues/1781)) Device components (interfaces, console ports, etc.) can now be renamed in bulk via the web interface. This was implemented primarily to support the bulk renumbering of interfaces whose parent is part of a virtual chassis. ## Enhancements * [#1283](https://github.com/digitalocean/netbox/issues/1283) - Added a `time_zone` field to the site model * [#1321](https://github.com/digitalocean/netbox/issues/1321) - Added `created` and `last_updated` fields for relevant models to their API serializers * [#1553](https://github.com/digitalocean/netbox/issues/1553) - Introduced support for bulk object creation via the API * [#1592](https://github.com/digitalocean/netbox/issues/1592) - Added tenancy assignment for rack reservations * [#1744](https://github.com/digitalocean/netbox/issues/1744) - Allow associating a platform with a specific manufacturer * [#1758](https://github.com/digitalocean/netbox/issues/1758) - Added a `status` field to the site model * [#1821](https://github.com/digitalocean/netbox/issues/1821) - Added a `description` field to the site model * [#1864](https://github.com/digitalocean/netbox/issues/1864) - Added a `status` field to the circuit model ## Bug Fixes * [#1136](https://github.com/digitalocean/netbox/issues/1136) - Enforce model validation during bulk update * [#1645](https://github.com/digitalocean/netbox/issues/1645) - Simplified interface serialzier for IP addresses and optimized API view queryset * [#1838](https://github.com/digitalocean/netbox/issues/1838) - Fix KeyError when attempting to create a VirtualChassis with no devices selected * [#1847](https://github.com/digitalocean/netbox/issues/1847) - RecursionError when a virtual chasis master device has no name * [#1848](https://github.com/digitalocean/netbox/issues/1848) - Allow null value for interface encapsulation mode * [#1867](https://github.com/digitalocean/netbox/issues/1867) - Allow filtering on device status with multiple values * [#1881](https://github.com/digitalocean/netbox/issues/1881)* - Fixed bulk editing of interface 802.1Q settings * [#1884](https://github.com/digitalocean/netbox/issues/1884)* - Provide additional context to identify devices when creating/editing a virtual chassis * [#1907](https://github.com/digitalocean/netbox/issues/1907) - Allow removing an IP as the primary for a device when editing the IP directly \* New since v2.3-beta2 ## Breaking Changes * Constants representing device status have been renamed for clarity (for example, `STATUS_ACTIVE` is now `DEVICE_STATUS_ACTIVE`). Custom validation reports will need to be updated if they reference any of these constants. ## API Changes * API creation calls now accept either a single JSON object or a list of JSON objects. If multiple objects are passed and one or more them fail validation, no objects will be created. * Added `created` and `last_updated` fields for objects inheriting from CreatedUpdatedModel. * Removed the `parent` filter for prefixes (use `within` or `within_include` instead). * The IP address serializer now includes only a minimal nested representation of the assigned interface (if any) and its parent device or virtual machine. * The rack reservation serializer now includes a nested representation of its owning user (as well as the assigned tenant, if any). * Added endpoints for virtual chassis and VC memberships. * Added `status`, `time_zone` (pytz format), and `description` fields to dcim.Site. * Added a `manufacturer` foreign key field on dcim.Platform. * Added a `status` field on circuits.Circuit. --- <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 22:20:39 +01:00
adam closed this issue 2025-12-29 22:20:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12283