[PR #3847] [MERGED] Fixes #3525: Filter muiltiple ipaddress terms #12662

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3847
Author: @kobayashi
Created: 1/5/2020
Status: Merged
Merged: 1/14/2020
Merged by: @jeremystretch

Base: developHead: 3525


📝 Commits (3)

  • 2e9f21e Filter muiltiple ipaddress terms
  • e3aacb1 optimize query
  • d33e10b Merge branch 'develop' into 3525

📊 Changes

5 files changed (+68 additions, -21 deletions)

View changed files

📝 docs/release-notes/version-2.6.md (+4 -0)
📝 netbox/ipam/fields.py (+8 -2)
📝 netbox/ipam/filters.py (+3 -8)
📝 netbox/ipam/lookups.py (+36 -0)
📝 netbox/ipam/tests/test_filters.py (+17 -11)

📄 Description

Fixes: #3525

This makes it possible to filter by mpultiple address terms for ipaddress even w/ or w/o subnet.

$ curl -X GET -H "Accept: application/json; indent=4" -H "Authorization: Token 0123456789abcdef0123456789abcdef01234567" "http://127.0.0.1:8000/api/ipam/ip-addresses/?address=192.168.1.1/24&address=192.168.1.2/24&address=192.168.1.3/24" 
{
    "count": 3,
    "next": null,
    "previous": null, 
    "results": [...]
}

🔄 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/3847 **Author:** [@kobayashi](https://github.com/kobayashi) **Created:** 1/5/2020 **Status:** ✅ Merged **Merged:** 1/14/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `3525` --- ### 📝 Commits (3) - [`2e9f21e`](https://github.com/netbox-community/netbox/commit/2e9f21e222f418bcd326ecbf5250a1de81976959) Filter muiltiple ipaddress terms - [`e3aacb1`](https://github.com/netbox-community/netbox/commit/e3aacb183b2604e0c06cb5ad7fd1748e7b752578) optimize query - [`d33e10b`](https://github.com/netbox-community/netbox/commit/d33e10b4ce47f1d6ce04def7d1adc267c498eade) Merge branch 'develop' into 3525 ### 📊 Changes **5 files changed** (+68 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `docs/release-notes/version-2.6.md` (+4 -0) 📝 `netbox/ipam/fields.py` (+8 -2) 📝 `netbox/ipam/filters.py` (+3 -8) 📝 `netbox/ipam/lookups.py` (+36 -0) 📝 `netbox/ipam/tests/test_filters.py` (+17 -11) </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 opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #3525 <!-- Please include a summary of the proposed changes below. --> This makes it possible to filter by mpultiple address terms for ipaddress even w/ or w/o subnet. ``` $ curl -X GET -H "Accept: application/json; indent=4" -H "Authorization: Token 0123456789abcdef0123456789abcdef01234567" "http://127.0.0.1:8000/api/ipam/ip-addresses/?address=192.168.1.1/24&address=192.168.1.2/24&address=192.168.1.3/24" { "count": 3, "next": null, "previous": null, "results": [...] } ``` --- <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 22:22:55 +01:00
adam closed this issue 2025-12-29 22:22:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12662