fix some grant parameter check error 78/72178/1
authormaopengzhang <zhang.maopeng1@zte.com.cn>
Thu, 8 Nov 2018 09:08:41 +0000 (17:08 +0800)
committermaopengzhang <zhang.maopeng1@zte.com.cn>
Thu, 8 Nov 2018 09:08:41 +0000 (17:08 +0800)
allow some not required parameters null, etc

Change-Id: Ie4efedee7239d4d8a700d281d91bab1489d8a46b
Issue-ID: VFC-1158
Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
gvnfmadapter/driver/interfaces/serializers/grant.py

index 4fa5335..f36d5ed 100644 (file)
@@ -24,28 +24,34 @@ class VimConnectionInfoSerializer(serializers.Serializer):
     )
     vimId = serializers.CharField(
         help_text="The identifier of the VIM instance. This identifier is managed by the NFVO.",
-        required=False
+        required=False,
+        allow_null=True
     )
     vimType = serializers.CharField(
         help_text="Discriminator for the different types of the VIM information.",
-        required=False
+        required=False,
+        allow_null=True
     )
     interfaceInfo = serializers.DictField(
         help_text="Information about the interface or interfaces to the VIM.",
         child=serializers.CharField(help_text="Interface Info", allow_blank=True),
-        required=False
+        required=False,
+        allow_null=True
     )
     accessInfo = serializers.DictField(
         help_text="Authentication credentials for accessing the VIM.",
         child=serializers.CharField(help_text="Access Info", allow_blank=True),
-        required=False
+        required=False,
+        allow_null=True
     )
     extra = serializers.DictField(
         help_text="VIM type specific additional information.",
         child=serializers.CharField(help_text="Extra", allow_blank=True),
-        required=False
+        required=False,
+        allow_null=True
     )
 
+
 class ZoneInfoSerializer(serializers.Serializer):
     id = serializers.CharField(
         help_text="The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the Grant structure.",