1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/secrets/api/urls.py
2017-01-26 15:34:07 -05:00

31 lines
640 B
Python

from django.conf.urls import include, url
from rest_framework import routers
from .views import (
# Viewsets
SecretRoleViewSet,
# Legacy views
RSAKeyGeneratorView, SecretDetailView, SecretListView,
)
router = routers.DefaultRouter()
router.register(r'secret-roles', SecretRoleViewSet)
urlpatterns = [
url(r'', include(router.urls)),
# Secrets
url(r'^secrets/$', SecretListView.as_view(), name='secret_list'),
url(r'^secrets/(?P<pk>\d+)/$', SecretDetailView.as_view(), name='secret_detail'),
# Miscellaneous
url(r'^generate-keys/$', RSAKeyGeneratorView.as_view(), name='generate_keys'),
]