forked from uncloud/uncloud
14 lines
386 B
Python
14 lines
386 B
Python
from rest_framework import serializers
|
|
from opennebula.models import VM
|
|
|
|
|
|
class VMSerializer(serializers.HyperlinkedModelSerializer):
|
|
class Meta:
|
|
model = VM
|
|
fields = ['vmid', 'owner', 'data']
|
|
|
|
|
|
class OpenNebulaVMSerializer(serializers.HyperlinkedModelSerializer):
|
|
class Meta:
|
|
model = VM
|
|
fields = ['vmid', 'owner', 'cores', 'ram_in_gb', 'disks' ]
|