Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot filter virtual machine interfaces #1557

Closed
hamishforbes opened this issue Oct 4, 2017 · 4 comments
Closed

Cannot filter virtual machine interfaces #1557

hamishforbes opened this issue Oct 4, 2017 · 4 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@hamishforbes
Copy link

hamishforbes commented Oct 4, 2017

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 2.7.5
  • NetBox version: 2.2-beta2

Description

Not sure if this counts as a bug or a feature request, but as far as I can tell there's no way to filter the /virtualisation/interfaces/ API endpoint?
The only way to determine which interfaces a VM has is to get all the interfaces and iterate over them clientside.

@jeremystretch jeremystretch added beta type: bug A confirmed report of unexpected behavior in the application labels Oct 6, 2017
@jeremystretch
Copy link
Member

We should probably just ditch the /api/virtualization/interfaces/ endpoint entirely. It's redundant to the DCIM-based endpoint.

@hamishforbes
Copy link
Author

hamishforbes commented Oct 6, 2017 via email

@jeremystretch
Copy link
Member

VirtualMachines and Clusters are their own discrete models with dedicated tables in the database, so they need their own endpoints. This is in contrast to the Interface model, which is actually shared by Devices and VirtualMachines.

@jeremystretch
Copy link
Member

After pondering this a bit more, it's cleaner to maintain a separate endpoint for VM interfaces. In addition to being more efficient (since the DCIM endpoint only pulls in devices and the virtualization endpoint only pulls in VMs), there's enough difference between the two interface representations to justify separate filters.

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants