diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2018-03-08 11:08:12 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2018-03-08 11:08:12 +0800 |
commit | 2a0b28a2c13db9849791e28736a0c3dbfeead84c (patch) | |
tree | df23ddfb81e4c40e8f5f174965ae3ea6820a6dd2 | |
parent | ac828d65ffbe74c16b385f37d72a94b3a70b1d82 (diff) |
Add notify vnf req serializer
Change-Id: Ic8332da398f0c3091a4d7b4c8b846cf8d9836e4e
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | lcm/v2/serializers.py | 39 |
1 files changed, 39 insertions, 0 deletions
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 + ) |