[PR #3740] [MERGED] Allow non-unique device and VM names #12624

Closed
opened 2025-12-29 22:22:42 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3740
Author: @jeremystretch
Created: 12/9/2019
Status: Merged
Merged: 12/9/2019
Merged by: @jeremystretch

Base: develop-2.7Head: 2669-device-vm-names


📝 Commits (3)

  • a8dd060 #2269: Allow non-unique Device names
  • 2e37b19 #2269: Allow non-unique VirtualMachine names
  • 5ac4a3b Omit default uniqueness validator from VirtualMachineSerializer, which implies required fields

📊 Changes

7 files changed (+160 additions, -4 deletions)

View changed files

netbox/dcim/migrations/0086_device_name_nonunique.py (+23 -0)
📝 netbox/dcim/models.py (+14 -2)
📝 netbox/dcim/tests/test_models.py (+37 -0)
📝 netbox/virtualization/api/serializers.py (+1 -0)
netbox/virtualization/migrations/0012_vm_name_nonunique.py (+23 -0)
📝 netbox/virtualization/models.py (+18 -2)
netbox/virtualization/tests/test_models.py (+44 -0)

📄 Description

Closes #2669

This relaxes the current uniqueness constraint, which asserts that all non-null device and VM names must be unique globally. This change enforces unique device names only per site & tenant pairing, and VM names per cluster & tenant pairing.


🔄 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/3740 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 12/9/2019 **Status:** ✅ Merged **Merged:** 12/9/2019 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.7` ← **Head:** `2669-device-vm-names` --- ### 📝 Commits (3) - [`a8dd060`](https://github.com/netbox-community/netbox/commit/a8dd060e32780f3f761b15f253e7d5cd93704bbf) #2269: Allow non-unique Device names - [`2e37b19`](https://github.com/netbox-community/netbox/commit/2e37b19e9f68f91e6a5e5c1b7bcaee99b95a5f74) #2269: Allow non-unique VirtualMachine names - [`5ac4a3b`](https://github.com/netbox-community/netbox/commit/5ac4a3ba7932218d84c1a181108dd34b3f458849) Omit default uniqueness validator from VirtualMachineSerializer, which implies required fields ### 📊 Changes **7 files changed** (+160 additions, -4 deletions) <details> <summary>View changed files</summary> ➕ `netbox/dcim/migrations/0086_device_name_nonunique.py` (+23 -0) 📝 `netbox/dcim/models.py` (+14 -2) 📝 `netbox/dcim/tests/test_models.py` (+37 -0) 📝 `netbox/virtualization/api/serializers.py` (+1 -0) ➕ `netbox/virtualization/migrations/0012_vm_name_nonunique.py` (+23 -0) 📝 `netbox/virtualization/models.py` (+18 -2) ➕ `netbox/virtualization/tests/test_models.py` (+44 -0) </details> ### 📄 Description ### Closes #2669 This relaxes the current uniqueness constraint, which asserts that all non-null device and VM names must be unique globally. This change enforces unique device names only per site & tenant pairing, and VM names per cluster & tenant pairing. --- <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 22:22:42 +01:00
adam closed this issue 2025-12-29 22:22:42 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12624