Skip to content

Commit fa85994

Browse files
committed
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
1 parent ea50786 commit fa85994

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

netbox/vpn/search.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ class TunnelIndex(SearchIndex):
1414
display_attrs = ('group', 'status', 'encapsulation', 'tenant', 'tunnel_id', 'description')
1515

1616

17+
@register_search
18+
class TunnelGroupIndex(SearchIndex):
19+
model = models.TunnelGroup
20+
fields = (
21+
('name', 100),
22+
('description', 500),
23+
)
24+
display_attrs = ('description',)
25+
26+
1727
@register_search
1828
class IKEProposalIndex(SearchIndex):
1929
model = models.IKEProposal

0 commit comments

Comments
 (0)