summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2018-01-27 14:58:04 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2018-01-27 14:58:04 +0800
commitdecdce82bcee8eed90926ec382387f70bc0fd625 (patch)
treef09d149e5c2bef701f5eb0df7b117e48db380652 /res
parent429f08a60800bd887f4212843871d6f42c2bdafc (diff)
Add vfc-vnfres subnet schema
Change-Id: I628fa92f480a7c0834a3433959d4e430cb5703b4 Issue-ID: VFC-679 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'res')
-rw-r--r--res/res/resources/serializers.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/res/res/resources/serializers.py b/res/res/resources/serializers.py
index aaf7598..8641919 100644
--- a/res/res/resources/serializers.py
+++ b/res/res/resources/serializers.py
@@ -15,7 +15,22 @@
from rest_framework import serializers
-class CpsResponseSerializer(serializers.Serializer):
+class SubnetResponseSerializer(serializers.Serializer):
+ subnetworkid = serializers.CharField(help_text="the subnetwork id", required=True)
+ vimid = serializers.CharField(help_text="the vim id", required=True)
+ resouceid = serializers.CharField(help_text="the resouce id", required=True)
+ networkid = serializers.CharField(help_text="the network 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)
+ cidr = serializers.CharField(help_text="cidr", required=True)
+
+
+class SubnetInfoSerializer(serializers.Serializer):
+ resp_data = SubnetResponseSerializer(help_text="the response data", many=True)
+
+
+class CpResponseSerializer(serializers.Serializer):
cpinstanceid = serializers.CharField(help_text="the cp instance id", required=True)
cpdid = serializers.CharField(help_text="the cpd id", required=True)
cpinstancename = serializers.CharField(help_text="the cp instance name of vnf", required=True)
@@ -26,7 +41,7 @@ class CpsResponseSerializer(serializers.Serializer):
class CpsInfoSerializer(serializers.Serializer):
- resp_data = CpsResponseSerializer(help_text="the response data", many=True)
+ resp_data = CpResponseSerializer(help_text="the response data", many=True)
class VolumeResponseSerializer(serializers.Serializer):