[PR #20589] [MERGED] Fixes #20584: Ensure consistent validation between Interface & InterfaceTemplate #15971

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20589
Author: @jeremystretch
Created: 10/15/2025
Status: Merged
Merged: 10/15/2025
Merged by: @arthanson

Base: mainHead: 20584-interface-template-validation


📝 Commits (1)

  • 725f2a3 Fixes #20584: Ensure consistent validation between Interface & InterfaceTemplate

📊 Changes

3 files changed (+45 additions, -34 deletions)

View changed files

📝 netbox/dcim/models/device_component_templates.py (+2 -8)
📝 netbox/dcim/models/device_components.py (+10 -26)
📝 netbox/dcim/models/mixins.py (+33 -0)

📄 Description

Fixes: #20584

  • Introduce InterfaceValidationMixin to hold validation logic common to both Interface and InterfaceTemplate
  • Move the applicable logic over from Interface
  • Remove redundant logic from InterfaceTemplate.clean()

🔄 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/20589 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 10/15/2025 **Status:** ✅ Merged **Merged:** 10/15/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `main` ← **Head:** `20584-interface-template-validation` --- ### 📝 Commits (1) - [`725f2a3`](https://github.com/netbox-community/netbox/commit/725f2a36f2690123efd229c4a5da9053134dd7c2) Fixes #20584: Ensure consistent validation between Interface & InterfaceTemplate ### 📊 Changes **3 files changed** (+45 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/device_component_templates.py` (+2 -8) 📝 `netbox/dcim/models/device_components.py` (+10 -26) 📝 `netbox/dcim/models/mixins.py` (+33 -0) </details> ### 📄 Description ### Fixes: #20584 - Introduce InterfaceValidationMixin to hold validation logic common to both Interface and InterfaceTemplate - Move the applicable logic over from Interface - Remove redundant logic from `InterfaceTemplate.clean()` --- <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:25:05 +01:00
adam closed this issue 2025-12-30 00:25:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15971