-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
7699 Add Scope to Cluster #17848
base: feature
Are you sure you want to change the base?
7699 Add Scope to Cluster #17848
Conversation
@@ -148,7 +148,7 @@ def get_for_virtualmachine(self, vm): | |||
|
|||
# Find all relevant VLANGroups | |||
q = Q() | |||
site = vm.site or vm.cluster.site | |||
site = vm.site or vm.cluster._site |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be adapted for the other scope types as well, as VLAN groups can also be assigned to different scopes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? Not sure I follow this - this is for VLAN, not VLANGroup and any higher scope assignment will filter down to _site - so _site should pick up all the assignments?
FYI: I don't think the build breaking is from the PR, looks like from background task running... |
Fixes: #7699
Added mixins as well, not sure if they should be in netbox/ or dcim/ but the filtersets would need to be in something like filterset_mixins, so not sure if that is good. Can move them if desired.
Once this is approved will make a separate PR to move the already implemented scoped models to use these mixins.