Add VnfInfoModificationsSerializer of notify req 97/35397/1
authorfujinhua <fu.jinhua@zte.com.cn>
Tue, 13 Mar 2018 07:15:29 +0000 (15:15 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Tue, 13 Mar 2018 07:15:29 +0000 (15:15 +0800)
Change-Id: I83e141bf94488bbe64d6fc117d097a55a5efba5f
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/v2/serializers.py

index 7446015..e8aa8bf 100644 (file)
@@ -768,6 +768,80 @@ class AffectedVirtualStorageSerializer(serializers.Serializer):
     )
 
 
+class VnfInfoModificationsSerializer(serializers.Serializer):
+    vnfInstanceName = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfInstanceName attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vnfInstanceDescription = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfInstanceDescription attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vnfConfigurableProperties = serializers.DictField(
+        help_text="If present, this attribute signals modifications of the vnfConfigurableProperties attribute in VnfInstance.",
+        child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
+        required=False,
+        allow_null=True
+    )
+    metadata = serializers.DictField(
+        help_text="If present, this attribute signals modifications of the metadata attribute in VnfInstance.",
+        child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
+        required=False,
+        allow_null=True
+    )
+    extensions = serializers.DictField(
+        help_text="If present, this attribute signals modifications of the extensions attribute in VnfInstance.",
+        child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
+        required=False,
+        allow_null=True
+    )
+    vimConnectionInfo = VimConnectionInfoSerializer(
+        help_text="If present, this attribute signals modifications of the vimConnectionInfo attribute in VnfInstance.",
+        many=True,
+        required=False
+    )
+    vnfPkgId = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfPkgId attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vnfdId = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfdId attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vnfProvider = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfProvider attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vnfProductName = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfProductName attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vnfSoftwareVersion = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfSoftwareVersion attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+    vnfdVersion = serializers.CharField(
+        help_text="If present, this attribute signals modifications of the vnfdVersion attribute in VnfInstance.",
+        required=False,
+        allow_null=True,
+        allow_blank=True
+    )
+
+
 class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
     id = serializers.CharField(
         help_text="Identifier of this notification.",
@@ -827,3 +901,8 @@ class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
         many=True,
         required=False
     )
+    changedInfo = VnfInfoModificationsSerializer(
+        help_text="Information about the changed VNF instance information, including changed VNF configurable properties.",
+        required=False,
+        allow_null=True
+    )