2020-02-21 15:33:37 +00:00
|
|
|
from rest_framework import serializers
|
|
|
|
from opennebula.models import VM
|
|
|
|
|
|
|
|
|
|
|
|
class VMSerializer(serializers.HyperlinkedModelSerializer):
|
|
|
|
class Meta:
|
|
|
|
model = VM
|
2020-02-25 16:03:20 +00:00
|
|
|
fields = ['id', 'owner', 'data']
|
2020-02-23 14:33:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
class OpenNebulaVMSerializer(serializers.HyperlinkedModelSerializer):
|
|
|
|
class Meta:
|
|
|
|
model = VM
|
2020-02-25 16:03:20 +00:00
|
|
|
fields = ['id', 'owner', 'cores', 'ram_in_gb', 'disks', 'last_host', 'graphics']
|