[PR #4189] [MERGED] 4121 filter lookup expressions #12789

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4189
Author: @lampwins
Created: 2/18/2020
Status: Merged
Merged: 3/4/2020
Merged by: @jeremystretch

Base: developHead: 4121-filter-lookup-expressions


📝 Commits (10+)

  • a311002 initial work on dynamic lookup expressions
  • a6b43b3 functional dynamic filter lookups
  • 9284e83 py3.5 compatibility
  • 9ead263 merge develop
  • a136a07 #4121 - dynamic filter lookup expressions
  • 9116d74 merge develop
  • 67565ca added docs and more tests
  • afc8c9b fix tenancy filterset bases
  • 3b4607d refactor lookup map logic
  • c908f13 Merge branch 'develop' into 4121-filter-lookup-expressions

📊 Changes

14 files changed (+884 additions, -160 deletions)

View changed files

docs/api/filtering.md (+71 -0)
📝 docs/api/overview.md (+2 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/circuits/filters.py (+15 -9)
📝 netbox/dcim/filters.py (+79 -55)
📝 netbox/extras/filters.py (+6 -5)
📝 netbox/extras/tests/test_filters.py (+6 -6)
📝 netbox/ipam/filters.py (+23 -16)
📝 netbox/secrets/filters.py (+3 -3)
📝 netbox/tenancy/filters.py (+3 -3)
📝 netbox/utilities/constants.py (+35 -0)
📝 netbox/utilities/filters.py (+166 -51)
📝 netbox/utilities/tests/test_filters.py (+459 -3)
📝 netbox/virtualization/filters.py (+15 -9)

📄 Description

Fixes: #4121

Adds support for dynamic filter lookup expressions set out in #4162

This does not yet add support for custom fields or isnull lookups. It also needs docs to explain the available filters.


🔄 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/4189 **Author:** [@lampwins](https://github.com/lampwins) **Created:** 2/18/2020 **Status:** ✅ Merged **Merged:** 3/4/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `4121-filter-lookup-expressions` --- ### 📝 Commits (10+) - [`a311002`](https://github.com/netbox-community/netbox/commit/a311002141708ac6e1d987e7f35e467b9d9434e1) initial work on dynamic lookup expressions - [`a6b43b3`](https://github.com/netbox-community/netbox/commit/a6b43b30e9f59f30a3365fb6a0e80a6edb4954af) functional dynamic filter lookups - [`9284e83`](https://github.com/netbox-community/netbox/commit/9284e8327025a1df129768f46da4945d468a0ff5) py3.5 compatibility - [`9ead263`](https://github.com/netbox-community/netbox/commit/9ead2635c55d2c12b34817646fe9e0fdc5fb6032) merge develop - [`a136a07`](https://github.com/netbox-community/netbox/commit/a136a0788c649d5947202bf0780f004bfb5a5232) #4121 - dynamic filter lookup expressions - [`9116d74`](https://github.com/netbox-community/netbox/commit/9116d74cf75ba9e29f4842949c206906b643f1e6) merge develop - [`67565ca`](https://github.com/netbox-community/netbox/commit/67565ca191a1976b6a4938b2bbfde578997b6264) added docs and more tests - [`afc8c9b`](https://github.com/netbox-community/netbox/commit/afc8c9bfe9fb4dadb5220804a87733ef2be0c447) fix tenancy filterset bases - [`3b4607d`](https://github.com/netbox-community/netbox/commit/3b4607d30dd831dc54d87426eeaacd59baf8283b) refactor lookup map logic - [`c908f13`](https://github.com/netbox-community/netbox/commit/c908f132ecdd7bb237a9fc635f61370d751ce89e) Merge branch 'develop' into 4121-filter-lookup-expressions ### 📊 Changes **14 files changed** (+884 additions, -160 deletions) <details> <summary>View changed files</summary> ➕ `docs/api/filtering.md` (+71 -0) 📝 `docs/api/overview.md` (+2 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/circuits/filters.py` (+15 -9) 📝 `netbox/dcim/filters.py` (+79 -55) 📝 `netbox/extras/filters.py` (+6 -5) 📝 `netbox/extras/tests/test_filters.py` (+6 -6) 📝 `netbox/ipam/filters.py` (+23 -16) 📝 `netbox/secrets/filters.py` (+3 -3) 📝 `netbox/tenancy/filters.py` (+3 -3) 📝 `netbox/utilities/constants.py` (+35 -0) 📝 `netbox/utilities/filters.py` (+166 -51) 📝 `netbox/utilities/tests/test_filters.py` (+459 -3) 📝 `netbox/virtualization/filters.py` (+15 -9) </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: #4121 Adds support for dynamic filter lookup expressions set out in #4162 This does not yet add support for custom fields or `isnull` lookups. It also needs docs to explain the available filters. --- <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:23:37 +01:00
adam closed this issue 2025-12-29 22:23:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12789