mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
3.0 KiB
3.0 KiB
NetBox v3.0
v3.0-beta1 (FUTURE)
Breaking Changes
- The default CSV export format for all objects now includes all available data. Additionally, the CSV headers now use human-friendly titles rather than the raw field names.
New Features
Custom Model Validation (#5963)
This release introduces the CUSTOM_VALIDATORS
configuration parameter, which allows administrators to map NetBox models to custom validator classes to enforce custom validation logic. For example, the following configuration requires every site to have a name of at least ten characters and a description:
from extras.validators import CustomValidator
CUSTOM_VALIDATORS = {
'dcim.site': (
CustomValidator({
'name': {
'min_length': 10,
},
'description': {
'required': True,
}
}),
)
}
CustomValidator can also be subclassed to enforce more complex logic by overriding its validate()
method. See the custom validation documentation for more details.
Enhancements
- #2434 - Add option to assign IP address upon creating a new interface
- #3665 - Enable rendering export templates via REST API
- #4609 - Allow marking prefixes as fully utilized
- #5806 - Add kilometer and mile as choices for cable length unit
- #6154 - Allow decimal values for cable lengths
Other Changes
- #5532 - Drop support for Python 3.6
- #5994 - Drop support for
display_field
argument on ObjectVar - #6068 - Drop support for legacy static CSV export
- #6338 - Decimal fields are no longer coerced to strings in REST API
REST API Changes
- dcim.Cable
length
is now a decimal value
- dcim.Device
- Removed the
display_name
attribute (usedisplay
instead)
- Removed the
- dcim.DeviceType
- Removed the
display_name
attribute (usedisplay
instead)
- Removed the
- dcim.Rack
- Removed the
display_name
attribute (usedisplay
instead)
- Removed the
- dcim.Site
latitude
andlongitude
are now decimal fields rather than strings
- extras.ContentType
- Removed the
display_name
attribute (usedisplay
instead)
- Removed the
- ipam.Prefix
- Added the
mark_utilized
boolean field
- Added the
- ipam.VLAN
- Removed the
display_name
attribute (usedisplay
instead)
- Removed the
- ipam.VRF
- Removed the
display_name
attribute (usedisplay
instead)
- Removed the
- virtualization.VirtualMachine
vcpus
is now a decimal field rather than a string