1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Jeremy Stretch d2fea4edc4 Closes #14311: Move L2VPN models from ipam to vpn (#14358)
* Move L2VPN and L2VPNTermination models from ipam to vpn

* Move L2VPN resources from ipam to vpn

* Extend migration to update content types

* Misc cleanup
2023-11-28 13:45:00 -05:00

78 lines
1.6 KiB
Python

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),
)
display_attrs = ('status', 'encapsulation', 'tenant', 'description')
@register_search
class IKEProposalIndex(SearchIndex):
model = models.IKEProposal
fields = (
('name', 100),
('description', 500),
)
display_attrs = ('description',)
@register_search
class IKEPolicyIndex(SearchIndex):
model = models.IKEPolicy
fields = (
('name', 100),
('description', 500),
)
display_attrs = ('description',)
@register_search
class IPSecProposalIndex(SearchIndex):
model = models.IPSecProposal
fields = (
('name', 100),
('description', 500),
)
display_attrs = ('description',)
@register_search
class IPSecPolicyIndex(SearchIndex):
model = models.IPSecPolicy
fields = (
('name', 100),
('description', 500),
)
display_attrs = ('description',)
@register_search
class IPSecProfileIndex(SearchIndex):
model = models.IPSecProfile
fields = (
('name', 100),
('description', 500),
('comments', 5000),
)
display_attrs = ('description',)
@register_search
class L2VPNIndex(SearchIndex):
model = models.L2VPN
fields = (
('name', 100),
('slug', 110),
('description', 500),
('comments', 5000),
)
display_attrs = ('type', 'identifier', 'tenant', 'description')