[PR #12937] [CLOSED] prefix is_pool check for ip assignments #14079

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12937
Author: @ITJamie
Created: 6/19/2023
Status: Closed

Base: developHead: ipaddress_prefix_pool_fixes


📝 Commits (5)

📊 Changes

1 file changed (+17 additions, -8 deletions)

View changed files

📝 netbox/ipam/forms/model_forms.py (+17 -8)

📄 Description

Fixes: #12962

some users pointed out in #12687 that I missed checking for prefixes where is_pool is true with my previous patch.
I added some logic to find a prefix matching the IP and checks to see if is_pool is set.
It is also safe for ip's that have no matching prefix in netbox.


🔄 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/12937 **Author:** [@ITJamie](https://github.com/ITJamie) **Created:** 6/19/2023 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `ipaddress_prefix_pool_fixes` --- ### 📝 Commits (5) - [`1ea0035`](https://github.com/netbox-community/netbox/commit/1ea00350d791d9970ebf6fe1a66b037ece2bab2a) prefix is_pool check for ip assignments - [`89a78a6`](https://github.com/netbox-community/netbox/commit/89a78a64a265b1ff21a2696da83f424933a98333) linting - [`a9b2d0e`](https://github.com/netbox-community/netbox/commit/a9b2d0ebfd58ddac5e33599d940b53c18da65484) Update model_forms.py - [`5cbe332`](https://github.com/netbox-community/netbox/commit/5cbe3324a2d1cf2c5b1011560cb1e080ec84d181) use cleaned address object - [`d008b5c`](https://github.com/netbox-community/netbox/commit/d008b5ca11ede2e6437d821eb97a082498f11af5) requested changes ### 📊 Changes **1 file changed** (+17 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `netbox/ipam/forms/model_forms.py` (+17 -8) </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: #12962 <!-- Please include a summary of the proposed changes below. --> some users pointed out in #12687 that I missed checking for prefixes where is_pool is true with my previous patch. I added some logic to find a prefix matching the IP and checks to see if is_pool is set. It is also safe for ip's that have no matching prefix in netbox. --- <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:22:23 +01:00
adam closed this issue 2025-12-29 23:22:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14079