[PR #10489] [MERGED] 8927 plugin search #13644

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10489
Author: @arthanson
Created: 9/27/2022
Status: Merged
Merged: 10/10/2022
Merged by: @jeremystretch

Base: featureHead: 8927-plugin-search


📝 Commits (10+)

📊 Changes

28 files changed (+598 additions, -334 deletions)

View changed files

📝 docs/plugins/development/index.md (+1 -0)
docs/plugins/development/search.md (+29 -0)
📝 docs/release-notes/version-3.4.md (+1 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/circuits/apps.py (+1 -1)
netbox/circuits/search.py (+34 -0)
📝 netbox/dcim/apps.py (+1 -1)
netbox/dcim/search.py (+143 -0)
📝 netbox/extras/apps.py (+1 -2)
📝 netbox/extras/plugins/__init__.py (+7 -0)
📝 netbox/extras/registry.py (+1 -0)
netbox/extras/search.py (+14 -0)
netbox/extras/tests/dummy_plugin/search.py (+13 -0)
📝 netbox/ipam/apps.py (+1 -1)
netbox/ipam/search.py (+69 -0)
📝 netbox/netbox/forms/__init__.py (+21 -28)
netbox/netbox/search.py (+0 -274)
netbox/netbox/search/__init__.py (+33 -0)
netbox/netbox/search/backends.py (+125 -0)
📝 netbox/netbox/settings.py (+1 -1)

...and 8 more files

📄 Description

Fixes: #8927

Refactors and adds to the search code to allow two things:

  1. Allow plugins to have search capabilities
  2. Make the search system 'pluggable' so a new Postgres search can be added.

The major changes are moving the search definitions to be class based (from the current dictionary), adding in a pluggable search backend system and making the search registration auto-scan the apps (which requires the class based definitions) to dynamically pick up new apps and plugins.


🔄 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/10489 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 9/27/2022 **Status:** ✅ Merged **Merged:** 10/10/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `8927-plugin-search` --- ### 📝 Commits (10+) - [`c146ab7`](https://github.com/netbox-community/netbox/commit/c146ab7963eb891efae482f85f6950312b74f966) #7016 base search classes - [`fcb1a17`](https://github.com/netbox-community/netbox/commit/fcb1a17db1873c187519ea0e15eb63a5c82ba38f) 7016 add search indexes - [`c6aa03f`](https://github.com/netbox-community/netbox/commit/c6aa03f59d1cde38df4c3129a7b72c4675b9e7bb) 7016 add search indexes - [`0457a64`](https://github.com/netbox-community/netbox/commit/0457a647c71e3b42af1ca9feac8f785f0920f1a6) 7016 add search indexes - [`2862d9e`](https://github.com/netbox-community/netbox/commit/2862d9e4eed89dfcee64798c8b151c0588661412) 7016 add search indexes - [`c910e1d`](https://github.com/netbox-community/netbox/commit/c910e1dfaf39970b8d3c77281c279c60e36c22a4) 7016 add search indexes - [`4fd1835`](https://github.com/netbox-community/netbox/commit/4fd183573f28d47548b4b623ccf85f89f4e77d3f) 7016 add search indexes - [`085883a`](https://github.com/netbox-community/netbox/commit/085883a5ff2cab84eea18783b3c19b97775f7fb8) 8927 refactor search - [`b2e3e0f`](https://github.com/netbox-community/netbox/commit/b2e3e0f54bc5cd40a88b02947a9d0662da7ea768) 8927 refactor search - [`499fcee`](https://github.com/netbox-community/netbox/commit/499fcee2a154fb2f6627621c05cddb48fa6af89b) 8927 refactor search ### 📊 Changes **28 files changed** (+598 additions, -334 deletions) <details> <summary>View changed files</summary> 📝 `docs/plugins/development/index.md` (+1 -0) ➕ `docs/plugins/development/search.md` (+29 -0) 📝 `docs/release-notes/version-3.4.md` (+1 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/circuits/apps.py` (+1 -1) ➕ `netbox/circuits/search.py` (+34 -0) 📝 `netbox/dcim/apps.py` (+1 -1) ➕ `netbox/dcim/search.py` (+143 -0) 📝 `netbox/extras/apps.py` (+1 -2) 📝 `netbox/extras/plugins/__init__.py` (+7 -0) 📝 `netbox/extras/registry.py` (+1 -0) ➕ `netbox/extras/search.py` (+14 -0) ➕ `netbox/extras/tests/dummy_plugin/search.py` (+13 -0) 📝 `netbox/ipam/apps.py` (+1 -1) ➕ `netbox/ipam/search.py` (+69 -0) 📝 `netbox/netbox/forms/__init__.py` (+21 -28) ➖ `netbox/netbox/search.py` (+0 -274) ➕ `netbox/netbox/search/__init__.py` (+33 -0) ➕ `netbox/netbox/search/backends.py` (+125 -0) 📝 `netbox/netbox/settings.py` (+1 -1) _...and 8 more files_ </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 filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WE BE CLOSED AUTOMATICALLY. Specify your assigned issue number on the line below. --> ### Fixes: #8927 <!-- Please include a summary of the proposed changes below. --> Refactors and adds to the search code to allow two things: 1. Allow plugins to have search capabilities 2. Make the search system 'pluggable' so a new Postgres search can be added. The major changes are moving the search definitions to be class based (from the current dictionary), adding in a pluggable search backend system and making the search registration auto-scan the apps (which requires the class based definitions) to dynamically pick up new apps and plugins. --- <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:20:02 +01:00
adam closed this issue 2025-12-29 23:20:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13644