Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 1 | from django.conf.urls import patterns, include, url |
| 2 | |
| 3 | # Uncomment the next two lines to enable the admin: |
| 4 | from django.contrib import admin |
Tony Mack | ce61bd7 | 2013-04-08 20:37:12 -0400 | [diff] [blame] | 5 | from plstackapi.planetstack.views.roles import RoleListCreate, RoleRetrieveUpdateDestroy |
Tony Mack | 3de616f | 2013-04-08 23:22:09 -0400 | [diff] [blame] | 6 | from plstackapi.planetstack.views.sites import SiteListCreate, SiteRetrieveUpdateDestroy |
Tony Mack | 5cc16ba | 2013-04-09 10:30:45 -0400 | [diff] [blame] | 7 | from plstackapi.planetstack.views.users import UserListCreate, UserRetrieveUpdateDestroy |
Tony Mack | e4cee7a | 2013-04-09 12:45:32 -0400 | [diff] [blame^] | 8 | from plstackapi.planetstack.views.users import KeyListCreate, KeyRetrieveUpdateDestroy |
Tony Mack | 4d6578e | 2013-04-09 02:39:17 -0400 | [diff] [blame] | 9 | from plstackapi.planetstack.views.deployment_networks import DeploymentNetworkListCreate, DeploymentNetworkRetrieveUpdateDestroy |
Tony Mack | 5331008 | 2013-04-09 09:26:12 -0400 | [diff] [blame] | 10 | from plstackapi.planetstack.views.images import ImageListCreate, ImageRetrieveUpdateDestroy |
Tony Mack | 316210e | 2013-04-09 09:50:36 -0400 | [diff] [blame] | 11 | from plstackapi.planetstack.views.flavors import FlavorListCreate, FlavorRetrieveUpdateDestroy |
Tony Mack | 70dce1a | 2013-04-07 20:22:37 -0400 | [diff] [blame] | 12 | from plstackapi.planetstack.views.api_root import api_root |
Tony Mack | 0e17ee2 | 2013-04-06 20:04:02 -0400 | [diff] [blame] | 13 | from plstackapi.planetstack.models import Site |
Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 14 | from rest_framework import generics |
| 15 | |
| 16 | admin.autodiscover() |
| 17 | |
| 18 | urlpatterns = 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 | |
| 29 | url(r'^plstackapi/$', api_root), |
Tony Mack | 70dce1a | 2013-04-07 20:22:37 -0400 | [diff] [blame] | 30 | |
Tony Mack | 27812cb | 2013-04-08 21:16:40 -0400 | [diff] [blame] | 31 | url(r'^plstackapi/roles/$', RoleListCreate.as_view(), name='role-list'), |
Tony Mack | 48b1e25 | 2013-04-08 20:54:33 -0400 | [diff] [blame] | 32 | url(r'^plstackapi/roles/(?P<pk>[a-zA-Z0-9]+)/$', RoleRetrieveUpdateDestroy.as_view(), name='role-detail'), |
Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 33 | |
Tony Mack | 5cc16ba | 2013-04-09 10:30:45 -0400 | [diff] [blame] | 34 | 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 Mack | e4cee7a | 2013-04-09 12:45:32 -0400 | [diff] [blame^] | 37 | 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 Mack | e87bffa | 2013-04-08 23:18:04 -0400 | [diff] [blame] | 40 | url(r'^plstackapi/sites/$', SiteListCreate.as_view(), name='site-list'), |
Tony Mack | 6bdc475 | 2013-04-09 01:05:37 -0400 | [diff] [blame] | 41 | url(r'^plstackapi/sites/(?P<pk>[a-zA-Z0-9_]+)/$', SiteRetrieveUpdateDestroy.as_view(), name='site-detail'), |
Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 42 | |
Tony Mack | e4cee7a | 2013-04-09 12:45:32 -0400 | [diff] [blame^] | 43 | |
Tony Mack | 70dce1a | 2013-04-07 20:22:37 -0400 | [diff] [blame] | 44 | #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 Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 46 | |
Tony Mack | 70dce1a | 2013-04-07 20:22:37 -0400 | [diff] [blame] | 47 | #url(r'^plstackapi/slivers/$', views.SliverList.as_view()), |
| 48 | #url(r'^plstackapi/slivers/(?P<pk>[0-9]+)/$', views.SliverDetail.as_view()), |
Tony Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 49 | |
Tony Mack | 70dce1a | 2013-04-07 20:22:37 -0400 | [diff] [blame] | 50 | #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 Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 52 | |
Tony Mack | 5331008 | 2013-04-09 09:26:12 -0400 | [diff] [blame] | 53 | |
Tony Mack | 97238a0 | 2013-04-09 02:53:31 -0400 | [diff] [blame] | 54 | url(r'^plstackapi/deploymentnetworks/$', DeploymentNetworkListCreate.as_view(), name='deploymentnetwork-list'), |
Tony Mack | 5f9625b | 2013-04-09 02:44:34 -0400 | [diff] [blame] | 55 | url(r'^plstackapi/deploymentnetworks/(?P<pk>[a-zA-Z0-9]+)/$', DeploymentNetworkRetrieveUpdateDestroy.as_view(), name='deploymentnetwork-detail'), |
Tony Mack | 70dce1a | 2013-04-07 20:22:37 -0400 | [diff] [blame] | 56 | |
| 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 Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 59 | |
Tony Mack | 5331008 | 2013-04-09 09:26:12 -0400 | [diff] [blame] | 60 | 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 Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 62 | |
Tony Mack | 316210e | 2013-04-09 09:50:36 -0400 | [diff] [blame] | 63 | 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 Mack | 7130ac3 | 2013-03-22 21:58:00 -0400 | [diff] [blame] | 65 | #Adding in rest_framework urls |
| 66 | url(r'^plstackapi/', include('rest_framework.urls', namespace='rest_framework')), |
| 67 | |
| 68 | ) |