uncloud/uncloud/uncloud_vm/serializers.py

21 lines
555 B
Python
Raw Normal View History

from django.contrib.auth import get_user_model
from rest_framework import serializers
from .models import VMHost, VMProduct, VMSnapshotProduct
class VMHostSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = VMHost
fields = '__all__'
2020-02-25 21:01:55 +00:00
class VMProductSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = VMProduct
fields = '__all__'
2020-02-27 10:36:50 +00:00
2020-02-27 11:31:20 +00:00
class VMSnapshotProductSerializer(serializers.ModelSerializer):
2020-02-27 10:36:50 +00:00
class Meta:
model = VMSnapshotProduct
fields = '__all__'