NetBox v4.7.0-beta1 has been released! #22950
jeremystretch
announced in
Announcements
Replies: 1 comment
|
The public demo instance for the NetBox v4.7 beta is now online! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Caution
This is a beta release of NetBox intended for testing and evaluation. Do not use this software in production. Also be aware that no upgrade path is provided to future releases.
Warning
This release of NetBox drops support for PostgreSQL 14.
Warning
The PostgreSQL database must support the ltree extension. This is a trusted module which ships with PostgreSQL and does not require superuser permission to activate. It will be installed automatically upon upgrade.
Warning
This release of NetBox drops support for Redis 5.x.
Breaking Changes
{"value": "datacenter", "label": "Data Center"}) in both the REST and GraphQL APIs. These fields continue to accept the raw value on write.protocolandportsfields on theipam.Serviceandipam.ServiceTemplatemodels have been replaced by a unifiedport_mappingsfield, which supports multiple protocols per service. The legacy fields are retained (as deprecated) in the REST and GraphQL APIs, but at the ORM level they are now read-only properties derived fromport_mappings: Passingprotocolorportsto the model raises aTypeError, and assigning toservice.portsraises anAttributeError.protocolis now filtered against theport_mappingsarray rather than a dedicated model field, the character-based REST filter lookups previously generated for it (protocol__ic,protocol__isw,protocol__empty, etc.) are no longer available. Theport__emptylookup has been removed as well.ipam.Serviceandipam.ServiceTemplatehave changed shape: The nestedportsinteger lookup has been replaced by the flatport,port__gt,port__gte,port__lt, andport__lteparameters (each accepting a list of values), alongside the newport_mappingsparameter. Additionally, the members ofServiceProtocolEnumhave been renamed to drop a spuriousROLE_prefix (e.g.ROLE_TCPis nowTCP).DeviceWithConfigContextSerializerandVirtualMachineWithConfigContextSerializerclasses have been removed (merged into the base serializers), and the?exclude=config_contextquery parameter is now silently ignored.{"detail": ..., "errors": [{"index": N, "errors": {...}}]}, correlating each error with the index of the offending object in the submitted list. (Bulk operations remain all-or-none.)tokenfield is now read-only, and any value supplied is ignored. (This restriction was already in effect in the web UI.)ltreecolumn rather than django-mptt. The MPTT-backedNestedGroupModelbase class is retained for backward compatibility with plugins, but is deprecated: New code should useNestedLtreeGroupModelinstead.querystringtemplate tag toquerystring_replaceand removes theRelatedLinkColumnclass.requestobject passed to custom link templates is now a sanitized subset of the current request. Only theid,path,path_info,method,GET, anduserattributes are available; cookies, headers, and session state are no longer accessible.ALLOWED_URL_SCHEMESconfiguration parameter. A value entered without a scheme is assumed to usehttpsand stored as an absolute URL.RQ_DEFAULT_TIMEOUTto 60 seconds or less, you must also setWEBHOOK_DEFAULT_TIMEOUTto a lower value; NetBox will refuse to start otherwise.EMAILconfiguration parameter is now mandatory in order to send mail: A deployment which does not defineEMAIL['SERVER']will raise anInvalidMailerexception when attempting to send, rather than failing at the SMTP connection.rebuild_config_context_cachemanagement command to populate the new config context cache. This may extend the duration of the upgrade for deployments with a large number of devices and virtual machines.housekeepingmanagement command has been removed. (Its constituent tasks are performed by the individual management commands introduced in NetBox v4.6.)querystringtemplate tag has been removed in favor of Django's built-in tag of the same name.SENTRY_DSN,SENTRY_SAMPLE_RATE,SENTRY_SEND_DEFAULT_PII, andSENTRY_TRACES_SAMPLE_RATEhave been removed. UseSENTRY_CONFIGinstead.DEFAULT_ACTION_PERMISSIONSconstant has been removed.LEGACY_ACTIONSconstant has been removed.registry['models']. (UseObjectType.objects.public()instead.) Theregistry['denormalized_fields']store has been removed as well.OptionalLimitOffsetPagination(nowNetBoxPagination),ExpandableIPAddressField(nowExpandableIPNetworkField), andexpand_ipaddress_pattern()(nowexpand_ipnetwork_pattern()) have been removed.request_idandusernamekeys have been removed from the context available to outgoing webhooks. Userequest.idandrequest.userinstead.OwnerMixin(e.g.site_set) has been removed.New Features
Cooling Infrastructure Modeling (#22447)
NetBox has long modeled power distribution end to end, but had no equivalent for cooling. This release introduces a cooling data model which deliberately mirrors the power model, so that the concepts and workflows feel familiar.
Two new top-level models parallel PowerPanel and PowerFeed: CoolingSource represents facility-level cooling plant (a chiller, cooling tower, dry cooler, or facility water system) scoped to a site or location, and CoolingFeed represents a coolant loop delivered from a source to a rack. Two new device components parallel PowerPort and PowerOutlet: CoolingIntake represents a coolant intake on a device (e.g. a server cold-plate connection or a CDU's facility water inlet), and CoolingOutflow represents a coolant outlet on a CDU or manifold which supplies downstream equipment. Each intake may reference the upstream outflow which serves it, and both components have corresponding device type templates. CDUs and manifolds are modeled as ordinary devices carrying these components.
Lightweight descriptive attributes have also been added for users who want to record cooling characteristics without modeling the full plumbing: a
cooling_methodfield (air, liquid, hybrid, or immersion) on the Device, DeviceType, and ModuleType models, andcooling_capability(air-only, hybrid, or liquid-only) andcooling_capacityfields on the Rack and RackType models.Channelized Subinterfaces (#20972)
Channelized (breakout) interfaces can now be modeled natively. A new
channelsfield on the Interface model indicates the number of physical channels into which an interface is divided, and each channel is represented by a subinterface of the new genericchanneltype, bound to its parent via the newchannel_idfield. A single cable terminates to the channelized parent interface, and NetBox traces a distinct cable path for each channel subinterface. Both fields are available on interface templates as well.Multi-Protocol Application Services (#20285)
Application services and service templates can now expose the same port on multiple protocols — for example, DNS listening on both
tcp/53andudp/53. The single-protocolprotocolandportsfields have been replaced by a unifiedport_mappingsfield, represented in the APIs as a flat list ofprotocol/portstrings (e.g.["tcp/80", "udp/53"]). Newport_mappings,protocol, andportfilters are available in the UI and in both APIs, with the latter two correlated so that they must be satisfied by a single mapping.Module Bay Types (#19731)
A new ModuleBayType model has been introduced to convey which kinds of modules a module bay is able to accommodate (e.g. an SFP28 cage or a PCIe x16 slot). Bay types can be assigned to module bays, module bay templates, and module types; where both a bay and a module type declare bay types, NetBox validates that the two sets share at least one type in common before permitting installation. Bay types assigned to a module bay template propagate automatically to each instantiated module bay.
Relocating Installed Modules (#15289)
An installed module can now be moved to a different module bay, including a bay on a different device, rather than having to be deleted and recreated. A move relocates the module's entire subtree — its components, its own module bays, and any child modules installed within them — and re-resolves any component names, labels, and positions derived from the module type's templates for the destination bay. Cross-device moves are permitted only where the moved components carry no active topology or device-scoped configuration.
Background Processing for REST API Requests (#21992)
Bulk write operations via the REST API can now be processed as a background job rather than synchronously, avoiding proxy and gateway timeouts on large batches. Appending
?background=trueto a bulk write request enqueues a job and immediately returns anHTTP 202 Acceptedresponse containing the job's ID and URL; the job'sdatafield records the response the synchronous request would have returned. Note that validation is deferred to the worker, so a202response indicates only that the request was accepted, and the job's final status must be inspected to confirm the outcome.Per-Object Errors for Bulk Operations (#20054)
When a bulk create or update via the REST API fails validation, the response now identifies each offending object by its index within the submitted list, along with its specific field errors, rather than reporting only the first failure. This enables clients to correct and resubmit only the objects which actually failed.
Pre-Rendered Config Context Data (#21025)
Rather than compiling config context data on demand from the full set of applicable ConfigContext instances, NetBox now pre-renders each device's and virtual machine's merged context data and caches it on the object itself. The cache is invalidated automatically whenever an upstream change is detected — a config context being created, modified, or deleted, or a change to an attribute which determines which contexts apply — and repopulated by a non-blocking background job. During the brief window between invalidation and re-render, reads fall back to the original on-demand rendering path, so the data returned is always correct rather than stale.
Snapshot-Aware Event Rule Conditions (#18159)
Event rule conditions can now inspect the pre-change and post-change snapshots captured at the time of an event, rather than only the object's current data. New
changedandunchangedoperators compare an attribute's value across the two snapshots, and thesnapshots.prechange.<attr>andsnapshots.postchange.<attr>dot-path syntax exposes either snapshot to any standard operator. This makes it possible to express the long-requested "fire only when status changes to active" rule, avoiding webhooks and scripts triggered by unrelated updates. A newregexoperator has been added as well, and conditions which reference an attribute that cannot be resolved now fail closed and log an error rather than silently disabling the rule.Enhancements
mac_addressfieldis_primaryfield to the MAC address REST API representationFIELD_CHOICESend_of_lifedate field to device types and module types to aid in hardware lifecycle planningnulls_firstparameter to control the placement of empty values when ordering by a custom fieldWEBHOOK_DEFAULT_TIMEOUTconfiguration parameterBULK_UPDATE_CHUNK_SIZEconfiguration parameter to bound the number of rows affected by a single bulkUPDATEstatementALLOWED_URL_SCHEMESwhen validating URL custom field valuessocial-auth-coreto permit the installation of newer PyJWT versionsPerformance Improvements
ltreeimplementation for hierarchical modelsPlugins
GenericObjectChoiceFieldandGenericObjectFormMixinto represent a generic foreign key relation as a single form fieldEventRuleActionDeprecations
JINJA2_FILTERSconfiguration parameter has been renamed toJINJA_FILTERS. The old name remains supported, but will be removed in NetBox v5.0.form_factor,width,outer_width,outer_height,outer_depth, andouter_unitfields on the Rack model have been deprecated, and will be removed in NetBox v5.0. These values will instead be inferred from the rack's assigned rack type, which will become a mandatory assignment.protocolandportsfields on application services and service templates have been deprecated in favor ofport_mappings, and will be removed from the REST & GraphQL APIs in NetBox v5.0.NestedGroupModelbase class has been deprecated in favor ofNestedLtreeGroupModel, and will be removed in a future release.Other Changes
querystringtemplate tag in favor of Django's built-in tagNULLS NOT DISTINCThousekeepingmanagement commandDEFAULT_ACTION_PERMISSIONSconstantmodelskey from the application registryOptionalLimitOffsetPaginationExpandableIPAddressFieldexpand_ipaddress_pattern()*TestMixinsuffixOwnerMixinjinja_filters,get_jinja_context(),register_jinja_filters()) for consistency withJINJA_FILTERSAppConfig.ready()and break its import cyclerequest_idandusernamekeys from the webhook contextThis discussion was created from the release v4.7.0-beta1 - 2026-08-17.
All reactions