1 # Copyright 2018 ZTE Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 from rest_framework import serializers
18 class ResourceHandleSerializer(serializers.Serializer):
19 vimConnectionId = serializers.CharField(
20 help_text="Identifier of the VIM connection to manage the resource.",
25 resourceProviderId = serializers.CharField(
26 help_text="Identifier of the entity responsible for the management of the resource.",
31 resourceId = serializers.CharField(
32 help_text="Identifier of the resource in the scope of the VIM or the resource provider.",
35 vimLevelResourceType = serializers.CharField(
36 help_text="Type of the resource in the scope of the VIM or the resource provider.",
43 class ResourceDefinitionSerializer(serializers.Serializer):
44 id = serializers.CharField(
45 help_text="Identifier of this ResourceDefinition, unique at least within the scope of the GrantRequest.",
48 type = serializers.ChoiceField(
49 help_text="Type of the resource definition referenced.",
50 choices=["COMPUTE", "VL", "STORAGE", "LINKPORT"],
53 vduId = serializers.CharField(
54 help_text="Reference to the related VDU in the VNFD applicable to this resource.",
59 resourceTemplateId = serializers.CharField(
60 help_text="Reference to a resource template(such as VnfVirtualLinkDesc) in the VNFD.",
65 resource = ResourceHandleSerializer(
66 help_text="Resource information for an existing resource.",
72 class ConstraintResourceRefSerializer(serializers.Serializer):
73 idType = serializers.ChoiceField(
74 help_text="The type of the identifier.",
75 choices=["RES_MGMT", "GRANT"],
78 resourceId = serializers.CharField(
79 help_text="An actual resource-management-level identifier(idType=RES_MGMT), or an identifier that references a ResourceDefinition(idType=GRANT).",
82 vimConnectionId = serializers.CharField(
88 resourceProviderId = serializers.CharField(
89 help_text="Identifier of the resource provider. It shall only be present when idType = RES_MGMT.",
96 class PlacementConstraintSerializer(serializers.Serializer):
97 affinityOrAntiAffinity = serializers.ChoiceField(
98 help_text="The type of the constraint.",
99 choices=["AFFINITY", "ANTI_AFFINITY"],
102 scope = serializers.ChoiceField(
103 help_text="The scope of the placement constraint indicating the category of the place where the constraint applies.",
104 choices=["NFVI_POP", "ZONE", "ZONE_GROUP", "NFVI_NODE"],
107 resource = ConstraintResourceRefSerializer(
108 help_text="References to resources in the constraint rule.",
114 class VimConstraintSerializer(serializers.Serializer):
115 sameResourceGroup = serializers.BooleanField(
116 help_text="Set to true when the constraint applies not only to the same VIM connection, but also to the same infrastructure resource group.",
119 resource = ConstraintResourceRefSerializer(
120 help_text="References to resources in the constraint rule.",
126 class LinkSerializer(serializers.Serializer):
127 href = serializers.CharField(
128 help_text="URI of the referenced resource.",
133 class GrantRequestLinksSerializer(serializers.Serializer):
134 vnfLcmOpOcc = LinkSerializer(
135 help_text="Related VNF lifecycle management operation occurrence.",
138 vnfInstance = LinkSerializer(
139 help_text="Related VNF instance.",
144 class GrantRequestSerializer(serializers.Serializer):
145 vnfInstanceId = serializers.CharField(
146 help_text="Identifier of the VNF instance which this grant request is related to.",
149 vnfLcmOpOccId = serializers.CharField(
150 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the GrantRequest.",
151 required=False, # TODO required
155 vnfdId = serializers.CharField(
156 help_text="Identifier of the VNFD that defines the VNF for which the LCM operation is to be granted.",
157 required=False, # TODO required
161 flavourId = serializers.CharField(
162 help_text="Identifier of the VNF deployment flavour of the VNFD that defines the VNF for which the LCM operation is to be granted.",
167 operation = serializers.ChoiceField(
168 help_text="The lifecycle management operation for which granting is requested.",
169 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
172 isAutomaticInvocation = serializers.BooleanField(
173 help_text="Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM, set to false otherwise.",
176 instantiationLevelId = serializers.CharField(
177 help_text="If operation=INSTANTIATE, the identifier of the instantiation level may be provided as an alternative way to define the resources to be added.",
182 addResources = ResourceDefinitionSerializer(
183 help_text="List of resource definitions in the VNFD for resources to be added by the LCM operation.",
187 tempResources = ResourceDefinitionSerializer(
188 help_text="List of resource definitions in the VNFD for resources to be temporarily instantiated during the runtime of the LCM operation.",
192 removeResources = ResourceDefinitionSerializer(
193 help_text="Provides the definitions of resources to be removed by the LCM operation.",
197 updateResources = ResourceDefinitionSerializer(
198 help_text="Provides the definitions of resources to be modified by the LCM operation.",
202 placementConstraints = PlacementConstraintSerializer(
203 help_text="Placement constraints that the VNFM may send to the NFVO in order to influence the resource placement decision.",
207 vimConstraints = VimConstraintSerializer(
208 help_text="Used by the VNFM to require that multiple resources are managed through the same VIM connection.",
212 additionalParams = serializers.DictField(
213 help_text="Additional parameters passed by the VNFM.",
214 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
218 _links = GrantRequestLinksSerializer(
219 help_text="Links to resources related to this request.",
220 required=False # TODO required
224 class VimConnectionInfoSerializer(serializers.Serializer):
225 id = serializers.CharField(
226 help_text="The identifier of the VIM Connection. This identifier is managed by the NFVO.",
229 vimId = serializers.CharField(
230 help_text="The identifier of the VIM instance. This identifier is managed by the NFVO.",
235 vimType = serializers.CharField(
236 help_text="Discriminator for the different types of the VIM information.",
241 interfaceInfo = serializers.DictField(
242 help_text="Information about the interface or interfaces to the VIM.",
243 child=serializers.CharField(help_text="Interface Info", allow_blank=True),
247 accessInfo = serializers.DictField(
248 help_text="Authentication credentials for accessing the VIM.",
249 child=serializers.CharField(help_text="Access Info", allow_blank=True),
253 extra = serializers.DictField(
254 help_text="VIM type specific additional information.",
255 child=serializers.CharField(help_text="Extra", allow_blank=True),
261 class ZoneInfoSerializer(serializers.Serializer):
262 id = serializers.CharField(
263 help_text="The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the Grant structure.",
266 zoneId = serializers.CharField(
267 help_text="The identifier of the resource zone, as managed by the resource management layer(typically, the VIM).",
272 vimConnectionId = serializers.CharField(
273 help_text="Identifier of the connection to the VIM that manages the resource zone.",
278 resourceProviderId = serializers.CharField(
279 help_text="Identifies the entity responsible for the management the resource zone.",
286 class ZoneGroupInfoSerializer(serializers.Serializer):
287 zoneId = serializers.ListSerializer(
288 help_text="References of identifiers of ZoneInfo structures.",
289 child=serializers.CharField(help_text="IdentifierLocal", allow_blank=True),
295 class GrantInfoSerializer(serializers.Serializer):
296 resourceDefinitionId = serializers.CharField(
297 help_text="Identifier of the related ResourceDefinition from the related GrantRequest.",
300 reservationId = serializers.CharField(
301 help_text="The reservation identifier applicable to the VNFC/VirtualLink/VirtualStorage.",
306 vimConnectionId = serializers.CharField(
307 help_text="Identifier of the VIM connection to be used to manage this resource.",
312 resourceProviderId = serializers.CharField(
313 help_text="Identifies the entity responsible for the management of the virtualised resource.",
318 zoneId = serializers.CharField(
319 help_text="Reference to the identifier of the ZoneInfo in the Grant.",
324 resourceGroupId = serializers.CharField(
325 help_text="Identifier of the infrastructure resource group.",
332 class VimComputeResourceFlavourSerializer(serializers.Serializer):
333 vimConnectionId = serializers.CharField(
334 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
339 resourceProviderId = serializers.CharField(
340 help_text="Identifies the entity responsible for the management of the virtualised resource.",
345 vnfdVirtualComputeDescId = serializers.CharField(
346 help_text="Identifier which references the virtual compute descriptor in the VNFD that maps to this flavour.",
351 vimFlavourId = serializers.CharField(
352 help_text="Identifier of the compute resource flavour in the resource management layer (i.e. VIM).",
359 class VimSoftwareImageSerializer(serializers.Serializer):
360 vimConnectionId = serializers.CharField(
361 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
366 resourceProviderId = serializers.CharField(
367 help_text="Identifies the entity responsible for the management of the virtualised resource.",
372 vnfdSoftwareImageId = serializers.CharField(
373 help_text="Identifier which references the software image descriptor in the VNFD.",
378 vimSoftwareImageId = serializers.CharField(
379 help_text="Identifier of the software image in the resource management layer (i.e. VIM).",
386 class VimAssetsSerializer(serializers.Serializer):
387 computeResourceFlavours = VimComputeResourceFlavourSerializer(
388 help_text="Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.",
392 softwareImages = VimSoftwareImageSerializer(
393 help_text="Mappings between software images defined in the VNFD and software images managed in the VIM.",
399 class AddressRangeSerializer(serializers.Serializer):
400 minAddress = serializers.CharField(
401 help_text="Lowest IP address belonging to the range.",
404 maxAddress = serializers.CharField(
405 help_text="Highest IP address belonging to the range.",
410 class IpAddresseSerializer(serializers.Serializer):
411 type = serializers.ChoiceField(
412 help_text="The type of the IP addresses.",
413 choices=["IPV4", "IPV6"],
416 fixedAddresses = serializers.ListSerializer(
417 help_text="Fixed addresses to assign.",
418 child=serializers.CharField(help_text="IpAddress"),
422 numDynamicAddresses = serializers.IntegerField(
423 help_text="Number of dynamic addresses to assign.",
426 addressRange = AddressRangeSerializer(
427 help_text="An IP address range to be used, e.g. in case of egress connections.",
431 subnetId = serializers.CharField(
432 help_text="Subnet defined by the identifier of the subnet resource in the VIM.",
439 class IpOverEthernetAddressSerializer(serializers.Serializer):
440 macAddress = serializers.CharField(
441 help_text="MAC address.",
446 ipAddresses = IpAddresseSerializer(
447 help_text="List of IP addresses to assign to the CP instance.",
453 class CpProtocolDataConfigSerializer(serializers.Serializer):
454 layerProtocol = serializers.ChoiceField(
455 help_text="Identifier of layer(s) and protocol(s).",
456 choices=["IP_OVER_ETHERNET"],
459 ipOverEthernet = IpOverEthernetAddressSerializer(
460 help_text="Network address data for IP over Ethernet to assign to the extCP instance.",
466 class VnfExtCpConfigDataSerializer(serializers.Serializer):
467 cpInstanceId = serializers.CharField(
468 help_text="Identifier of the external CP instance to which this set of configuration parameters is requested to be applied.",
473 linkPortId = serializers.CharField(
474 help_text="Identifier of a pre-configured link port to which the external CP will be associated.",
479 cpProtocolData = CpProtocolDataConfigSerializer(
480 help_text="Parameters for configuring the network protocols on the link port that connects the CP to a VL.",
486 class VnfExtCpSerializer(serializers.Serializer):
487 cpdId = serializers.CharField(
488 help_text="The identifier of the CPD in the VNFD.",
491 cpConfig = VnfExtCpConfigDataSerializer(
492 help_text="List of instance data that need to be configured on the CP instances created from the respective CPD.",
498 class ExtLinkPortSerializer(serializers.Serializer):
499 id = serializers.CharField(
500 help_text="Identifier of this link port as provided by the entity that has created the link port.",
503 resourceHandle = serializers.CharField(
504 help_text="Reference to the virtualised resource realizing this link port.",
509 class ExtVirtualLinkSerializer(serializers.Serializer):
510 id = serializers.CharField(
511 help_text="The identifier of the external VL instance.",
514 vimConnectionId = serializers.CharField(
515 help_text="Identifier of the VIM connection to manage this resource.",
520 resourceProviderId = serializers.CharField(
521 help_text="Identifies the entity responsible for the management of this resource.",
526 resourceId = serializers.CharField(
527 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
530 extCps = VnfExtCpSerializer(
531 help_text="External CPs of the VNF to be connected to this external VL.",
535 extLinkPorts = ExtLinkPortSerializer(
536 help_text="Externally provided link ports to be used to connect external connection points to this external VL.",
542 class ExtManagedVirtualLinkSerializer(serializers.Serializer):
543 id = serializers.CharField(
544 help_text="The identifier of the externally-managed internal VL instance.",
547 virtualLinkDescId = serializers.CharField(
548 help_text="The identifier of the VLD in the VNFD for this VL.",
551 vimConnectionId = serializers.CharField(
552 help_text="Identifier of the VIM connection to manage this resource.",
557 resourceProviderId = serializers.CharField(
558 help_text="Identifies the entity responsible for the management of this resource.",
563 resourceId = serializers.CharField(
564 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
569 class GrantLinksSerializer(serializers.Serializer):
570 self = LinkSerializer(
571 help_text="URI of this resource.",
574 vnfLcmOpOcc = LinkSerializer(
575 help_text="Related VNF lifecycle management operation occurrence.",
578 vnfInstance = LinkSerializer(
579 help_text="Related VNF instance.",
584 class GrantSerializer(serializers.Serializer):
585 id = serializers.CharField(
586 help_text="Identifier of the grant.",
589 vnfInstanceId = serializers.CharField(
590 help_text="Identifier of the related VNF instance.",
593 vnfLcmOpOccId = serializers.CharField(
594 help_text="Identifier of the related VNF lifecycle management operation occurrence.",
595 required=False, # TODO required
599 vimConnections = VimConnectionInfoSerializer(
600 help_text="Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources.",
604 zones = ZoneInfoSerializer(
605 help_text="Identifies resource zones where the resources are approved to be allocated by the VNFM.",
609 zoneGroups = ZoneGroupInfoSerializer(
610 help_text="Information about groups of resource zones.",
614 computeReservationId = serializers.CharField(
615 help_text="Information that identifies a reservation applicable to the compute resource requirements.",
620 networkReservationId = serializers.CharField(
621 help_text="Information that identifies a reservation applicable to the network resource requirements.",
626 storageReservationId = serializers.CharField(
627 help_text="Information that identifies a reservation applicable to the storage resource requirements.",
632 addResources = GrantInfoSerializer(
633 help_text="List of resources that are approved to be added.",
637 tempResources = GrantInfoSerializer(
638 help_text="List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation.",
642 removeResources = GrantInfoSerializer(
643 help_text="List of resources that are approved to be removed.",
647 updateResources = GrantInfoSerializer(
648 help_text="List of resources that are approved to be modified.",
652 vimAssets = VimAssetsSerializer(
653 help_text="Information about assets for the VNF that are managed by the NFVO in the VIM.",
657 extVirtualLinks = ExtVirtualLinkSerializer(
658 help_text="Information about external VLs to connect the VNF to.",
662 extManagedVirtualLinks = ExtManagedVirtualLinkSerializer(
663 help_text="Information about internal VLs that are managed by other entities than the VNFM.",
667 additionalParams = serializers.DictField(
668 help_text="Additional parameters passed by the NFVO, \
669 specific to the VNF and the LCM operation.",
670 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
674 _links = GrantLinksSerializer(
675 help_text="Links to resources related to this resource.",
680 class AffectedVnfcSerializer(serializers.Serializer):
681 id = serializers.CharField(
682 help_text="Identifier of the Vnfc instance.",
685 vduId = serializers.CharField(
686 help_text="Identifier of the related VDU in the VNFD.",
689 changeType = serializers.ChoiceField(
690 help_text="Signals the type of change.",
691 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
694 computeResource = ResourceHandleSerializer(
695 help_text="Reference to the VirtualCompute resource.",
698 metadata = serializers.DictField(
699 help_text="Metadata about this resource.",
700 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
704 affectedVnfcCpIds = serializers.ListSerializer(
705 help_text="Identifiers of CP(s) of the VNFC instance that were affected by the change.",
706 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
710 addedStorageResourceIds = serializers.ListSerializer(
711 help_text="References to VirtualStorage resources that have been added.",
712 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
716 removedStorageResourceIds = serializers.ListSerializer(
717 help_text="References to VirtualStorage resources that have been removed.",
718 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
724 class AffectedVirtualLinkSerializer(serializers.Serializer):
725 id = serializers.CharField(
726 help_text="Identifier of the virtual link instance.",
729 virtualLinkDescId = serializers.CharField(
730 help_text="Identifier of the related VLD in the VNFD.",
733 changeType = serializers.ChoiceField(
734 help_text="Signals the type of change.",
735 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED"],
738 networkResource = ResourceHandleSerializer(
739 help_text="Reference to the VirtualNetwork resource.",
743 metadata = serializers.DictField(
744 help_text="Metadata about this resource.",
745 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
751 class AffectedVirtualStorageSerializer(serializers.Serializer):
752 id = serializers.CharField(
753 help_text="Identifier of the storage instance.",
756 virtualStorageDescId = serializers.CharField(
757 help_text="Identifier of the related VirtualStorage descriptor in the VNFD.",
760 changeType = serializers.ChoiceField(
761 help_text="Signals the type of change.",
762 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
765 storageResource = ResourceHandleSerializer(
766 help_text="Reference to the VirtualStorage resource.",
770 metadata = serializers.DictField(
771 help_text="Metadata about this resource.",
772 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
778 class VnfInfoModificationsSerializer(serializers.Serializer):
779 vnfInstanceName = serializers.CharField(
780 help_text="If present, this attribute signals modifications of the vnfInstanceName attribute in VnfInstance.",
785 vnfInstanceDescription = serializers.CharField(
786 help_text="If present, this attribute signals modifications of the vnfInstanceDescription attribute in VnfInstance.",
791 vnfConfigurableProperties = serializers.DictField(
792 help_text="If present, this attribute signals modifications of the vnfConfigurableProperties attribute in VnfInstance.",
793 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
797 metadata = serializers.DictField(
798 help_text="If present, this attribute signals modifications of the metadata attribute in VnfInstance.",
799 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
803 extensions = serializers.DictField(
804 help_text="If present, this attribute signals modifications of the extensions attribute in VnfInstance.",
805 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
809 vimConnectionInfo = VimConnectionInfoSerializer(
810 help_text="If present, this attribute signals modifications of the vimConnectionInfo attribute in VnfInstance.",
814 vnfPkgId = serializers.CharField(
815 help_text="If present, this attribute signals modifications of the vnfPkgId attribute in VnfInstance.",
820 vnfdId = serializers.CharField(
821 help_text="If present, this attribute signals modifications of the vnfdId attribute in VnfInstance.",
826 vnfProvider = serializers.CharField(
827 help_text="If present, this attribute signals modifications of the vnfProvider attribute in VnfInstance.",
832 vnfProductName = serializers.CharField(
833 help_text="If present, this attribute signals modifications of the vnfProductName attribute in VnfInstance.",
838 vnfSoftwareVersion = serializers.CharField(
839 help_text="If present, this attribute signals modifications of the vnfSoftwareVersion attribute in VnfInstance.",
844 vnfdVersion = serializers.CharField(
845 help_text="If present, this attribute signals modifications of the vnfdVersion attribute in VnfInstance.",
852 class ExtLinkPortInfoSerializer(serializers.Serializer):
853 id = serializers.CharField(
854 help_text="Identifier of this link port as provided by the entity that has created the link port.",
857 resourceHandle = ResourceHandleSerializer(
858 help_text="Reference to the virtualised resource realizing this link port.",
861 cpInstanceId = serializers.CharField(
862 help_text="Identifier of the external CP of the VNF connected to this link port.",
869 class ExtVirtualLinkInfoSerializer(serializers.Serializer):
870 id = serializers.CharField(
871 help_text="Identifier of the external VL and the related external VL information instance.",
874 resourceHandle = ResourceHandleSerializer(
875 help_text="Reference to the resource realizing this VL.",
878 extLinkPorts = ExtLinkPortInfoSerializer(
879 help_text="Link ports of this VL.",
885 class ProblemDetailsSerializer(serializers.Serializer):
886 type = serializers.CharField(
887 help_text="A URI reference according to IETF RFC 3986 [5] that identifies the problem type.",
892 title = serializers.CharField(
893 help_text="A short, human-readable summary of the problem type.",
898 status = serializers.IntegerField(
899 help_text="The HTTP status code for this occurrence of the problem.",
902 detail = serializers.CharField(
903 help_text="A human-readable explanation specific to this occurrence of the problem.",
906 instance = serializers.CharField(
907 help_text="A URI reference that identifies the specific occurrence of the problem.",
914 class LccnLinksSerializer(serializers.Serializer):
915 vnfInstance = LinkSerializer(
916 help_text="Link to the resource representing the VNF instance to which the notified change applies.",
919 subscription = LinkSerializer(
920 help_text="Link to the related subscription.",
923 vnfLcmOpOcc = LinkSerializer(
924 help_text="Link to the VNF lifecycle management operation occurrence that this notification is related to.",
930 class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
931 id = serializers.CharField(
932 help_text="Identifier of this notification.",
935 notificationType = serializers.ChoiceField(
936 help_text="Discriminator for the different notification types.",
938 'VnfLcmOperationOccurrenceNotification',
939 'VnfIdentifierCreationNotification',
940 'VnfIdentifierDeletionNotification'
944 subscriptionId = serializers.CharField(
945 help_text="Identifier of the subscription that this notification relates to.",
948 timeStamp = serializers.CharField(
949 help_text="Date-time of the generation of the notification.",
952 notificationStatus = serializers.ChoiceField(
953 help_text="Indicates whether this notification reports about the start of a lifecycle operation or the result of a lifecycle operation.",
954 choices=["START", "RESULT"],
957 operationState = serializers.ChoiceField(
958 help_text="The state of the VNF LCM operation occurrence.",
959 choices=["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"],
962 vnfInstanceId = serializers.CharField(
963 help_text="The identifier of the VNF instance affected.",
966 operation = serializers.ChoiceField(
967 help_text="The lifecycle management operation.",
968 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
971 isAutomaticInvocation = serializers.BooleanField(
972 help_text="Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM.",
975 vnfLcmOpOccId = serializers.CharField(
976 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the notification.",
979 affectedVnfcs = AffectedVnfcSerializer(
980 help_text="Information about VNFC instances that were affected during the lifecycle operation.",
984 affectedVirtualLinks = AffectedVirtualLinkSerializer(
985 help_text="Information about VL instances that were affected during the lifecycle operation.",
989 affectedVirtualStorages = AffectedVirtualStorageSerializer(
990 help_text="Information about virtualised storage instances that were affected during the lifecycle operation.",
994 changedInfo = VnfInfoModificationsSerializer(
995 help_text="Information about the changed VNF instance information, including changed VNF configurable properties.",
999 changedExtConnectivity = ExtVirtualLinkInfoSerializer(
1000 help_text="Information about changed external connectivity.",
1004 error = ProblemDetailsSerializer(
1005 help_text="Details of the latest error, if one has occurred during executing the LCM operation",
1009 _links = LccnLinksSerializer(
1010 help_text="Links to resources related to this notification.",
1016 class VnfIdentifierCreationNotificationSerializer(serializers.Serializer):
1017 id = serializers.CharField(
1018 help_text="Identifier of this notification. \
1019 If a notification is sent multiple times due to multiple subscriptions, \
1020 the id attribute of all these notifications shall have the same value.",
1025 notificationType = serializers.ChoiceField(
1026 help_text="Discriminator for the different notification types.",
1028 'VnfLcmOperationOccurrenceNotification',
1029 'VnfIdentifierCreationNotification',
1030 'VnfIdentifierDeletionNotification'
1034 subscriptionId = serializers.CharField(
1035 help_text="Identifier of the subscription that this notification relates to.",
1040 timeStamp = serializers.DateTimeField(
1041 help_text="Date-time of the generation of the notification.",
1045 vnfInstanceId = serializers.CharField(
1046 help_text="The created VNF instance identifier.",
1051 _links = LccnLinksSerializer(
1052 help_text="Links to resources related to this notification.",
1058 class VnfIdentifierDeletionNotificationSerializer(serializers.Serializer):
1059 id = serializers.CharField(
1060 help_text="Identifier of this notification. \
1061 If a notification is sent multiple times due to multiple subscriptions, \
1062 the id attribute of all these notifications shall have the same value.",
1067 notificationType = serializers.ChoiceField(
1068 help_text="Discriminator for the different notification types.",
1070 'VnfLcmOperationOccurrenceNotification',
1071 'VnfIdentifierCreationNotification',
1072 'VnfIdentifierDeletionNotification'
1076 subscriptionId = serializers.CharField(
1077 help_text="Identifier of the subscription that this notification relates to.",
1082 timeStamp = serializers.DateTimeField(
1083 help_text="Date-time of the generation of the notification.",
1087 vnfInstanceId = serializers.CharField(
1088 help_text="The deleted VNF instance identifier.",
1093 _links = LccnLinksSerializer(
1094 help_text="Links to resources related to this notification.",