2016-11-16 10:12:14 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
|
2016-12-25 09:44:39 +00:00
|
|
|
from django.conf.urls import url
|
2016-11-16 10:12:14 +00:00
|
|
|
from rest_framework import routers
|
|
|
|
|
|
|
|
from .. import api
|
|
|
|
|
2016-12-25 15:10:53 +00:00
|
|
|
app_name = 'applications'
|
2016-11-16 10:12:14 +00:00
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
2016-12-25 15:10:53 +00:00
|
|
|
router.register(r'v1/terminal/heatbeat', api.TerminalHeatbeatViewSet, 'terminal-heatbeat')
|
2016-12-27 16:28:52 +00:00
|
|
|
router.register(r'v1/terminal', api.TerminalViewSet, 'terminal')
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2016-12-25 09:44:39 +00:00
|
|
|
urlpatterns = [
|
2017-02-11 11:49:15 +00:00
|
|
|
url(r'^v1/terminal/register/$', api.TerminalRegisterView.as_view(),
|
|
|
|
name='terminal-register'),
|
|
|
|
url(r'^v1/terminate/connection/$', api.TerminateConnectionView.as_view(),
|
|
|
|
name='terminate-connection')
|
2016-12-27 16:28:52 +00:00
|
|
|
# url(r'^v1/terminal/heatbeat/$', api.TestHeatbeat.as_view())
|
2016-12-25 09:44:39 +00:00
|
|
|
]
|
2016-11-16 10:12:14 +00:00
|
|
|
|
2016-12-30 14:21:50 +00:00
|
|
|
urlpatterns += router.urls
|