summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-03-08 16:32:30 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-03-08 16:32:30 +0800
commit51798bb09bd11900c9d134bf5b92ed87c05f3d86 (patch)
treec1678af4f29c2c7a79018fec91681502d46f8eb7
parent2a0b28a2c13db9849791e28736a0c3dbfeead84c (diff)
Add AffectedVnfcSerializer of notify req
Change-Id: Ib94fd669b42d44369adc4a423d92d4d37414b747 Issue-ID: VFC-779 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/v2/serializers.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py
index 1565b4fa..ba465f27 100644
--- a/lcm/v2/serializers.py
+++ b/lcm/v2/serializers.py
@@ -670,6 +670,50 @@ class GrantSerializer(serializers.Serializer):
)
+class AffectedVnfcSerializer(serializers.Serializer):
+ id = serializers.CharField(
+ help_text="Identifier of the Vnfc instance.",
+ required=True
+ )
+ vduId = serializers.CharField(
+ help_text="Identifier of the related VDU in the VNFD.",
+ required=True
+ )
+ changeType = serializers.ChoiceField(
+ help_text="Signals the type of change.",
+ choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
+ required=True
+ )
+ computeResource = ResourceHandleSerializer(
+ help_text="Reference to the VirtualCompute resource.",
+ required=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
+ )
+ affectedVnfcCpIds = serializers.ListSerializer(
+ help_text="Identifiers of CP(s) of the VNFC instance that were affected by the change.",
+ child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
+ required=False,
+ allow_null=True
+ )
+ addedStorageResourceIds = serializers.ListSerializer(
+ help_text="References to VirtualStorage resources that have been added.",
+ child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
+ required=False,
+ allow_null=True
+ )
+ removedStorageResourceIds = serializers.ListSerializer(
+ help_text="References to VirtualStorage resources that have been removed.",
+ child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
+ required=False,
+ allow_null=True
+ )
+
+
class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
id = serializers.CharField(
help_text="Identifier of this notification.",
@@ -706,3 +750,11 @@ class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
required=True
)
+ isAutomaticInvocation = serializers.BooleanField(
+ help_text="Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM.",
+ required=True
+ )
+ vnfLcmOpOccId = serializers.CharField(
+ help_text="The identifier of the VNF lifecycle management operation occurrence associated to the notification.",
+ required=True
+ )