[PR #19332] [MERGED] 18706 Fix VLAN Assignment checking #15618

Closed
opened 2025-12-30 00:23:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19332
Author: @arthanson
Created: 4/25/2025
Status: Merged
Merged: 4/28/2025
Merged by: @jeremystretch

Base: mainHead: 18706-vlan-association


📝 Commits (3)

📊 Changes

2 files changed (+69 additions, -7 deletions)

View changed files

📝 netbox/ipam/models/vlans.py (+16 -7)
📝 netbox/ipam/tests/test_models.py (+53 -0)

📄 Description

Fixes: #18706

VLANs can currently be assigned to both a Site and SiteGroup. The SiteGroup has a scope assignment that can be to a Site or SiteGroup. If a VLAN is assigned to both a Site and SiteGroup an error is raised if the SiteGroup assigned site doesn't match the VLAN site. However the check assumed the SiteGroup was only scoped to a Site, this fixes it to account that it can be scoped to either a Site or SiteGroup.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/19332 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 4/25/2025 **Status:** ✅ Merged **Merged:** 4/28/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `main` ← **Head:** `18706-vlan-association` --- ### 📝 Commits (3) - [`25d334a`](https://github.com/netbox-community/netbox/commit/25d334a55443585ca7773ae8d88a5bad8d9de7aa) 18706 Fix VLAN assignment checking - [`90cf97e`](https://github.com/netbox-community/netbox/commit/90cf97ee29e29bdfb519620d58150a05bbec5440) 18706 add tests - [`cbadbd8`](https://github.com/netbox-community/netbox/commit/cbadbd83ab37da47e630e77913ce250a9c5cd6b3) 18706 review feedback ### 📊 Changes **2 files changed** (+69 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `netbox/ipam/models/vlans.py` (+16 -7) 📝 `netbox/ipam/tests/test_models.py` (+53 -0) </details> ### 📄 Description ### Fixes: #18706 VLANs can currently be assigned to both a Site and SiteGroup. The SiteGroup has a scope assignment that can be to a Site or SiteGroup. If a VLAN is assigned to both a Site and SiteGroup an error is raised if the SiteGroup assigned site doesn't match the VLAN site. However the check assumed the SiteGroup was only scoped to a Site, this fixes it to account that it can be scoped to either a Site or SiteGroup. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:23:02 +01:00
adam closed this issue 2025-12-30 00:23:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15618