forked from uncloud/uncloud
14 lines
351 B
Python
14 lines
351 B
Python
from rest_framework import viewsets, generics
|
|
from .models import VM
|
|
from .serializers import VMSerializer
|
|
|
|
|
|
class VMList(generics.ListAPIView):
|
|
queryset = VM.objects.all()
|
|
serializer_class = VMSerializer
|
|
|
|
|
|
class VMDetail(generics.RetrieveAPIView):
|
|
lookup_field = 'vmid'
|
|
queryset = VM.objects.all()
|
|
serializer_class = VMSerializer
|