Tony Mack | 0b2b804 | 2013-04-07 19:55:27 -0400 | [diff] [blame] | 1 | from rest_framework.decorators import api_view |
| 2 | from rest_framework.response import Response |
| 3 | from rest_framework.reverse import reverse |
| 4 | |
| 5 | @api_view(['GET']) |
| 6 | def api_root(request, format=None): |
| 7 | return Response({ |
Tony Mack | 6b3ab0c | 2013-04-07 23:42:44 -0400 | [diff] [blame] | 8 | 'roles': reverse('role-list', request=request, format=format), |
Tony Mack | 5cc16ba | 2013-04-09 10:30:45 -0400 | [diff] [blame] | 9 | 'users': reverse('user-list', request=request, format=format), |
Tony Mack | e4cee7a | 2013-04-09 12:45:32 -0400 | [diff] [blame] | 10 | 'keys': reverse('key-list', request=request, format=format), |
Tony Mack | 6b3ab0c | 2013-04-07 23:42:44 -0400 | [diff] [blame] | 11 | #'nodes': reverse('node-list', request=request, format=format), |
Tony Mack | e87bffa | 2013-04-08 23:18:04 -0400 | [diff] [blame] | 12 | 'sites': reverse('site-list', request=request, format=format), |
Tony Mack | 2605cee | 2013-04-09 02:36:18 -0400 | [diff] [blame] | 13 | 'deploymentNetworks': reverse('deploymentnetwork-list', request=request, format=format), |
Tony Mack | 17027f5 | 2013-04-09 22:38:01 -0400 | [diff] [blame] | 14 | 'slices': reverse('slice-list', request=request, format=format), |
Tony Mack | 29c287f | 2013-04-11 21:07:16 -0400 | [diff] [blame] | 15 | 'subnets': reverse('subnet-list', request=request, format=format), |
| 16 | 'slivers': reverse('sliver-list', request=request, format=format), |
Tony Mack | 5331008 | 2013-04-09 09:26:12 -0400 | [diff] [blame] | 17 | 'images': reverse('image-list', request=request, format=format), |
Tony Mack | 316210e | 2013-04-09 09:50:36 -0400 | [diff] [blame] | 18 | 'flavors': reverse('flavor-list', request=request, format=format), |
Tony Mack | 0b2b804 | 2013-04-07 19:55:27 -0400 | [diff] [blame] | 19 | }) |