2016-12-11 04:05:11 +00:00
|
|
|
# ~*~ coding: utf-8 ~*~
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2018-07-27 10:56:40 +00:00
|
|
|
from django.urls import path
|
2016-12-05 15:02:08 +00:00
|
|
|
from rest_framework.routers import DefaultRouter
|
2020-11-04 06:53:49 +00:00
|
|
|
from rest_framework_bulk.routes import BulkRouter
|
2022-10-25 12:02:23 +00:00
|
|
|
|
2017-03-22 16:15:25 +00:00
|
|
|
from .. import api
|
2016-12-11 04:05:11 +00:00
|
|
|
|
2017-12-12 06:28:12 +00:00
|
|
|
app_name = "ops"
|
|
|
|
|
2017-03-22 16:15:25 +00:00
|
|
|
router = DefaultRouter()
|
2020-11-04 06:53:49 +00:00
|
|
|
bulk_router = BulkRouter()
|
|
|
|
|
2023-02-09 11:02:45 +00:00
|
|
|
bulk_router.register(r'adhocs', api.AdHocViewSet, 'adhoc')
|
|
|
|
bulk_router.register(r'playbooks', api.PlaybookViewSet, 'playbook')
|
|
|
|
bulk_router.register(r'jobs', api.JobViewSet, 'job')
|
|
|
|
bulk_router.register(r'job-executions', api.JobExecutionViewSet, 'job-execution')
|
2022-11-11 11:20:17 +00:00
|
|
|
|
2019-12-05 07:09:25 +00:00
|
|
|
router.register(r'celery/period-tasks', api.CeleryPeriodTaskViewSet, 'celery-period-task')
|
2022-10-25 12:02:23 +00:00
|
|
|
|
|
|
|
router.register(r'tasks', api.CeleryTaskViewSet, 'task')
|
2022-11-11 11:20:17 +00:00
|
|
|
router.register(r'task-executions', api.CeleryTaskExecutionViewSet, 'task-executions')
|
2017-03-22 16:15:25 +00:00
|
|
|
|
2018-01-08 11:16:28 +00:00
|
|
|
urlpatterns = [
|
2023-01-18 10:03:33 +00:00
|
|
|
path('playbook/<uuid:pk>/file/', api.PlaybookFileBrowserAPIView.as_view(), name='playbook-file'),
|
2022-12-06 11:43:32 +00:00
|
|
|
path('variables/help/', api.JobRunVariableHelpAPIView.as_view(), name='variable-help'),
|
2022-12-07 12:13:26 +00:00
|
|
|
path('job-execution/asset-detail/', api.JobAssetDetail.as_view(), name='asset-detail'),
|
2023-01-16 11:02:09 +00:00
|
|
|
path('job-execution/task-detail/<uuid:task_id>/', api.JobExecutionTaskDetail.as_view(), name='task-detail'),
|
2022-12-26 11:02:05 +00:00
|
|
|
path('frequent-username/', api.FrequentUsernames.as_view(), name='frequent-usernames'),
|
2022-11-11 11:20:17 +00:00
|
|
|
path('ansible/job-execution/<uuid:pk>/log/', api.AnsibleTaskLogApi.as_view(), name='job-execution-log'),
|
|
|
|
|
2022-10-25 12:02:23 +00:00
|
|
|
path('celery/task/<uuid:name>/task-execution/<uuid:pk>/log/', api.CeleryTaskExecutionLogApi.as_view(),
|
|
|
|
name='celery-task-execution-log'),
|
|
|
|
path('celery/task/<uuid:name>/task-execution/<uuid:pk>/result/', api.CeleryResultApi.as_view(),
|
|
|
|
name='celery-task-execution-result'),
|
|
|
|
|
2018-01-08 11:16:28 +00:00
|
|
|
]
|
2017-03-22 16:15:25 +00:00
|
|
|
|
2022-11-11 11:20:17 +00:00
|
|
|
urlpatterns += (router.urls + bulk_router.urls)
|