[PR #15763] [MERGED] Fixes #15717 - Unable to assign a VM in Site to Cluster without Site #14669

Closed
opened 2025-12-29 23:25:51 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15763
Author: @nopg
Created: 4/18/2024
Status: Merged
Merged: 6/20/2024
Merged by: @jeremystretch

Base: developHead: 15717-vm-cluster-site


📝 Commits (5)

  • 3a10ea6 Fixes #15717: Allow VM with Site to Cluster without Site
  • ea27286 Fixes #15717: Allow VM with Site to Cluster without Site
  • b816a5d Fixes #15717: Allow VM with Site to Cluster without Site
  • 3311a97 Fixes #15717: Allow VM with Site to Cluster without Site
  • 6309366 Fixes #15717: Allow VM with Site to Cluster without Site

📊 Changes

5 files changed (+41 additions, -4 deletions)

View changed files

📝 netbox/dcim/forms/model_forms.py (+4 -1)
📝 netbox/dcim/tests/test_models.py (+31 -0)
📝 netbox/virtualization/forms/model_forms.py (+2 -2)
📝 netbox/virtualization/models/virtualmachines.py (+1 -1)
📝 netbox/virtualization/tests/test_models.py (+3 -0)

📄 Description

Fixes: #15717

Adds to existing IF statement for VirtualMachine.clean() (to match existing check for Device.clean()) to allow for VM to be assigned to a Cluster without a Site.

Updated existing VM test to check for this new use case, and added Device tests for Clusters with Sites matching/not matching as well.


🔄 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/15763 **Author:** [@nopg](https://github.com/nopg) **Created:** 4/18/2024 **Status:** ✅ Merged **Merged:** 6/20/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `15717-vm-cluster-site` --- ### 📝 Commits (5) - [`3a10ea6`](https://github.com/netbox-community/netbox/commit/3a10ea61e08ec80c5eddfb99460ce22d18eaf149) Fixes #15717: Allow VM with Site to Cluster without Site - [`ea27286`](https://github.com/netbox-community/netbox/commit/ea2728648057ac1265899307b952df711a2be439) Fixes #15717: Allow VM with Site to Cluster without Site - [`b816a5d`](https://github.com/netbox-community/netbox/commit/b816a5d0c6ca0fab2d11c926496e67304f1b39c3) Fixes #15717: Allow VM with Site to Cluster without Site - [`3311a97`](https://github.com/netbox-community/netbox/commit/3311a97be0d408d424e88c7f845f55ddcf3b80a9) Fixes #15717: Allow VM with Site to Cluster without Site - [`6309366`](https://github.com/netbox-community/netbox/commit/63093661640a8c14ac5a184cd9c5049452cdcbbc) Fixes #15717: Allow VM with Site to Cluster without Site ### 📊 Changes **5 files changed** (+41 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/forms/model_forms.py` (+4 -1) 📝 `netbox/dcim/tests/test_models.py` (+31 -0) 📝 `netbox/virtualization/forms/model_forms.py` (+2 -2) 📝 `netbox/virtualization/models/virtualmachines.py` (+1 -1) 📝 `netbox/virtualization/tests/test_models.py` (+3 -0) </details> ### 📄 Description ### Fixes: #15717 Adds to existing IF statement for VirtualMachine.clean() (to match existing check for Device.clean()) to allow for VM to be assigned to a Cluster without a Site. Updated existing VM test to check for this new use case, and added Device tests for Clusters with Sites matching/not matching as well. --- <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-29 23:25:51 +01:00
adam closed this issue 2025-12-29 23:25:52 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14669