From 2a0b28a2c13db9849791e28736a0c3dbfeead84c Mon Sep 17 00:00:00 2001 From: fujinhua Date: Thu, 8 Mar 2018 11:08:12 +0800 Subject: Add notify vnf req serializer Change-Id: Ic8332da398f0c3091a4d7b4c8b846cf8d9836e4e Issue-ID: VFC-779 Signed-off-by: fujinhua --- lcm/v2/serializers.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py index 1ba05a48..1565b4fa 100644 --- a/lcm/v2/serializers.py +++ b/lcm/v2/serializers.py @@ -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 + ) -- cgit 1.2.3-korg