forked from uncloud/uncloud
d4b170f813
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
18 lines
516 B
Python
18 lines
516 B
Python
from django.shortcuts import render
|
|
|
|
from django.contrib.auth.models import User
|
|
from django.shortcuts import get_object_or_404
|
|
|
|
from rest_framework import viewsets, permissions
|
|
from rest_framework.response import Response
|
|
|
|
|
|
from opennebula.models import VM as OpenNebulaVM
|
|
|
|
from .models import VMHost
|
|
from .serializers import VMHostSerializer
|
|
|
|
class VMHostViewSet(viewsets.ModelViewSet):
|
|
serializer_class = VMHostSerializer
|
|
queryset = VMHost.objects.all()
|
|
permission_classes = [permissions.IsAdminUser]
|