summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYan Yang <yangyanyj@chinamobile.com>2018-03-13 06:32:24 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-13 06:32:24 +0000
commit4d8fae4d105b6464ff2cb03e7b5b812f077b2653 (patch)
tree8b40ef1a49f5773b73107236d08e1d143acf0cb2
parentd7e55d8c0d5305264e59a97863f7299bac2cd2af (diff)
parent8188bc52c786fff819ce1ea0b883274924abadf5 (diff)
Merge "Add AffectedVirtrualLinksSerializer of notify req"
-rw-r--r--lcm/v2/serializers.py37
-rw-r--r--lcm/v2/views.py3
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):