-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Description
NetBox version
v2.11.4
Feature type
Change to existing functionality
Proposed functionality
Add two read-only fields to the REST API serializer for the ipam.Prefix model:
_depth: Depth in the prefix hierarchy (e.g. a root-level prefix will have a depth of zero)children: The number of child prefixes contained within this prefix
The leading underscore in the name of the depth field is consistent with models which employ MPTT to maintain a hierarchy, such as dcim.Region.
Use case
Following the work implemented under #6087, it is now possible to include this data with no performance impact.
Database changes
No response
External dependencies
No response
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application