From: fujinhua Date: Thu, 8 Mar 2018 03:08:12 +0000 (+0800) Subject: Add notify vnf req serializer X-Git-Tag: v1.1.0~64^2~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F49%2F34649%2F1;p=vfc%2Fnfvo%2Flcm.git Add notify vnf req serializer Change-Id: Ic8332da398f0c3091a4d7b4c8b846cf8d9836e4e Issue-ID: VFC-779 Signed-off-by: fujinhua --- 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 + )