blob: 10ceae116813c072b97237e6e1dff6f25061b158 [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 Mack6b3ab0c2013-04-07 23:42:44 -040014 #'slices': reverse('slice-list', request=request, format=format)
Tony Mack53310082013-04-09 09:26:12 -040015 'images': reverse('image-list', request=request, format=format),
Tony Mack316210e2013-04-09 09:50:36 -040016 'flavors': reverse('flavor-list', request=request, format=format),
Tony Mack0b2b8042013-04-07 19:55:27 -040017 })