From: fujinhua Date: Tue, 13 Mar 2018 08:18:54 +0000 (+0800) Subject: Add LccnLinksSerializer of notify req X-Git-Tag: v1.1.0~49^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F13%2F35413%2F1;p=vfc%2Fnfvo%2Flcm.git Add LccnLinksSerializer of notify req Change-Id: I22f17f25651b8f717a87b02856d0be59ecd3a931 Issue-ID: VFC-779 Signed-off-by: fujinhua --- diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py index 512b58c6..557c603c 100644 --- a/lcm/v2/serializers.py +++ b/lcm/v2/serializers.py @@ -904,6 +904,22 @@ class ProblemDetailsSerializer(serializers.Serializer): ) +class LccnLinksSerializer(serializers.Serializer): + vnfInstance = LinkSerializer( + help_text="Link to the resource representing the VNF instance to which the notified change applies.", + required=True + ) + subscription = LinkSerializer( + help_text="Link to the related subscription.", + required=True + ) + vnfLcmOpOcc = LinkSerializer( + help_text="Link to the VNF lifecycle management operation occurrence that this notification is related to.", + required=False, + allow_null=True + ) + + class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): id = serializers.CharField( help_text="Identifier of this notification.", @@ -978,3 +994,8 @@ class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): required=False, allow_null=True ) + _links = LccnLinksSerializer( + help_text="Links to resources related to this notification.", + required=False, + allow_null=True + )