Add notify vnf req serializer 49/34649/1
authorfujinhua <fu.jinhua@zte.com.cn>
Thu, 8 Mar 2018 03:08:12 +0000 (11:08 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Thu, 8 Mar 2018 03:08:12 +0000 (11:08 +0800)
Change-Id: Ic8332da398f0c3091a4d7b4c8b846cf8d9836e4e
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
lcm/v2/serializers.py

index 1ba05a4..1565b4f 100644 (file)
@@ -587,6 +587,7 @@ class GrantSerializer(serializers.Serializer):
         required=True
     )
     vnfInstanceId = serializers.CharField(
+        help_text="Identifier of the related VNF instance.",
         required=True
     )
     vnfLcmOpOccId = serializers.CharField(
@@ -667,3 +668,41 @@ class GrantSerializer(serializers.Serializer):
         help_text="Links to resources related to this resource.",
         required=False
     )
+
+
+class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
+    id = serializers.CharField(
+        help_text="Identifier of this notification.",
+        required=True
+    )
+    notificationType = serializers.CharField(
+        help_text="Discriminator for the different notification types.",
+        required=True
+    )
+    subscriptionId = serializers.CharField(
+        help_text="Identifier of the subscription that this notification relates to.",
+        required=True
+    )
+    timeStamp = serializers.CharField(
+        help_text="Date-time of the generation of the notification.",
+        required=True
+    )
+    notificationStatus = serializers.ChoiceField(
+        help_text="Indicates whether this notification reports about the start of a lifecycle operation or the result of a lifecycle operation.",
+        choices=["START", "RESULT"],
+        required=True
+    )
+    operationState = serializers.ChoiceField(
+        help_text="The state of the VNF LCM operation occurrence.",
+        choices=["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"],
+        required=True
+    )
+    vnfInstanceId = serializers.CharField(
+        help_text="The identifier of the VNF instance affected.",
+        required=True
+    )
+    operation = serializers.ChoiceField(
+        help_text="The lifecycle management operation.",
+        choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
+        required=True
+    )