# from django.contrib import admin # from rest_framework import viewsets router = HybridDefaultRouter() router.register(r'infrastructure', views.InfrastructureView, base_name='infrastructure') router.register(r'applications', views.ApplicationViewSet) # router.register(r'images', views.ImageViewSet) router.register(r'deployments', views.DeploymentViewSet, base_name='deployments') router.register(r'auth', views.AuthView, base_name='auth') router.register(r'cors_proxy', views.CorsProxyView, base_name='corsproxy') deployments_router = HybridNestedRouter(router, r'deployments', lookup='deployment') deployments_router.register(r'tasks', views.DeploymentTaskViewSet, base_name='deployment_task') ### Temp endpoints ### #cloud_router.register(r'cloudman', views.CloudManViewSet, base_name='cloudman') ### Public services ### router.register(r'public_services', views.PublicServiceViewSet) public_services_router = HybridSimpleRouter() public_services_router.register(r'sponsors', views.SponsorViewSet) public_services_router.register(r'locations', views.LocationViewSet) infrastructure_regex_pattern = r'api/v1/infrastructure/'
"""CloudMan Create URL configuration.""" from django.conf.urls import include from django.conf.urls import url from . import views from djcloudbridge.drf_routers import HybridDefaultRouter from djcloudbridge.drf_routers import HybridNestedRouter router = HybridDefaultRouter() router.register(r'clusters', views.ClusterViewSet, base_name='clusters') cluster_router = HybridNestedRouter(router, r'clusters', lookup='cluster') cluster_router.register(r'nodes', views.ClusterNodeViewSet, base_name='node') app_name = "clusterman" cluster_regex_pattern = r'^' urlpatterns = [ url(r'^', include(router.urls)), url(cluster_regex_pattern, include(cluster_router.urls)) ]
"""CloudMan Create URL configuration.""" from django.conf.urls import include from django.conf.urls import url from . import views from helmsman import views as helmsman_views from djcloudbridge.drf_routers import HybridDefaultRouter from djcloudbridge.drf_routers import HybridNestedRouter router = HybridDefaultRouter() router.register(r'projects', views.ProjectViewSet, base_name='projects') project_router = HybridNestedRouter(router, r'projects', lookup='project') project_router.register(r'charts', views.ProjectChartViewSet, base_name='chart') app_name = "projman" cluster_regex_pattern = r'^' urlpatterns = [ url(r'^', include(router.urls)), url(cluster_regex_pattern, include(project_router.urls)) ]
"""CloudMan Create URL configuration.""" from django.conf.urls import include from django.conf.urls import url from . import views from djcloudbridge.drf_routers import HybridDefaultRouter from djcloudbridge.drf_routers import HybridNestedRouter router = HybridDefaultRouter() router.register(r'clusters', views.ClusterViewSet, basename='clusters') cluster_router = HybridNestedRouter(router, r'clusters', lookup='cluster') cluster_router.register(r'nodes', views.ClusterNodeViewSet, basename='node') cluster_router.register(r'autoscalers', views.ClusterAutoScalerViewSet, basename='autoscaler') cluster_router.register(r'signals/scaleup', views.ClusterScaleUpSignalViewSet, basename='scaleupsignal') cluster_router.register(r'signals/scaledown', views.ClusterScaleDownSignalViewSet, basename='scaledownsignal') app_name = "clusterman" cluster_regex_pattern = r'^' urlpatterns = [ url(r'^', include(router.urls)), url(cluster_regex_pattern, include(cluster_router.urls)) ]