2022-10-10 11:00:59 -07:00
|
|
|
from netbox.search import SearchIndex, register_search
|
2022-10-21 13:16:16 -04:00
|
|
|
from . import models
|
2022-10-10 11:00:59 -07:00
|
|
|
|
|
|
|
|
2022-10-21 13:16:16 -04:00
|
|
|
@register_search
|
|
|
|
class CircuitIndex(SearchIndex):
|
|
|
|
model = models.Circuit
|
|
|
|
fields = (
|
|
|
|
('cid', 100),
|
|
|
|
('description', 500),
|
|
|
|
('comments', 5000),
|
|
|
|
)
|
2022-10-10 11:00:59 -07:00
|
|
|
|
|
|
|
|
2022-10-21 13:16:16 -04:00
|
|
|
@register_search
|
|
|
|
class CircuitTerminationIndex(SearchIndex):
|
|
|
|
model = models.CircuitTermination
|
|
|
|
fields = (
|
|
|
|
('xconnect_id', 300),
|
|
|
|
('pp_info', 300),
|
|
|
|
('description', 500),
|
|
|
|
('port_speed', 2000),
|
|
|
|
('upstream_speed', 2000),
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class CircuitTypeIndex(SearchIndex):
|
|
|
|
model = models.CircuitType
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('slug', 110),
|
|
|
|
('description', 500),
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@register_search
|
|
|
|
class ProviderIndex(SearchIndex):
|
|
|
|
model = models.Provider
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
2022-11-15 10:37:35 -05:00
|
|
|
('description', 500),
|
2022-10-21 13:16:16 -04:00
|
|
|
('comments', 5000),
|
2022-10-10 11:00:59 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2023-03-29 07:27:11 -05:00
|
|
|
class ProviderAccountIndex(SearchIndex):
|
|
|
|
model = models.ProviderAccount
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('account', 200),
|
|
|
|
('comments', 5000),
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-10-21 13:16:16 -04:00
|
|
|
@register_search
|
2022-10-10 11:00:59 -07:00
|
|
|
class ProviderNetworkIndex(SearchIndex):
|
2022-10-21 13:16:16 -04:00
|
|
|
model = models.ProviderNetwork
|
|
|
|
fields = (
|
|
|
|
('name', 100),
|
|
|
|
('service_id', 200),
|
|
|
|
('description', 500),
|
|
|
|
('comments', 5000),
|
|
|
|
)
|