forked from uncloud/uncloud
c6bacab35a
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
16 lines
486 B
Python
16 lines
486 B
Python
from rest_framework import viewsets, permissions
|
|
|
|
#from .models import VM
|
|
# from .serializers import OpenNebulaVMSerializer
|
|
|
|
# class VMViewSet(viewsets.ModelViewSet):
|
|
# permission_classes = [permissions.IsAuthenticated]
|
|
# serializer_class = OpenNebulaVMSerializer
|
|
|
|
# def get_queryset(self):
|
|
# if self.request.user.is_superuser:
|
|
# obj = VM.objects.all()
|
|
# else:
|
|
# obj = VM.objects.filter(owner=self.request.user)
|
|
|
|
# return obj
|