From dea392bee6e12e263d0035e1be9a773e776ed774 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Tue, 13 Mar 2018 15:33:47 +0800 Subject: Add ExtVirtualLinkInfoSerializer of notify req Change-Id: I0e9179aa0bafbd9ed939103a03214abf6062e75e Issue-ID: VFC-779 Signed-off-by: fujinhua --- lcm/v2/serializers.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py index e8aa8bf2..fa677d77 100644 --- a/lcm/v2/serializers.py +++ b/lcm/v2/serializers.py @@ -842,6 +842,39 @@ class VnfInfoModificationsSerializer(serializers.Serializer): ) +class ExtLinkPortInfoSerializer(serializers.Serializer): + id = serializers.CharField( + help_text="Identifier of this link port as provided by the entity that has created the link port.", + required=True + ) + resourceHandle = ResourceHandleSerializer( + help_text="Reference to the virtualised resource realizing this link port.", + required=True + ) + cpInstanceId = serializers.CharField( + help_text="Identifier of the external CP of the VNF connected to this link port.", + required=False, + allow_null=True, + allow_blank=True + ) + + +class ExtVirtualLinkInfoSerializer(serializers.Serializer): + id = serializers.CharField( + help_text="Identifier of the external VL and the related external VL information instance.", + required=True + ) + resourceHandle = ResourceHandleSerializer( + help_text="Reference to the resource realizing this VL.", + required=True + ) + extLinkPorts = ExtLinkPortInfoSerializer( + help_text="Link ports of this VL.", + many=True, + required=False + ) + + class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): id = serializers.CharField( help_text="Identifier of this notification.", @@ -906,3 +939,8 @@ class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): required=False, allow_null=True ) + changedExtConnectivity = ExtVirtualLinkInfoSerializer( + help_text="Information about changed external connectivity.", + many=True, + required=False + ) -- cgit 1.2.3-korg From e850796b9e38a16bb638ef0e36393241579f5120 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Tue, 13 Mar 2018 15:57:45 +0800 Subject: Add ProblemDetailsSerializer of notify req Change-Id: I9e5de440773d93f83ee59f57c7fb8a2874a8e6bb Issue-ID: VFC-779 Signed-off-by: fujinhua --- lcm/v2/serializers.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py index fa677d77..512b58c6 100644 --- a/lcm/v2/serializers.py +++ b/lcm/v2/serializers.py @@ -875,6 +875,35 @@ class ExtVirtualLinkInfoSerializer(serializers.Serializer): ) +class ProblemDetailsSerializer(serializers.Serializer): + type = serializers.CharField( + help_text="A URI reference according to IETF RFC 3986 [5] that identifies the problem type.", + required=False, + allow_null=True, + allow_blank=True + ) + title = serializers.CharField( + help_text="A short, human-readable summary of the problem type.", + required=False, + allow_null=True, + allow_blank=True + ) + status = serializers.IntegerField( + help_text="The HTTP status code for this occurrence of the problem.", + required=True + ) + detail = serializers.CharField( + help_text="A human-readable explanation specific to this occurrence of the problem.", + required=True + ) + instance = serializers.CharField( + help_text="A URI reference that identifies the specific occurrence of the problem.", + required=False, + allow_null=True, + allow_blank=True + ) + + class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): id = serializers.CharField( help_text="Identifier of this notification.", @@ -944,3 +973,8 @@ class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer): many=True, required=False ) + error = ProblemDetailsSerializer( + help_text="Details of the latest error, if one has occurred during executing the LCM operation", + required=False, + allow_null=True + ) -- cgit 1.2.3-korg