Add a GenericRelation "mac_addresses" to BaseInterface #1142

Closed
opened 2026-04-05 21:07:03 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @bctiemann on 10/3/2025

Fixes: #19720

Adds a GenericRelation to BaseInterface providing a reverse lookup interface which can be used in MACAddress queries against the assigned_object field (a GFK to Interface or VMInterface), for example in permissions:

Screenshot 2025-10-02 at 10 04 44 PM

Note that this lookup will be called interface regardless of whether the target object is an Interface or a VMInterface.

*Originally created by @bctiemann on 10/3/2025* ### Fixes: #19720 Adds a `GenericRelation` to `BaseInterface` providing a reverse lookup `interface` which can be used in `MACAddress` queries against the `assigned_object` field (a GFK to `Interface` or `VMInterface`), for example in permissions: <img width="793" height="669" alt="Screenshot 2025-10-02 at 10 04 44 PM" src="https://github.com/user-attachments/assets/9230b102-d7ba-4c34-ab0a-93e09f338039" /> Note that this lookup will be called `interface` regardless of whether the target object is an `Interface` or a `VMInterface`.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1142