blob: f1e3ba56dabea26167b71b1b92867e4a8c7b3a15 [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 Mackf1c12242013-04-09 16:08:43 -04005from plstackapi.core.views.roles import RoleListCreate, RoleRetrieveUpdateDestroy
6from plstackapi.core.views.sites import SiteListCreate, SiteRetrieveUpdateDestroy
7from plstackapi.core.views.users import UserListCreate, UserRetrieveUpdateDestroy
8from plstackapi.core.views.keys import KeyListCreate, KeyRetrieveUpdateDestroy
9from plstackapi.core.views.deployment_networks import DeploymentNetworkListCreate, DeploymentNetworkRetrieveUpdateDestroy
10from plstackapi.core.views.images import ImageListCreate, ImageRetrieveUpdateDestroy
11from plstackapi.core.views.flavors import FlavorListCreate, FlavorRetrieveUpdateDestroy
12from plstackapi.core.models import Site
13from plstackapi.planetstack.api_root import api_root
Tony Mack7130ac32013-03-22 21:58:00 -040014from rest_framework import generics
15
16admin.autodiscover()
17
18urlpatterns = patterns('',
19 # Examples:
20 # url(r'^$', 'planetstack.views.home', name='home'),
21 # url(r'^planetstack/', include('planetstack.foo.urls')),
22
23 # Uncomment the admin/doc line below to enable admin documentation:
24 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
25
26 # Uncomment the next line to enable the admin:
27 url(r'^admin/', include(admin.site.urls)),
28
Tony Mack799b60f2013-04-09 16:22:04 -040029 #url(r'^plstackapi/$', api_root),
Tony Mack70dce1a2013-04-07 20:22:37 -040030
Tony Mack27812cb2013-04-08 21:16:40 -040031 url(r'^plstackapi/roles/$', RoleListCreate.as_view(), name='role-list'),
Tony Mack48b1e252013-04-08 20:54:33 -040032 url(r'^plstackapi/roles/(?P<pk>[a-zA-Z0-9]+)/$', RoleRetrieveUpdateDestroy.as_view(), name='role-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040033
Tony Mack5cc16ba2013-04-09 10:30:45 -040034 url(r'^plstackapi/users/$', UserListCreate.as_view(), name='user-list'),
35 url(r'^plstackapi/users/(?P<pk>[a-zA-Z0-9]+)/$', UserRetrieveUpdateDestroy.as_view(), name='user-detail'),
36
Tony Macke4cee7a2013-04-09 12:45:32 -040037 url(r'^plstackapi/keys/$', KeyListCreate.as_view(), name='key-list'),
38 url(r'^plstackapi/keys/(?P<pk>[a-zA-Z0-9]+)/$', KeyRetrieveUpdateDestroy.as_view(), name='key-detail'),
39
Tony Macke87bffa2013-04-08 23:18:04 -040040 url(r'^plstackapi/sites/$', SiteListCreate.as_view(), name='site-list'),
Tony Mack6bdc4752013-04-09 01:05:37 -040041 url(r'^plstackapi/sites/(?P<pk>[a-zA-Z0-9_]+)/$', SiteRetrieveUpdateDestroy.as_view(), name='site-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040042
Tony Macke4cee7a2013-04-09 12:45:32 -040043
Tony Mack70dce1a2013-04-07 20:22:37 -040044 #url(r'^plstackapi/slices/$', views.SliceList.as_view(), name='slice-list'),
45 #url(r'^plstackapi/slices/(?P<pk>[0-9]+)/$', views.SliceDetail.as_view(), name='slice-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040046
Tony Mack70dce1a2013-04-07 20:22:37 -040047 #url(r'^plstackapi/slivers/$', views.SliverList.as_view()),
48 #url(r'^plstackapi/slivers/(?P<pk>[0-9]+)/$', views.SliverDetail.as_view()),
Tony Mack7130ac32013-03-22 21:58:00 -040049
Tony Mack70dce1a2013-04-07 20:22:37 -040050 #url(r'^plstackapi/nodes/$', views.NodeList.as_view(), name='node-list'),
51 #url(r'^plstackapi/nodes/(?P<pk>[0-9]+)/$', views.NodeDetail.as_view(), name='node-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040052
Tony Mack53310082013-04-09 09:26:12 -040053
Tony Mack97238a02013-04-09 02:53:31 -040054 url(r'^plstackapi/deploymentnetworks/$', DeploymentNetworkListCreate.as_view(), name='deploymentnetwork-list'),
Tony Mack5f9625b2013-04-09 02:44:34 -040055 url(r'^plstackapi/deploymentnetworks/(?P<pk>[a-zA-Z0-9]+)/$', DeploymentNetworkRetrieveUpdateDestroy.as_view(), name='deploymentnetwork-detail'),
Tony Mack70dce1a2013-04-07 20:22:37 -040056
57 #url(r'^plstackapi/sitedeploymentnetworks/$', views.SiteDeploymentNetworkList.as_view(), name='sitedeploymentnetwork-list'),
58 #url(r'^plstackapi/sitedeploymentnetworks/(?P<pk>[0-9]+)/$', views.SiteDeploymentNetworkDetail.as_view(), name='sitedeploymentnetwork-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040059
Tony Mack53310082013-04-09 09:26:12 -040060 url(r'^plstackapi/images/$', ImageListCreate.as_view(), name='image-list'),
61 url(r'^plstackapi/images/(?P<pk>[a-zA-Z0-9_]+)/$', ImageRetrieveUpdateDestroy.as_view(), name='image-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040062
Tony Mack316210e2013-04-09 09:50:36 -040063 url(r'^plstackapi/flavors/$', FlavorListCreate.as_view(), name='flavor-list'),
64 url(r'^plstackapi/flavors/(?P<pk>[a-zA-Z0-9_]+)/$', FlavorRetrieveUpdateDestroy.as_view(), name='flavor-detail'),
Tony Mack7130ac32013-03-22 21:58:00 -040065 #Adding in rest_framework urls
Tony Mack799b60f2013-04-09 16:22:04 -040066 #url(r'^plstackapi/', include('rest_framework.urls', namespace='rest_framework')),
Tony Mack7130ac32013-03-22 21:58:00 -040067
68)