-
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: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.4.4
Python version
3.8
Steps to Reproduce
- Create VRF "testvrf"
- Create prefix 192.168.0.0/24 in global VRF
- Create prefix 192.168.0.0/28 in "testvrf"
- Browse to 192.168.0.0/28 (which is where you'll be right after creation)
Expected Behavior
192.168.0.0/28@testvrf and 192.168.0.0/24 should be independent from each other, as they are in different VRFs.
Observed Behavior
192.168.0.0/28@testvrf sees 192.168.0.0/24 as its parent.
However, 192.168.0.0/24 does not see 192.168.0.0/28@testvrf as its child.
This is inconsistent: this child<->parent relationship should either work in both ways, or neither.
In this case, I think it should be neither: otherwise 192.168.0.0/24 could see many different prefixes and IP addresses in different VRFs as its children, which would mix lots of VRFs together in the same view.
EDIT: the current behaviour does appear to be intentional in the code:
# Parent prefixes table
parent_prefixes = Prefix.objects.restrict(request.user, 'view').filter(
Q(vrf=instance.vrf) | Q(vrf__isnull=True)
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
