diff options
author | Yan Yang <yangyanyj@chinamobile.com> | 2018-03-13 06:32:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-03-13 06:32:24 +0000 |
commit | 4d8fae4d105b6464ff2cb03e7b5b812f077b2653 (patch) | |
tree | 8b40ef1a49f5773b73107236d08e1d143acf0cb2 | |
parent | d7e55d8c0d5305264e59a97863f7299bac2cd2af (diff) | |
parent | 8188bc52c786fff819ce1ea0b883274924abadf5 (diff) |
Merge "Add AffectedVirtrualLinksSerializer of notify req"
-rw-r--r-- | lcm/v2/serializers.py | 37 | ||||
-rw-r--r-- | lcm/v2/views.py | 3 |
2 files changed, 39 insertions, 1 deletions
diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py index ba465f27..83cb645d 100644 --- a/lcm/v2/serializers.py +++ b/lcm/v2/serializers.py @@ -714,6 +714,33 @@ class AffectedVnfcSerializer(serializers.Serializer): ) +class AffectedVirtualLinkSerializer(serializers.Serializer): + id = serializers.CharField( + help_text="Identifier of the virtual link instance.", + required=True + ) + virtualLinkDescId = serializers.CharField( + help_text="Identifier of the related VLD in the VNFD.", + required=True + ) + changeType = serializers.ChoiceField( + help_text="Signals the type of change.", + choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED"], + required=True + ) + networkResource = ResourceHandleSerializer( + help_text="Reference to the VirtualNetwork resource.", + required=False, + allow_null=True + ) + metadata = serializers.DictField( + help_text="Metadata about this resource.", + child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True), + required=False, + allow_null=True + ) + + class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): id = serializers.CharField( help_text="Identifier of this notification.", @@ -758,3 +785,13 @@ class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): help_text="The identifier of the VNF lifecycle management operation occurrence associated to the notification.", required=True ) + affectedVnfcs = AffectedVnfcSerializer( + help_text="Information about VNFC instances that were affected during the lifecycle operation.", + many=True, + required=False + ) + affectedVirtualLinks = AffectedVirtualLinkSerializer( + help_text="Information about VL instances that were affected during the lifecycle operation.", + many=True, + required=False + ) diff --git a/lcm/v2/views.py b/lcm/v2/views.py index c35ab01e..9f7fe030 100644 --- a/lcm/v2/views.py +++ b/lcm/v2/views.py @@ -57,8 +57,9 @@ class VnfGrantView(APIView): class VnfNotifyView(APIView): - def post(self, request): + def post(self, request, vnfmId, vnfInstanceId): logger.debug("VnfNotifyView post: %s" % request.data) + logger.debug("vnfmId: %s vnfInstanceId: %s", vnfmId, vnfInstanceId) return Response(data={}, status=status.HTTP_204_NO_CONTENT) def get(self, request): |