Virtualization: filtering on cluster_id doesn't work #1232

Closed
opened 2025-12-29 16:30:26 +01:00 by adam · 1 comment
Owner

Originally created by @candlerb on GitHub (Sep 15, 2017).

Issue type

[ ] Feature request
[X] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: v2.2-beta1

Description

Filtering the virtual machines list by cluster doesn't work.

For example, if I select the name of the second cluster in the RHS and click search, it takes me to /virtualization/virtual-machines/?q=&cluster_id=2, but it still shows me all the virtual machines in both cluster 1 and cluster 2.

Originally created by @candlerb on GitHub (Sep 15, 2017). ### Issue type [ ] Feature request <!-- Requesting the implementation of a new feature --> [X] Bug report <!-- Reporting unexpected or erroneous behavior --> [ ] Documentation <!-- Proposing a modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: v2.2-beta1 ### Description Filtering the virtual machines list by cluster doesn't work. For example, if I select the name of the second cluster in the RHS and click search, it takes me to `/virtualization/virtual-machines/?q=&cluster_id=2`, but it still shows me all the virtual machines in both cluster 1 and cluster 2.
adam added the type: bug label 2025-12-29 16:30:26 +01:00
adam closed this issue 2025-12-29 16:30:26 +01:00
Author
Owner

@candlerb commented on GitHub (Sep 15, 2017):

Note: if I take a different route in the UI, which is to go to /virtualization/clusters/2/ and then click the number of VMs, it takes me to /virtualization/virtual-machines/?cluster=2 which does work.

So the problem is a disagreement as to whether the query should be for cluster=2 or cluster_id=2.

Checking the corresponding search for Device within Rack, it passes rack_id=N, so maybe it should be made consistent with that.

@candlerb commented on GitHub (Sep 15, 2017): Note: if I take a different route in the UI, which is to go to `/virtualization/clusters/2/` and then click the number of VMs, it takes me to `/virtualization/virtual-machines/?cluster=2` which *does* work. So the problem is a disagreement as to whether the query should be for `cluster=2` or `cluster_id=2`. Checking the corresponding search for Device within Rack, it passes `rack_id=N`, so maybe it should be made consistent with that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1232