From 6135fb8cd760be95651f6be8cc71cdaa65a6fbe1 Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Thu, 4 Sep 2025 22:08:59 +0200 Subject: [PATCH] feat(vpn): Add search index for TunnelGroup Introduces `TunnelGroupIndex` for enabling search functionality on Tunnel Groups. Includes searchable fields for `name` and `description` with respective weights and display attributes. Closes #20237 --- netbox/vpn/search.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/netbox/vpn/search.py b/netbox/vpn/search.py index 07ab9a5ca..76574d288 100644 --- a/netbox/vpn/search.py +++ b/netbox/vpn/search.py @@ -14,6 +14,17 @@ class TunnelIndex(SearchIndex): display_attrs = ('group', 'status', 'encapsulation', 'tenant', 'tunnel_id', 'description') +@register_search +class TunnelGroupIndex(SearchIndex): + model = models.TunnelGroup + fields = ( + ('name', 100), + ('slug', 110), + ('description', 500), + ) + display_attrs = ('description',) + + @register_search class IKEProposalIndex(SearchIndex): model = models.IKEProposal