From 5ac41461fcb0c45d3f04923ff5578b599dc58905 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Fri, 5 Apr 2019 08:53:28 +0800 Subject: Update serializer ztevnfmdriver Change-Id: Id47cd6dfc68dd450c38b312140a20098696edd24 Issue-ID: VFC-1306 Signed-off-by: fujinhua --- zte/vmanager/driver/interfaces/serializers.py | 33 +++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/zte/vmanager/driver/interfaces/serializers.py b/zte/vmanager/driver/interfaces/serializers.py index 1d518df1..069797f4 100644 --- a/zte/vmanager/driver/interfaces/serializers.py +++ b/zte/vmanager/driver/interfaces/serializers.py @@ -288,7 +288,10 @@ class NotifyVmlistSerializer(serializers.Serializer): allow_null=True) VMIDlist = serializers.ListSerializer( help_text='VMIDlist', - child=VMIDlistSerializer(help_text='VMIDlist', required=True, allow_null=True), + child=VMIDlistSerializer( + help_text='VMIDlist', + required=True, + allow_null=True), required=False, allow_null=True) @@ -330,16 +333,19 @@ class NotifyReqSerializer(serializers.Serializer): many=True) extension = serializers.DictField( help_text="extension", - child=serializers.DictField(allow_null=True), + child=serializers.DictField( + allow_null=True), required=False, allow_null=True) affectedcp = serializers.ListSerializer( help_text='affectedcp', - child=serializers.DictField(allow_null=True), + child=serializers.DictField( + allow_null=True), required=False) affectedvirtuallink = serializers.ListSerializer( help_text='affectedvirtuallink', - child=serializers.DictField(allow_null=True), + child=serializers.DictField( + allow_null=True), required=False) @@ -361,7 +367,8 @@ class ScaleReqSerializer(serializers.Serializer): allow_null=True) additionalParam = serializers.DictField( help_text="additionalParam", - child=serializers.DictField(allow_null=True), + child=serializers.DictField( + allow_null=True), required=False, allow_null=True) @@ -394,7 +401,8 @@ class AffectedvmSerializer(serializers.Serializer): allow_null=True) flavour = serializers.DictField( help_text="flavour", - child=serializers.CharField(allow_blank=True), + child=serializers.CharField( + allow_blank=True), required=False, allow_null=True) @@ -417,7 +425,10 @@ class HealReqSerializer(serializers.Serializer): allow_null=True) affectedvm = serializers.ListSerializer( help_text='affectedvm', - child=AffectedvmSerializer(help_text='affectedvm', required=True, allow_null=True), + child=AffectedvmSerializer( + help_text='affectedvm', + required=True, + allow_null=True), required=True, allow_null=True) @@ -524,12 +535,16 @@ class VnfPkgSerializer(serializers.Serializer): allow_null=True) imagefiles = serializers.ListSerializer( help_text='imagefiles', - child=serializers.CharField(help_text='imagefile', required=True), + child=serializers.CharField( + help_text='imagefile', + required=True), required=False, allow_null=True) swfiles = serializers.ListSerializer( help_text='swfiles', - child=serializers.CharField(help_text='swfile', required=True), + child=serializers.CharField( + help_text='swfile', + required=True), required=False, allow_null=True) description = serializers.CharField( -- cgit 1.2.3-korg