Allow VLAN filtering based on L2VPN termination #7324

Closed
opened 2025-12-29 20:21:48 +01:00 by adam · 4 comments
Owner

Originally created by @TheNetworkGuy on GitHub (Dec 6, 2022).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.3.9

Feature type

New functionality

Proposed functionality

Allow (API) filtering VLAN's based on L2VPN termination. Currently i can filter VLAN's based on description, ID etc. But not with their corresponding VXLAN VNI identifier.

If this functionality is already present in a different way (get all L2VPN's with linked VLAN's) then that would also fulfill our use-case.

Use case

This would allow us to get a list of all VLAN's which would be active in our VXLAN environment with the API call "L2VPN_termination__n='null'".

Database changes

No DB change required

External dependencies

No new external dependencies.

Originally created by @TheNetworkGuy on GitHub (Dec 6, 2022). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.3.9 ### Feature type New functionality ### Proposed functionality Allow (API) filtering VLAN's based on L2VPN termination. Currently i can filter VLAN's based on description, ID etc. But not with their corresponding VXLAN VNI identifier. If this functionality is already present in a different way (get all L2VPN's with linked VLAN's) then that would also fulfill our use-case. ### Use case This would allow us to get a list of all VLAN's which would be active in our VXLAN environment with the API call "L2VPN_termination__n='null'". ### Database changes No DB change required ### External dependencies No new external dependencies.
adam added the status: acceptedtype: feature labels 2025-12-29 20:21:48 +01:00
adam closed this issue 2025-12-29 20:21:50 +01:00
Author
Owner

@TheNetworkGuy commented on GitHub (Dec 9, 2022):

To comment on this issue, maybe we are trying to filter the wrong way around. Instead of filtering on the VLAN object we can also perform a query on the L2 Terminations object:

https://netbox.local/api/ipam/l2vpn-terminations/?assigned_object_type_id=49

@TheNetworkGuy commented on GitHub (Dec 9, 2022): To comment on this issue, maybe we are trying to filter the wrong way around. Instead of filtering on the VLAN object we can also perform a query on the L2 Terminations object: https://netbox.local/api/ipam/l2vpn-terminations/?assigned_object_type_id=49
Author
Owner

@abhi1693 commented on GitHub (Jan 13, 2023):

@jeremystretch I'd like to take this

@abhi1693 commented on GitHub (Jan 13, 2023): @jeremystretch I'd like to take this
Author
Owner

@kkthxbye-code commented on GitHub (Jan 13, 2023):

@abhi1693 - All yours.

@kkthxbye-code commented on GitHub (Jan 13, 2023): @abhi1693 - All yours.
Author
Owner

@jeremystretch commented on GitHub (Jan 20, 2023):

I've extended this functionality to device & VM interfaces as well in 4bfc3bf41.

@jeremystretch commented on GitHub (Jan 20, 2023): I've extended this functionality to device & VM interfaces as well in 4bfc3bf41.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7324