2023-11-27 16:17:15 -05:00
|
|
|
from netbox.search import SearchIndex, register_search
|
|
|
|
from . import models
|
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class TunnelIndex(SearchIndex):
|
|
|
|
model = models.Tunnel
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('tunnel_id', 300),
|
|
|
|
('description', 500),
|
|
|
|
('comments', 5000),
|
|
|
|
)
|
2023-12-21 14:24:05 -05:00
|
|
|
display_attrs = ('group', 'status', 'encapsulation', 'tenant', 'tunnel_id', 'description')
|
2023-11-27 16:17:15 -05:00
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class IKEProposalIndex(SearchIndex):
|
|
|
|
model = models.IKEProposal
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('description', 500),
|
2023-12-04 09:19:56 -05:00
|
|
|
('comments', 5000),
|
2023-11-27 16:17:15 -05:00
|
|
|
)
|
|
|
|
display_attrs = ('description',)
|
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class IKEPolicyIndex(SearchIndex):
|
|
|
|
model = models.IKEPolicy
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('description', 500),
|
2023-12-04 09:19:56 -05:00
|
|
|
('comments', 5000),
|
2023-11-27 16:17:15 -05:00
|
|
|
)
|
|
|
|
display_attrs = ('description',)
|
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class IPSecProposalIndex(SearchIndex):
|
|
|
|
model = models.IPSecProposal
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('description', 500),
|
2023-12-04 09:19:56 -05:00
|
|
|
('comments', 5000),
|
2023-11-27 16:17:15 -05:00
|
|
|
)
|
|
|
|
display_attrs = ('description',)
|
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class IPSecPolicyIndex(SearchIndex):
|
|
|
|
model = models.IPSecPolicy
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('description', 500),
|
2023-12-04 09:19:56 -05:00
|
|
|
('comments', 5000),
|
2023-11-27 16:17:15 -05:00
|
|
|
)
|
|
|
|
display_attrs = ('description',)
|
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class IPSecProfileIndex(SearchIndex):
|
|
|
|
model = models.IPSecProfile
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('description', 500),
|
|
|
|
('comments', 5000),
|
|
|
|
)
|
|
|
|
display_attrs = ('description',)
|
2023-11-28 13:45:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class L2VPNIndex(SearchIndex):
|
|
|
|
model = models.L2VPN
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('slug', 110),
|
|
|
|
('description', 500),
|
|
|
|
('comments', 5000),
|
|
|
|
)
|
|
|
|
display_attrs = ('type', 'identifier', 'tenant', 'description')
|