Coverage for netbox_data_import/api/urls.py: 100.00%
19 statements
« prev ^ index » next coverage.py v7.17.0, created at 2026-10-30 09:47 +0000
« prev ^ index » next coverage.py v7.17.0, created at 2026-10-30 09:47 +0000
1# SPDX-License-Identifier: Apache-2.0
2# Copyright (C) 2025 Marcin Zieba <marcinpsk@gmail.com>
3"""URL router for the data-import plugin API."""
5from django.urls import path
6from netbox.api.routers import NetBoxRouter
8from .views import (
9 ImportProfileViewSet,
10 CableClassMappingViewSet,
11 CableImportSourceViewSet,
12 ColumnMappingViewSet,
13 ClassRoleMappingViewSet,
14 DeviceTypeMappingViewSet,
15 IgnoredDeviceViewSet,
16 ColumnTransformRuleViewSet,
17 SourceResolutionViewSet,
18 ImportExecutionViewSet,
19 InferenceBackendViewSet,
20 PortClassMappingViewSet,
21 ResolutionProposalHistoryViewSet,
22 ResolutionProposalViewSet,
23)
25router = NetBoxRouter()
26router.register("profiles", ImportProfileViewSet)
27router.register("cable-class-mappings", CableClassMappingViewSet)
28router.register("port-class-mappings", PortClassMappingViewSet)
29router.register("cable-provenance", CableImportSourceViewSet)
30router.register("column-mappings", ColumnMappingViewSet)
31router.register("class-role-mappings", ClassRoleMappingViewSet)
32router.register("device-type-mappings", DeviceTypeMappingViewSet)
33router.register("ignored-devices", IgnoredDeviceViewSet)
34router.register("column-transforms", ColumnTransformRuleViewSet)
35router.register("source-resolutions", SourceResolutionViewSet)
36router.register("executions", ImportExecutionViewSet)
37router.register("ai-backends", InferenceBackendViewSet)
38router.register("resolution-proposals", ResolutionProposalViewSet)
40app_name = "netbox_data_import"
41urlpatterns = [
42 path(
43 "resolution-proposal-history/",
44 ResolutionProposalHistoryViewSet.as_view({"get": "list"}),
45 name="resolutionproposalhistory-list",
46 ),
47 *router.urls,
48]