summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-01-29 09:25:54 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-01-29 09:25:54 +0800
commit45a00849eb311e47087d664a0a11c181d97135dc (patch)
tree24d7108f6e29e40b2fd29c5cd8a9b2fb4445b4e1
parentff43d09265f6fc851bee63dd21d3eead9580c51e (diff)
Add vfc-vnfres flavor schema
Change-Id: I7eb53543f6be5a0263ace3601f7dfcd20c4943df Issue-ID: VFC-679 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--res/res/resources/serializers.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/res/res/resources/serializers.py b/res/res/resources/serializers.py
index 7296ca0..6dd3d46 100644
--- a/res/res/resources/serializers.py
+++ b/res/res/resources/serializers.py
@@ -15,6 +15,23 @@
from rest_framework import serializers
+class FlavorResponseSerializer(serializers.Serializer):
+ flavourid = serializers.CharField(help_text="flavourid", required=True)
+ vimid = serializers.CharField(help_text="the vim id", required=True)
+ resouceid = serializers.CharField(help_text="the resouce id", required=True)
+ tenant = serializers.IntegerField(help_text="tenant", required=True)
+ instid = serializers.CharField(help_text="the inst id", required=True)
+ name = serializers.CharField(help_text="name", required=True)
+ extraspecs = serializers.CharField(help_text="extraspecs", required=True)
+ create_time = serializers.CharField(help_text="create_time", required=True)
+ memory = serializers.IntegerField(help_text="memory", required=True)
+ vcpu = serializers.CharField(help_text="vcpu", required=True)
+
+
+class FlavorInfoSerializer(serializers.Serializer):
+ resp_data = FlavorResponseSerializer(help_text="the response data", many=True)
+
+
class NetworkResponseSerializer(serializers.Serializer):
networkid = serializers.CharField(help_text="networkid", required=True)
vimid = serializers.CharField(help_text="the vim id", required=True)