[PR #18950] [MERGED] Fixes: #18656 Unable to import IP Address and assign to FHRP Group #15487

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18950
Author: @renatoalmeidaoliveira
Created: 3/19/2025
Status: Merged
Merged: 3/21/2025
Merged by: @jnovinger

Base: mainHead: 18656-Unable-to-import-IP-Address-and-assign-to-FHRP-Group


📝 Commits (4)

  • 98272c2 Add fhrpgroup to IPAddressImportForm
  • a1f6523 Change fhrpgroup accessor to name
  • b16f60b rename fhrpgroup to fhrp_group
  • 97b61e4 Add fhrp_group to IPAddressTestCase csv_data

📊 Changes

2 files changed (+33 additions, -6 deletions)

View changed files

📝 netbox/ipam/forms/bulk_import.py (+11 -2)
📝 netbox/ipam/tests/test_views.py (+22 -4)

📄 Description

Fixes: #18656 Unable to import IP Address and assign to FHRP Group

  • Created the fhrpgroup field in IPAddressImportForm

Observations:

Since FHRPGroup Model doesn't implement uniqueness method, choosing the appropriated accessor for the fhrpgroup its a bit tricky.
I choose name instead of the group_id beacuse, IMO, group_id is more likely to get repeated, but maybe a more accurate approach could be open a new Issue to setup some uniqueness criteria for FHRPGroup, make the import form following that pattern.


🔄 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/18950 **Author:** [@renatoalmeidaoliveira](https://github.com/renatoalmeidaoliveira) **Created:** 3/19/2025 **Status:** ✅ Merged **Merged:** 3/21/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `18656-Unable-to-import-IP-Address-and-assign-to-FHRP-Group` --- ### 📝 Commits (4) - [`98272c2`](https://github.com/netbox-community/netbox/commit/98272c29f7b54983258ff9474545fc6ddc9a6a92) Add fhrpgroup to IPAddressImportForm - [`a1f6523`](https://github.com/netbox-community/netbox/commit/a1f6523bf1973d10f039ebcf399e03a0df242032) Change fhrpgroup accessor to name - [`b16f60b`](https://github.com/netbox-community/netbox/commit/b16f60b7f660d019ac97b7b30d355ad041f9a87e) rename fhrpgroup to fhrp_group - [`97b61e4`](https://github.com/netbox-community/netbox/commit/97b61e43c371e874d4142d07e5594735a219eeea) Add fhrp_group to IPAddressTestCase csv_data ### 📊 Changes **2 files changed** (+33 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `netbox/ipam/forms/bulk_import.py` (+11 -2) 📝 `netbox/ipam/tests/test_views.py` (+22 -4) </details> ### 📄 Description ### Fixes: #18656 Unable to import IP Address and assign to FHRP Group - Created the `fhrpgroup` field in `IPAddressImportForm` #### Observations: Since [FHRPGroup Model](https://github.com/netbox-community/netbox/blob/7c152e92340779a889bfe5ebec7d6c97c230fc72/netbox/ipam/models/fhrp.py#L54) doesn't implement uniqueness method, choosing the appropriated accessor for the `fhrpgroup` its a bit tricky. I choose `name` instead of the `group_id` beacuse, IMO, `group_id` is more likely to get repeated, but maybe a more accurate approach could be open a new Issue to setup some uniqueness criteria for FHRPGroup, make the import form following that pattern. --- <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:22:13 +01:00
adam closed this issue 2025-12-30 00:22:14 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15487