[PR #10367] [MERGED] 4347 Add JSON/YAML import support for all objects #13614

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10367
Author: @arthanson
Created: 9/14/2022
Status: Merged
Merged: 11/10/2022
Merged by: @jeremystretch

Base: featureHead: 4347-json-import


📝 Commits (7)

  • 0ce7f84 4347 initial code for json import
  • ead26d0 4347 initial code for json import
  • 68693e6 Clean up form processing logic
  • d9306d8 Merge branch 'feature' into 4347-json-import
  • ec053f5 Consolidate import forms
  • 797d839 Consolidate object import/update logic
  • 6793e38 Clean up bulk import view

📊 Changes

10 files changed (+381 additions, -419 deletions)

View changed files

📝 netbox/dcim/views.py (+6 -5)
📝 netbox/extras/tests/test_customfields.py (+1 -1)
📝 netbox/ipam/tests/test_views.py (+13 -9)
📝 netbox/netbox/tests/test_import.py (+5 -2)
📝 netbox/netbox/views/generic/bulk_views.py (+110 -87)
📝 netbox/netbox/views/generic/object_views.py (+2 -144)
📝 netbox/templates/generic/bulk_import.html (+143 -125)
netbox/utilities/forms/choices.py (+17 -0)
📝 netbox/utilities/forms/forms.py (+75 -42)
📝 netbox/utilities/testing/views.py (+9 -4)

📄 Description

Fixes: #4347

Add JSON/YAML import support for all objects. Changes DeviceType and ModuleType import to use the standard BulkImportView. Changes BulkImportView code and forms to incorporate the JSON and YAML import code.


🔄 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/10367 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 9/14/2022 **Status:** ✅ Merged **Merged:** 11/10/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `4347-json-import` --- ### 📝 Commits (7) - [`0ce7f84`](https://github.com/netbox-community/netbox/commit/0ce7f84ec1ff5678e14b279073e1c9d43a7de165) 4347 initial code for json import - [`ead26d0`](https://github.com/netbox-community/netbox/commit/ead26d09d3f0bba0eced95b7aa4913aee3d34ba1) 4347 initial code for json import - [`68693e6`](https://github.com/netbox-community/netbox/commit/68693e681cddf5166bf0f926ea100a5ede189f82) Clean up form processing logic - [`d9306d8`](https://github.com/netbox-community/netbox/commit/d9306d827f0d6552414d1739eaee5434d59a7a6d) Merge branch 'feature' into 4347-json-import - [`ec053f5`](https://github.com/netbox-community/netbox/commit/ec053f550b26236804093750fcbeaed874803239) Consolidate import forms - [`797d839`](https://github.com/netbox-community/netbox/commit/797d839c9a20b732e12984869d5735b4a65f6133) Consolidate object import/update logic - [`6793e38`](https://github.com/netbox-community/netbox/commit/6793e384df8cbfec3d34e3d0913b1f59dce95eeb) Clean up bulk import view ### 📊 Changes **10 files changed** (+381 additions, -419 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/views.py` (+6 -5) 📝 `netbox/extras/tests/test_customfields.py` (+1 -1) 📝 `netbox/ipam/tests/test_views.py` (+13 -9) 📝 `netbox/netbox/tests/test_import.py` (+5 -2) 📝 `netbox/netbox/views/generic/bulk_views.py` (+110 -87) 📝 `netbox/netbox/views/generic/object_views.py` (+2 -144) 📝 `netbox/templates/generic/bulk_import.html` (+143 -125) ➕ `netbox/utilities/forms/choices.py` (+17 -0) 📝 `netbox/utilities/forms/forms.py` (+75 -42) 📝 `netbox/utilities/testing/views.py` (+9 -4) </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. Specify your assigned issue number on the line below. --> ### Fixes: #4347 <!-- Please include a summary of the proposed changes below. --> Add JSON/YAML import support for all objects. Changes DeviceType and ModuleType import to use the standard BulkImportView. Changes BulkImportView code and forms to incorporate the JSON and YAML import code. --- <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:52 +01:00
adam closed this issue 2025-12-29 23:19: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#13614