Add "has_virtual_device_context" filter to device filters in UI and API #9157

Closed
opened 2025-12-29 20:46:22 +01:00 by adam · 1 comment
Owner

Originally created by @SaschaSchwarzK on GitHub (Jan 26, 2024).

Originally assigned to: @arthanson on GitHub.

NetBox version

v3.7.1

Feature type

Change to existing functionality

Proposed functionality

The only way to find devices that have virtual device context is to get all virtual-device-contexts and extract the list of related devices from that. Similar to the has_primary_ip filter.

Use case

Get the list of devices with have or have not a virtual-device-context with a simple boolean filter.

Database changes

Not required

External dependencies

None

Originally created by @SaschaSchwarzK on GitHub (Jan 26, 2024). Originally assigned to: @arthanson on GitHub. ### NetBox version v3.7.1 ### Feature type Change to existing functionality ### Proposed functionality The only way to find devices that have virtual device context is to get all virtual-device-contexts and extract the list of related devices from that. Similar to the has_primary_ip filter. ### Use case Get the list of devices with have or have not a virtual-device-context with a simple boolean filter. ### Database changes Not required ### External dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 20:46:22 +01:00
adam closed this issue 2025-12-29 20:46:22 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 9, 2024):

There's ongoing work under #15237 to identify and test for missing filters. It hasn't yet expanded to checking reverse ForeignKey relationships but should eventually cover this sort of thing.

@jeremystretch commented on GitHub (Mar 9, 2024): There's ongoing work under #15237 to identify and test for missing filters. It hasn't yet expanded to checking reverse ForeignKey relationships but should eventually cover this sort of thing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9157