[PR #10223] [CLOSED] #7503 API Bulk-Create of Devices does not check Rack-Space #13582

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10223
Author: @arthanson
Created: 8/30/2022
Status: Closed

Base: developHead: 7503-bulkdevice


📝 Commits (5)

📊 Changes

4 files changed (+99 additions, -25 deletions)

View changed files

📝 netbox/dcim/api/serializers.py (+19 -0)
📝 netbox/dcim/models/devices.py (+1 -10)
📝 netbox/dcim/models/racks.py (+45 -14)
📝 netbox/dcim/tests/test_api.py (+34 -1)

📄 Description

Fixes: #7503

If you bulk add devices and have overlapping positions it will return a validation error. Bit bigger change but wanted to get the method down for validating cross objects in a bulk operation which will probably come up again (use ListSerializer). @jeremystretch I spot checked the existing logic for adding devices but would probably be good for you to re-validate it as such a central piece.


🔄 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/10223 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 8/30/2022 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `7503-bulkdevice` --- ### 📝 Commits (5) - [`06b75d1`](https://github.com/netbox-community/netbox/commit/06b75d1b0edac9be56a07d967cfd510af1d62b03) #7503 initial bulk add device validation - [`78c8fdb`](https://github.com/netbox-community/netbox/commit/78c8fdbebf90ca9af1fd4263b74fcec6e48ed9b1) #7503 initial bulk add device validation - [`3fa8381`](https://github.com/netbox-community/netbox/commit/3fa8381efef138da287e72c7f56c4f753aa116a6) #7503 initial bulk add device validation - [`da57059`](https://github.com/netbox-community/netbox/commit/da5705909ab6c56236211a3940fb84ae93755e52) #7503 add test - [`727b33c`](https://github.com/netbox-community/netbox/commit/727b33c50be30f4962017101022062673bc68f19) #7503 add test ### 📊 Changes **4 files changed** (+99 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/api/serializers.py` (+19 -0) 📝 `netbox/dcim/models/devices.py` (+1 -10) 📝 `netbox/dcim/models/racks.py` (+45 -14) 📝 `netbox/dcim/tests/test_api.py` (+34 -1) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WE BE CLOSED AUTOMATICALLY. --> ### Fixes: #7503 <!-- Please include a summary of the proposed changes below. --> If you bulk add devices and have overlapping positions it will return a validation error. Bit bigger change but wanted to get the method down for validating cross objects in a bulk operation which will probably come up again (use ListSerializer). @jeremystretch I spot checked the existing logic for adding devices but would probably be good for you to re-validate it as such a central piece. --- <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:19:42 +01:00
adam closed this issue 2025-12-29 23:19: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#13582