blob: 583e7c4f1b3811cf2ac37a33d5fdeccefda79959 [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({
Tony Mack6b3ab0c2013-04-07 23:42:44 -04008 'roles': reverse('role-list', request=request, format=format),
Tony Mack5cc16ba2013-04-09 10:30:45 -04009 'users': reverse('user-list', request=request, format=format),
Tony Macke4cee7a2013-04-09 12:45:32 -040010 'keys': reverse('key-list', request=request, format=format),
Tony Mack6b3ab0c2013-04-07 23:42:44 -040011 #'nodes': reverse('node-list', request=request, format=format),
Tony Macke87bffa2013-04-08 23:18:04 -040012 'sites': reverse('site-list', request=request, format=format),
Tony Mack2605cee2013-04-09 02:36:18 -040013 'deploymentNetworks': reverse('deploymentnetwork-list', request=request, format=format),
Tony Mack17027f52013-04-09 22:38:01 -040014 'slices': reverse('slice-list', request=request, format=format),
Tony Mack29c287f2013-04-11 21:07:16 -040015 'subnets': reverse('subnet-list', request=request, format=format),
16 'slivers': reverse('sliver-list', request=request, format=format),
Tony Mack53310082013-04-09 09:26:12 -040017 'images': reverse('image-list', request=request, format=format),
Tony Mack316210e2013-04-09 09:50:36 -040018 'flavors': reverse('flavor-list', request=request, format=format),
Tony Mack0b2b8042013-04-07 19:55:27 -040019 })