2016-11-16 10:12:14 +00:00
|
|
|
# coding:utf-8
|
|
|
|
from django.conf.urls import url
|
|
|
|
from .. import api
|
2017-01-06 12:34:24 +00:00
|
|
|
from rest_framework_bulk.routes import BulkRouter
|
2016-11-16 10:12:14 +00:00
|
|
|
|
|
|
|
app_name = 'assets'
|
|
|
|
|
|
|
|
|
2017-01-06 12:34:24 +00:00
|
|
|
router = BulkRouter()
|
2016-11-16 10:12:14 +00:00
|
|
|
router.register(r'v1/assets', api.AssetViewSet, 'asset')
|
|
|
|
router.register(r'v1/admin-user', api.AdminUserViewSet, 'admin-user')
|
|
|
|
router.register(r'v1/system-user', api.SystemUserViewSet, 'system-user')
|
2018-01-16 08:32:06 +00:00
|
|
|
router.register(r'v1/labels', api.LabelViewSet, 'label')
|
2018-01-31 09:01:21 +00:00
|
|
|
router.register(r'v1/nodes', api.NodeViewSet, 'node')
|
2018-03-23 11:46:46 +00:00
|
|
|
router.register(r'v1/domain', api.DomainViewSet, 'domain')
|
|
|
|
router.register(r'v1/gateway', api.GatewayViewSet, 'gateway')
|
2016-11-16 10:12:14 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2017-07-10 02:26:17 +00:00
|
|
|
url(r'^v1/assets-bulk/$', api.AssetListUpdateApi.as_view(), name='asset-bulk-update'),
|
2017-12-12 07:45:01 +00:00
|
|
|
url(r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]{36})/auth-info/', api.SystemUserAuthInfoApi.as_view(),
|
2016-12-29 11:17:00 +00:00
|
|
|
name='system-user-auth-info'),
|
2017-12-12 07:45:01 +00:00
|
|
|
url(r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]{36})/refresh/$',
|
2017-12-19 04:41:00 +00:00
|
|
|
api.AssetRefreshHardwareApi.as_view(), name='asset-refresh'),
|
|
|
|
url(r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]{36})/alive/$',
|
|
|
|
api.AssetAdminUserTestApi.as_view(), name='asset-alive-test'),
|
2018-07-10 08:03:05 +00:00
|
|
|
url(r'^v1/assets/(?P<pk>[0-9a-zA-Z\-]{36})/gateway/$',
|
|
|
|
api.AssetGatewayApi.as_view(), name='asset-gateway'),
|
2018-02-09 07:24:44 +00:00
|
|
|
url(r'^v1/admin-user/(?P<pk>[0-9a-zA-Z\-]{36})/nodes/$',
|
|
|
|
api.ReplaceNodesAdminUserApi.as_view(), name='replace-nodes-admin-user'),
|
2018-03-27 10:34:41 +00:00
|
|
|
url(r'^v1/admin-user/(?P<pk>[0-9a-zA-Z\-]{36})/auth/$',
|
|
|
|
api.AdminUserAuthApi.as_view(), name='admin-user-auth'),
|
2017-12-19 04:41:00 +00:00
|
|
|
url(r'^v1/admin-user/(?P<pk>[0-9a-zA-Z\-]{36})/connective/$',
|
|
|
|
api.AdminUserTestConnectiveApi.as_view(), name='admin-user-connective'),
|
|
|
|
url(r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]{36})/push/$',
|
|
|
|
api.SystemUserPushApi.as_view(), name='system-user-push'),
|
|
|
|
url(r'^v1/system-user/(?P<pk>[0-9a-zA-Z\-]{36})/connective/$',
|
|
|
|
api.SystemUserTestConnectiveApi.as_view(), name='system-user-connective'),
|
2018-05-31 11:47:57 +00:00
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/children/$',
|
|
|
|
api.NodeChildrenApi.as_view(), name='node-children'),
|
2018-04-10 12:29:06 +00:00
|
|
|
url(r'^v1/nodes/children/$', api.NodeChildrenApi.as_view(), name='node-children-2'),
|
2018-05-31 11:47:57 +00:00
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/children/add/$',
|
|
|
|
api.NodeAddChildrenApi.as_view(), name='node-add-children'),
|
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/assets/$',
|
|
|
|
api.NodeAssetsApi.as_view(), name='node-assets'),
|
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/assets/add/$',
|
|
|
|
api.NodeAddAssetsApi.as_view(), name='node-add-assets'),
|
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/assets/replace/$',
|
|
|
|
api.NodeReplaceAssetsApi.as_view(), name='node-replace-assets'),
|
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/assets/remove/$',
|
|
|
|
api.NodeRemoveAssetsApi.as_view(), name='node-remove-assets'),
|
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/refresh-hardware-info/$',
|
|
|
|
api.RefreshNodeHardwareInfoApi.as_view(), name='node-refresh-hardware-info'),
|
|
|
|
url(r'^v1/nodes/(?P<pk>[0-9a-zA-Z\-]{36})/test-connective/$',
|
|
|
|
api.TestNodeConnectiveApi.as_view(), name='node-test-connective'),
|
2018-03-23 11:46:46 +00:00
|
|
|
|
2018-05-31 11:47:57 +00:00
|
|
|
url(r'^v1/gateway/(?P<pk>[0-9a-zA-Z\-]{36})/test-connective/$',
|
|
|
|
api.GatewayTestConnectionApi.as_view(), name='test-gateway-connective'),
|
2016-11-16 10:12:14 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
urlpatterns += router.urls
|
|
|
|
|