blob: 33db4f2225baf0012b613ee7da5870e1d99998c1 [file] [log] [blame]
Tony Mack7130ac32013-03-22 21:58:00 -04001from django.conf.urls import patterns, include, url
2
3# Uncomment the next two lines to enable the admin:
4from django.contrib import admin
Tony Mackce61bd72013-04-08 20:37:12 -04005from plstackapi.planetstack.views.roles import RoleListCreate, RoleRetrieveUpdateDestroy
Tony Mack3de616f2013-04-08 23:22:09 -04006from plstackapi.planetstack.views.sites import SiteListCreate, SiteRetrieveUpdateDestroy
Tony Mack4d6578e2013-04-09 02:39:17 -04007from plstackapi.planetstack.views.deployment_networks import DeploymentNetworkListCreate, DeploymentNetworkRetrieveUpdateDestroy
Tony Mack70dce1a2013-04-07 20:22:37 -04008from plstackapi.planetstack.views.api_root import api_root
Tony Mack0e17ee22013-04-06 20:04:02 -04009from plstackapi.planetstack.models import Site
Tony Mack7130ac32013-03-22 21:58:00 -040010from rest_framework import generics
11
12admin.autodiscover()
13
14urlpatterns = patterns('',
15 # Examples:
16 # url(r'^$', 'planetstack.views.home', name='home'),
17 # url(r'^planetstack/', include('planetstack.foo.urls')),
18
19 # Uncomment the admin/doc line below to enable admin documentation:
20 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
21
22 # Uncomment the next line to enable the admin:
23 url(r'^admin/', include(admin.site.urls)),
24
25 url(r'^plstackapi/$', api_root),
Tony Mack70dce1a2013-04-07 20:22:37 -040026
Tony Mack27812cb2013-04-08 21:16:40 -040027 url(r'^plstackapi/roles/$', RoleListCreate.as_view(), name='role-list'),
Tony Mack48b1e252013-04-08 20:54:33 -040028 url(r'^plstackapi/roles/(?P<pk>[a-zA-Z0-9]+)/$', RoleRetrieveUpdateDestroy.as_view(), name='role-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040029
Tony Macke87bffa2013-04-08 23:18:04 -040030 url(r'^plstackapi/sites/$', SiteListCreate.as_view(), name='site-list'),
Tony Mack6bdc4752013-04-09 01:05:37 -040031 url(r'^plstackapi/sites/(?P<pk>[a-zA-Z0-9_]+)/$', SiteRetrieveUpdateDestroy.as_view(), name='site-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040032
Tony Mack70dce1a2013-04-07 20:22:37 -040033 #url(r'^plstackapi/slices/$', views.SliceList.as_view(), name='slice-list'),
34 #url(r'^plstackapi/slices/(?P<pk>[0-9]+)/$', views.SliceDetail.as_view(), name='slice-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040035
Tony Mack70dce1a2013-04-07 20:22:37 -040036 #url(r'^plstackapi/slivers/$', views.SliverList.as_view()),
37 #url(r'^plstackapi/slivers/(?P<pk>[0-9]+)/$', views.SliverDetail.as_view()),
Tony Mack7130ac32013-03-22 21:58:00 -040038
Tony Mack70dce1a2013-04-07 20:22:37 -040039 #url(r'^plstackapi/nodes/$', views.NodeList.as_view(), name='node-list'),
40 #url(r'^plstackapi/nodes/(?P<pk>[0-9]+)/$', views.NodeDetail.as_view(), name='node-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040041
Tony Mack97238a02013-04-09 02:53:31 -040042 url(r'^plstackapi/deploymentnetworks/$', DeploymentNetworkListCreate.as_view(), name='deploymentnetwork-list'),
Tony Mack5f9625b2013-04-09 02:44:34 -040043 url(r'^plstackapi/deploymentnetworks/(?P<pk>[a-zA-Z0-9]+)/$', DeploymentNetworkRetrieveUpdateDestroy.as_view(), name='deploymentnetwork-detail'),
Tony Mack70dce1a2013-04-07 20:22:37 -040044
45 #url(r'^plstackapi/sitedeploymentnetworks/$', views.SiteDeploymentNetworkList.as_view(), name='sitedeploymentnetwork-list'),
46 #url(r'^plstackapi/sitedeploymentnetworks/(?P<pk>[0-9]+)/$', views.SiteDeploymentNetworkDetail.as_view(), name='sitedeploymentnetwork-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040047
48
49 #Adding in rest_framework urls
50 url(r'^plstackapi/', include('rest_framework.urls', namespace='rest_framework')),
51
52)