summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-03-13 14:01:17 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-03-13 14:10:54 +0800
commit8188bc52c786fff819ce1ea0b883274924abadf5 (patch)
treed0c7da684f53d15615c9e75eda646ba68587a4a2 /lcm
parentec152961775fc1c420497cc1472c1ea9403b5154 (diff)
Add AffectedVirtrualLinksSerializer of notify req
Change-Id: If0287516d884385c15420dd235f243d6f993a2a3 Issue-ID: VFC-779 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm')
-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):