-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from Onemind-Services-LLC/NB-17-Upgrade-v4
NB-17 Support Added for NetBox v4.0
- Loading branch information
Showing
23 changed files
with
82 additions
and
235 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG NETBOX_VARIANT=v3.7 | ||
ARG NETBOX_VARIANT=v4.0 | ||
|
||
FROM netboxcommunity/netbox:${NETBOX_VARIANT} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
version: '3.4' | ||
|
||
services: | ||
netbox: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
from netbox_metatype_importer.models import MetaType | ||
from rest_framework import serializers | ||
|
||
from ..models import MetaType | ||
from rest_framework.serializers import HyperlinkedIdentityField | ||
|
||
|
||
class MetaTypeSerializer(serializers.ModelSerializer): | ||
url = HyperlinkedIdentityField(view_name="plugins-api:netbox_metatype_importer-api:metatype-detail") | ||
|
||
class Meta: | ||
model = MetaType | ||
fields = "__all__" | ||
brief_fields = ("id", "url", "display", "name", "description") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
from netbox.api.routers import NetBoxRouter | ||
|
||
from . import views | ||
from .views import ( | ||
DeviceTypeListViewSet, | ||
ModuleTypeListViewSet, | ||
MetaDeviceTypeLoadViewSet, | ||
MetaModuleTypeLoadViewSet, | ||
MetaDeviceTypeImportViewSet, | ||
MetaModuleTypeImportViewSet, | ||
MetaTypeRootView, | ||
) | ||
|
||
router = NetBoxRouter() | ||
router.APIRootView = views.MetaTypeRootView | ||
router.APIRootView = MetaTypeRootView | ||
|
||
router.register('device-types', views.DeviceTypeListViewSet, basename='device-types') | ||
router.register('module-types', views.ModuleTypeListViewSet, basename="module-types") | ||
router.register('device-types', DeviceTypeListViewSet, basename='device-types') | ||
router.register('module-types', ModuleTypeListViewSet, basename="module-types") | ||
|
||
router.register('device-type-load', views.MetaDeviceTypeLoadViewSet, basename='device-type-load') | ||
router.register('module-type-load', views.MetaModuleTypeLoadViewSet, basename="module-type-load") | ||
router.register('device-type-load', MetaDeviceTypeLoadViewSet, basename='device-type-load') | ||
router.register('module-type-load', MetaModuleTypeLoadViewSet, basename="module-type-load") | ||
|
||
router.register('device-type-import', views.MetaDeviceTypeImportViewSet, basename='device-type-import') | ||
router.register('module-type-import', views.MetaModuleTypeImportViewSet, basename="module-type-import") | ||
router.register('device-type-import', MetaDeviceTypeImportViewSet, basename='device-type-import') | ||
router.register('module-type-import', MetaModuleTypeImportViewSet, basename="module-type-import") | ||
|
||
urlpatterns = router.urls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.