blob: 4ac267a01dbf0ad888d886d0665a33ff478aa09f [file] [log] [blame]
Tony Mack0b2b8042013-04-07 19:55:27 -04001from rest_framework.decorators import api_view
2from rest_framework.response import Response
3from rest_framework.reverse import reverse
4
5@api_view(['GET'])
6def api_root(request, format=None):
7 return Response({
Siobhan Tully5d7dc8d2013-07-02 13:17:33 -04008 'deployments': reverse('deployment-list', request=request, format=format),
Tony Mack53310082013-04-09 09:26:12 -04009 'images': reverse('image-list', request=request, format=format),
Siobhan Tully61367092013-07-07 17:20:18 -040010 'nodes': reverse('node-list', request=request, format=format),
11 'projects': reverse('project-list', request=request, format=format),
12 'reservations': reverse('reservation-list', request=request, format=format),
13 'roles': reverse('role-list', request=request, format=format),
14 'serviceclasses': reverse('serviceclass-list', request=request, format=format),
15 'serviceresources': reverse('serviceresource-list', request=request, format=format),
16 'sites': reverse('site-list', request=request, format=format),
17 'slices': reverse('slice-list', request=request, format=format),
18 'slivers': reverse('sliver-list', request=request, format=format),
19 'tags': reverse('tag-list', request=request, format=format),
20 'users': reverse('user-list', request=request, format=format),
Tony Mack0b2b8042013-04-07 19:55:27 -040021 })