summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-01-29 09:01:47 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-01-29 09:01:47 +0800
commit08d8a6be114ff6eb67ad3b47e3217164030fe558 (patch)
tree34def8e2aeee28a1ea060bedcd3229dc1b755059
parent43710aa9466768b43c24757c37095515eaafcb09 (diff)
Add vfc-vnfres network schema
Change-Id: Iae60f50e5541c9c8c5397c8cc4b69f96f30b29a0 Issue-ID: VFC-679 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
-rw-r--r--res/res/resources/serializers.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/res/res/resources/serializers.py b/res/res/resources/serializers.py
index 8641919..7296ca0 100644
--- a/res/res/resources/serializers.py
+++ b/res/res/resources/serializers.py
@@ -15,6 +15,19 @@
from rest_framework import serializers
+class NetworkResponseSerializer(serializers.Serializer):
+ networkid = serializers.CharField(help_text="networkid", required=True)
+ vimid = serializers.CharField(help_text="the vim id", required=True)
+ resouceid = serializers.CharField(help_text="the resouce id", required=True)
+ insttype = serializers.IntegerField(help_text="the inst type", required=True)
+ instid = serializers.CharField(help_text="the inst id", required=True)
+ name = serializers.CharField(help_text="name", required=True)
+
+
+class NetworkInfoSerializer(serializers.Serializer):
+ resp_data = NetworkResponseSerializer(help_text="the response data", many=True)
+
+
class SubnetResponseSerializer(serializers.Serializer):
subnetworkid = serializers.CharField(help_text="the subnetwork id", required=True)
vimid = serializers.CharField(help_text="the vim id", required=True)