[PR #20082] [CLOSED] Fixes #20042: Support Bridge-Interfaces in Interface-Template Import #15822

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20082
Author: @m-hau
Created: 8/12/2025
Status: Closed

Base: mainHead: 20042-interface-template-import-bridge


📝 Commits (6)

  • bb8f5ee Fix hard related objects not list error
  • 16e284f Fix hard related object not dict error
  • 1848066 Allow bridge when importing interface templates
  • fa7b4d8 Add prep_related_object_list hook
  • c158bfa Sort interface templates of device type
  • 96cdddd Add cycle identification

📊 Changes

4 files changed (+399 additions, -4 deletions)

View changed files

📝 netbox/dcim/forms/object_import.py (+22 -2)
📝 netbox/dcim/tests/test_views.py (+256 -0)
📝 netbox/dcim/views.py (+96 -1)
📝 netbox/netbox/views/generic/bulk_views.py (+25 -1)

📄 Description

Fixes: #20042

When importing device- or module-types, allow their interface-templates to contain the bridge attribute and properly save it.


The unexpectedly hardest part was finding the right place to hook into the existing process, which in this cases required to create an entirely new hook-point. While developing and testing I also found some other minor bugs in the generalized import validation, and attempted to fix them. Please see the individual commit messages for more information.


🔄 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/20082 **Author:** [@m-hau](https://github.com/m-hau) **Created:** 8/12/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `20042-interface-template-import-bridge` --- ### 📝 Commits (6) - [`bb8f5ee`](https://github.com/netbox-community/netbox/commit/bb8f5ee12ffc06a685932d1508ac05d537e3c500) Fix hard related objects not list error - [`16e284f`](https://github.com/netbox-community/netbox/commit/16e284f03a74895da7dc1f4054045272804a38a5) Fix hard related object not dict error - [`1848066`](https://github.com/netbox-community/netbox/commit/18480668e0f5da46ac073314c8a1b4a2e5ac94b2) Allow bridge when importing interface templates - [`fa7b4d8`](https://github.com/netbox-community/netbox/commit/fa7b4d8978b0e20e59e6ba478db06a4cd230428c) Add prep_related_object_list hook - [`c158bfa`](https://github.com/netbox-community/netbox/commit/c158bfa87acc9f01c34f9f9cf37f8453021cab23) Sort interface templates of device type - [`96cdddd`](https://github.com/netbox-community/netbox/commit/96cdddd3f8ef0d04b4b5068bcc0bfcb82aa7ef36) Add cycle identification ### 📊 Changes **4 files changed** (+399 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/forms/object_import.py` (+22 -2) 📝 `netbox/dcim/tests/test_views.py` (+256 -0) 📝 `netbox/dcim/views.py` (+96 -1) 📝 `netbox/netbox/views/generic/bulk_views.py` (+25 -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 opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #20042 <!-- Please include a summary of the proposed changes below. --> When importing device- or module-types, allow their interface-templates to contain the `bridge` attribute and properly save it. <hr> The unexpectedly hardest part was finding the right place to hook into the existing process, which in this cases required to create an entirely new hook-point. While developing and testing I also found some other minor bugs in the generalized import validation, and attempted to fix them. Please see the individual commit messages for more information. --- <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:24:15 +01:00
adam closed this issue 2025-12-30 00:24:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15822