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

7699 Add Scope to Cluster #17848

Open
wants to merge 32 commits into
base: feature
Choose a base branch
from
Open

7699 Add Scope to Cluster #17848

wants to merge 32 commits into from

Conversation

arthanson
Copy link
Collaborator

@arthanson arthanson commented Oct 23, 2024

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.

@arthanson arthanson changed the base branch from develop to feature October 23, 2024 21:40
@arthanson arthanson changed the title DRAFT: 7699 Add Scope to Cluster 7699 Add Scope to Cluster Oct 24, 2024
@arthanson arthanson marked this pull request as ready for review October 24, 2024 20:12
@jeremystretch jeremystretch added this to the v4.2 milestone Oct 25, 2024
netbox/virtualization/constants.py Outdated Show resolved Hide resolved
netbox/virtualization/models/clusters.py Show resolved Hide resolved
netbox/virtualization/models/clusters.py Outdated Show resolved Hide resolved
netbox/netbox/models/features.py Outdated Show resolved Hide resolved
docs/models/virtualization/cluster.md Outdated Show resolved Hide resolved
netbox/dcim/graphql/types.py Show resolved Hide resolved
netbox/dcim/models/devices.py Show resolved Hide resolved
@@ -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
Copy link
Member

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.

Copy link
Collaborator Author

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?

netbox/netbox/filtersets.py Outdated Show resolved Hide resolved
netbox/virtualization/tables/clusters.py Outdated Show resolved Hide resolved
@arthanson
Copy link
Collaborator Author

FYI: I don't think the build breaking is from the PR, looks like from background task running...

netbox/dcim/models/mixins.py Outdated Show resolved Hide resolved
netbox/netbox/forms/base.py Outdated Show resolved Hide resolved
netbox/virtualization/forms/bulk_import.py Outdated Show resolved Hide resolved
netbox/virtualization/forms/model_forms.py Outdated Show resolved Hide resolved
netbox/virtualization/models/clusters.py Outdated Show resolved Hide resolved
netbox/virtualization/models/clusters.py Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assign virtualization Clusters to a Location
2 participants