Extra search parameters to for virtualization interfaces #3520

Closed
opened 2025-12-29 18:29:37 +01:00 by adam · 2 comments
Owner

Originally created by @richard-olson on GitHub (Mar 30, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.7.11

Proposed Functionality

Extra search parameters to for virtualization interfaces

Several fields already exist within the data model for a virtualization interface including VLAN and tag data. This FR proposes the ability to perform a search using these parameters in a similar fashion to the dcim interfaces where it makes sense, including:

  • vlan
  • vlan_id
  • mode
  • tag

At this stage it doesn't make sense to include information such as interface type (which is currently hard set to virtual), unless the data model is extended through another FR.

As a stretch request, it would be great to reproduce the dcim interfaces site and region search functionality within a virtual machine context as cluster and site (i.e. all clusters within a site).

This FR is not seeking a change to the UI at this stage only the API, as this would likely require reworking the UI to have similar functionality to dcim interfaces. I believe some of the search functionality for dcim interfaces is only available via the API (such as vlan & vlan_id) so this isn't without precedent.

Use Case

Similarly to dcim interfaces a Netbox user may wish to search for interfaces on virtual machines which match a particular VLAN or tag.

For example, interfaces may be tagged for monitoring systems - if "monitored" in vm_interface.tag it will be added to a management tool.

Another example is compiling a list of all VLANs used by virtual machines to add these to a report or perhaps extract for an IaC tool such as terraform to add to a virtualization cluster.

Database Changes

It's not believed that any database changes are necessary as this leverages the existing data model for virtualization interfaces.

External Dependencies

N/A

Originally created by @richard-olson on GitHub (Mar 30, 2020). ### Environment * Python version: 3.6.8 * NetBox version: 2.7.11 ### Proposed Functionality Extra search parameters to for virtualization interfaces Several fields already exist within the data model for a virtualization interface including VLAN and tag data. This FR proposes the ability to perform a search using these parameters in a similar fashion to the dcim interfaces where it makes sense, including: - vlan - vlan_id - mode - tag At this stage it doesn't make sense to include information such as interface type (which is currently hard set to virtual), unless the data model is extended through another FR. As a stretch request, it would be great to reproduce the dcim interfaces `site` and `region` search functionality within a virtual machine context as `cluster` and `site` (i.e. all clusters within a site). This FR is not seeking a change to the UI at this stage only the API, as this would likely require reworking the UI to have similar functionality to dcim interfaces. I believe some of the search functionality for dcim interfaces is only available via the API (such as vlan & vlan_id) so this isn't without precedent. ### Use Case Similarly to dcim interfaces a Netbox user may wish to search for interfaces on virtual machines which match a particular VLAN or tag. For example, interfaces may be tagged for monitoring systems - `if "monitored" in vm_interface.tag` it will be added to a management tool. Another example is compiling a list of all VLANs used by virtual machines to add these to a report or perhaps extract for an IaC tool such as terraform to add to a virtualization cluster. ### Database Changes It's not believed that any database changes are necessary as this leverages the existing data model for virtualization interfaces. ### External Dependencies N/A
adam added the pending closure label 2025-12-29 18:29:37 +01:00
adam closed this issue 2025-12-29 18:29:37 +01:00
Author
Owner

@stale[bot] commented on GitHub (Apr 13, 2020):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@stale[bot] commented on GitHub (Apr 13, 2020): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@stale[bot] commented on GitHub (Apr 20, 2020):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@stale[bot] commented on GitHub (Apr 20, 2020): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3520