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
17 from lcm.ns.serializers.sol.ext_virtual_link_info import ExtVirtualLinkInfoSerializer
18 from lcm.ns.serializers.sol.cp_serializers import AddressRangeSerializer
19 from lcm.ns.serializers.sol.resource_handle import ResourceHandleSerializer
20 from lcm.ns.serializers.sol.pub_serializers import ProblemDetailsSerializer, LinkSerializer
23 # class ResourceHandleSerializer(serializers.Serializer):
24 # vimConnectionId = serializers.CharField(
25 # help_text="Identifier of the VIM connection to manage the resource.",
30 # resourceProviderId = serializers.CharField(
31 # help_text="Identifier of the entity responsible for the management of the resource.",
36 # resourceId = serializers.CharField(
37 # help_text="Identifier of the resource in the scope of the VIM or the resource provider.",
40 # vimLevelResourceType = serializers.CharField(
41 # help_text="Type of the resource in the scope of the VIM or the resource provider.",
48 class ResourceDefinitionSerializer(serializers.Serializer):
49 id = serializers.CharField(
50 help_text="Identifier of this ResourceDefinition, unique at least within the scope of the GrantRequest.",
53 type = serializers.ChoiceField(
54 help_text="Type of the resource definition referenced.",
55 choices=["COMPUTE", "VL", "STORAGE", "LINKPORT"],
58 vduId = serializers.CharField(
59 help_text="Reference to the related VDU in the VNFD applicable to this resource.",
64 resourceTemplateId = serializers.CharField(
65 help_text="Reference to a resource template(such as VnfVirtualLinkDesc) in the VNFD.",
70 resource = ResourceHandleSerializer(
71 help_text="Resource information for an existing resource.",
77 class ConstraintResourceRefSerializer(serializers.Serializer):
78 idType = serializers.ChoiceField(
79 help_text="The type of the identifier.",
80 choices=["RES_MGMT", "GRANT"],
83 resourceId = serializers.CharField(
84 help_text="An actual resource-management-level identifier(idType=RES_MGMT), or an identifier that references a ResourceDefinition(idType=GRANT).",
87 vimConnectionId = serializers.CharField(
93 resourceProviderId = serializers.CharField(
94 help_text="Identifier of the resource provider. It shall only be present when idType = RES_MGMT.",
101 class PlacementConstraintSerializer(serializers.Serializer):
102 affinityOrAntiAffinity = serializers.ChoiceField(
103 help_text="The type of the constraint.",
104 choices=["AFFINITY", "ANTI_AFFINITY"],
107 scope = serializers.ChoiceField(
108 help_text="The scope of the placement constraint indicating the category of the place where the constraint applies.",
109 choices=["NFVI_POP", "ZONE", "ZONE_GROUP", "NFVI_NODE"],
112 resource = ConstraintResourceRefSerializer(
113 help_text="References to resources in the constraint rule.",
119 class VimConstraintSerializer(serializers.Serializer):
120 sameResourceGroup = serializers.BooleanField(
121 help_text="Set to true when the constraint applies not only to the same VIM connection, but also to the same infrastructure resource group.",
124 resource = ConstraintResourceRefSerializer(
125 help_text="References to resources in the constraint rule.",
131 # class LinkSerializer(serializers.Serializer):
132 # href = serializers.CharField(
133 # help_text="URI of the referenced resource.",
138 class GrantRequestLinksSerializer(serializers.Serializer):
139 vnfLcmOpOcc = LinkSerializer(
140 help_text="Related VNF lifecycle management operation occurrence.",
143 vnfInstance = LinkSerializer(
144 help_text="Related VNF instance.",
149 class GrantRequestSerializer(serializers.Serializer):
150 vnfInstanceId = serializers.CharField(
151 help_text="Identifier of the VNF instance which this grant request is related to.",
154 vnfLcmOpOccId = serializers.CharField(
155 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the GrantRequest.",
156 required=False, # TODO required
160 vnfdId = serializers.CharField(
161 help_text="Identifier of the VNFD that defines the VNF for which the LCM operation is to be granted.",
162 required=False, # TODO required
166 flavourId = serializers.CharField(
167 help_text="Identifier of the VNF deployment flavour of the VNFD that defines the VNF for which the LCM operation is to be granted.",
172 operation = serializers.ChoiceField(
173 help_text="The lifecycle management operation for which granting is requested.",
174 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
177 isAutomaticInvocation = serializers.BooleanField(
178 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.",
181 instantiationLevelId = serializers.CharField(
182 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.",
187 addResources = ResourceDefinitionSerializer(
188 help_text="List of resource definitions in the VNFD for resources to be added by the LCM operation.",
192 tempResources = ResourceDefinitionSerializer(
193 help_text="List of resource definitions in the VNFD for resources to be temporarily instantiated during the runtime of the LCM operation.",
197 removeResources = ResourceDefinitionSerializer(
198 help_text="Provides the definitions of resources to be removed by the LCM operation.",
202 updateResources = ResourceDefinitionSerializer(
203 help_text="Provides the definitions of resources to be modified by the LCM operation.",
207 placementConstraints = PlacementConstraintSerializer(
208 help_text="Placement constraints that the VNFM may send to the NFVO in order to influence the resource placement decision.",
212 vimConstraints = VimConstraintSerializer(
213 help_text="Used by the VNFM to require that multiple resources are managed through the same VIM connection.",
217 additionalParams = serializers.DictField(
218 help_text="Additional parameters passed by the VNFM.",
219 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
223 _links = GrantRequestLinksSerializer(
224 help_text="Links to resources related to this request.",
225 required=False # TODO required
229 class VimConnectionInfoSerializer(serializers.Serializer):
230 id = serializers.CharField(
231 help_text="The identifier of the VIM Connection. This identifier is managed by the NFVO.",
234 vimId = serializers.CharField(
235 help_text="The identifier of the VIM instance. This identifier is managed by the NFVO.",
240 vimType = serializers.CharField(
241 help_text="Discriminator for the different types of the VIM information.",
246 interfaceInfo = serializers.DictField(
247 help_text="Information about the interface or interfaces to the VIM.",
248 child=serializers.CharField(help_text="Interface Info", allow_blank=True),
252 accessInfo = serializers.DictField(
253 help_text="Authentication credentials for accessing the VIM.",
254 child=serializers.CharField(help_text="Access Info", allow_blank=True),
258 extra = serializers.DictField(
259 help_text="VIM type specific additional information.",
260 child=serializers.CharField(help_text="Extra", allow_blank=True),
266 class ZoneInfoSerializer(serializers.Serializer):
267 id = serializers.CharField(
268 help_text="The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the Grant structure.",
271 zoneId = serializers.CharField(
272 help_text="The identifier of the resource zone, as managed by the resource management layer(typically, the VIM).",
277 vimConnectionId = serializers.CharField(
278 help_text="Identifier of the connection to the VIM that manages the resource zone.",
283 resourceProviderId = serializers.CharField(
284 help_text="Identifies the entity responsible for the management the resource zone.",
291 class ZoneGroupInfoSerializer(serializers.Serializer):
292 zoneId = serializers.ListSerializer(
293 help_text="References of identifiers of ZoneInfo structures.",
294 child=serializers.CharField(help_text="IdentifierLocal", allow_blank=True),
300 class GrantInfoSerializer(serializers.Serializer):
301 resourceDefinitionId = serializers.CharField(
302 help_text="Identifier of the related ResourceDefinition from the related GrantRequest.",
305 reservationId = serializers.CharField(
306 help_text="The reservation identifier applicable to the VNFC/VirtualLink/VirtualStorage.",
311 vimConnectionId = serializers.CharField(
312 help_text="Identifier of the VIM connection to be used to manage this resource.",
317 resourceProviderId = serializers.CharField(
318 help_text="Identifies the entity responsible for the management of the virtualised resource.",
323 zoneId = serializers.CharField(
324 help_text="Reference to the identifier of the ZoneInfo in the Grant.",
329 resourceGroupId = serializers.CharField(
330 help_text="Identifier of the infrastructure resource group.",
337 class VimComputeResourceFlavourSerializer(serializers.Serializer):
338 vimConnectionId = serializers.CharField(
339 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
344 resourceProviderId = serializers.CharField(
345 help_text="Identifies the entity responsible for the management of the virtualised resource.",
350 vnfdVirtualComputeDescId = serializers.CharField(
351 help_text="Identifier which references the virtual compute descriptor in the VNFD that maps to this flavour.",
356 vimFlavourId = serializers.CharField(
357 help_text="Identifier of the compute resource flavour in the resource management layer (i.e. VIM).",
364 class VimSoftwareImageSerializer(serializers.Serializer):
365 vimConnectionId = serializers.CharField(
366 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
371 resourceProviderId = serializers.CharField(
372 help_text="Identifies the entity responsible for the management of the virtualised resource.",
377 vnfdSoftwareImageId = serializers.CharField(
378 help_text="Identifier which references the software image descriptor in the VNFD.",
383 vimSoftwareImageId = serializers.CharField(
384 help_text="Identifier of the software image in the resource management layer (i.e. VIM).",
391 class VimAssetsSerializer(serializers.Serializer):
392 computeResourceFlavours = VimComputeResourceFlavourSerializer(
393 help_text="Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.",
397 softwareImages = VimSoftwareImageSerializer(
398 help_text="Mappings between software images defined in the VNFD and software images managed in the VIM.",
404 # class AddressRangeSerializer(serializers.Serializer):
405 # minAddress = serializers.CharField(
406 # help_text="Lowest IP address belonging to the range.",
409 # maxAddress = serializers.CharField(
410 # help_text="Highest IP address belonging to the range.",
415 class IpAddresseSerializer(serializers.Serializer):
416 type = serializers.ChoiceField(
417 help_text="The type of the IP addresses.",
418 choices=["IPV4", "IPV6"],
421 fixedAddresses = serializers.ListSerializer(
422 help_text="Fixed addresses to assign.",
423 child=serializers.CharField(help_text="IpAddress"),
427 numDynamicAddresses = serializers.IntegerField(
428 help_text="Number of dynamic addresses to assign.",
431 addressRange = AddressRangeSerializer(
432 help_text="An IP address range to be used, e.g. in case of egress connections.",
436 subnetId = serializers.CharField(
437 help_text="Subnet defined by the identifier of the subnet resource in the VIM.",
444 class IpOverEthernetAddressSerializer(serializers.Serializer):
445 macAddress = serializers.CharField(
446 help_text="MAC address.",
451 ipAddresses = IpAddresseSerializer(
452 help_text="List of IP addresses to assign to the CP instance.",
458 class CpProtocolDataConfigSerializer(serializers.Serializer):
459 layerProtocol = serializers.ChoiceField(
460 help_text="Identifier of layer(s) and protocol(s).",
461 choices=["IP_OVER_ETHERNET"],
464 ipOverEthernet = IpOverEthernetAddressSerializer(
465 help_text="Network address data for IP over Ethernet to assign to the extCP instance.",
471 class VnfExtCpConfigDataSerializer(serializers.Serializer):
472 cpInstanceId = serializers.CharField(
473 help_text="Identifier of the external CP instance to which this set of configuration parameters is requested to be applied.",
478 linkPortId = serializers.CharField(
479 help_text="Identifier of a pre-configured link port to which the external CP will be associated.",
484 cpProtocolData = CpProtocolDataConfigSerializer(
485 help_text="Parameters for configuring the network protocols on the link port that connects the CP to a VL.",
491 class VnfExtCpSerializer(serializers.Serializer):
492 cpdId = serializers.CharField(
493 help_text="The identifier of the CPD in the VNFD.",
496 cpConfig = VnfExtCpConfigDataSerializer(
497 help_text="List of instance data that need to be configured on the CP instances created from the respective CPD.",
503 class ExtLinkPortSerializer(serializers.Serializer):
504 id = serializers.CharField(
505 help_text="Identifier of this link port as provided by the entity that has created the link port.",
508 resourceHandle = serializers.CharField(
509 help_text="Reference to the virtualised resource realizing this link port.",
514 class ExtVirtualLinkSerializer(serializers.Serializer):
515 id = serializers.CharField(
516 help_text="The identifier of the external VL instance.",
519 vimConnectionId = serializers.CharField(
520 help_text="Identifier of the VIM connection to manage this resource.",
525 resourceProviderId = serializers.CharField(
526 help_text="Identifies the entity responsible for the management of this resource.",
531 resourceId = serializers.CharField(
532 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
535 extCps = VnfExtCpSerializer(
536 help_text="External CPs of the VNF to be connected to this external VL.",
540 extLinkPorts = ExtLinkPortSerializer(
541 help_text="Externally provided link ports to be used to connect external connection points to this external VL.",
547 class ExtManagedVirtualLinkSerializer(serializers.Serializer):
548 id = serializers.CharField(
549 help_text="The identifier of the externally-managed internal VL instance.",
552 virtualLinkDescId = serializers.CharField(
553 help_text="The identifier of the VLD in the VNFD for this VL.",
556 vimConnectionId = serializers.CharField(
557 help_text="Identifier of the VIM connection to manage this resource.",
562 resourceProviderId = serializers.CharField(
563 help_text="Identifies the entity responsible for the management of this resource.",
568 resourceId = serializers.CharField(
569 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
574 class GrantLinksSerializer(serializers.Serializer):
575 self = LinkSerializer(
576 help_text="URI of this resource.",
579 vnfLcmOpOcc = LinkSerializer(
580 help_text="Related VNF lifecycle management operation occurrence.",
583 vnfInstance = LinkSerializer(
584 help_text="Related VNF instance.",
589 class GrantSerializer(serializers.Serializer):
590 id = serializers.CharField(
591 help_text="Identifier of the grant.",
594 vnfInstanceId = serializers.CharField(
595 help_text="Identifier of the related VNF instance.",
598 vnfLcmOpOccId = serializers.CharField(
599 help_text="Identifier of the related VNF lifecycle management operation occurrence.",
600 required=False, # TODO required
604 vimConnections = VimConnectionInfoSerializer(
605 help_text="Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources.",
609 zones = ZoneInfoSerializer(
610 help_text="Identifies resource zones where the resources are approved to be allocated by the VNFM.",
614 zoneGroups = ZoneGroupInfoSerializer(
615 help_text="Information about groups of resource zones.",
619 computeReservationId = serializers.CharField(
620 help_text="Information that identifies a reservation applicable to the compute resource requirements.",
625 networkReservationId = serializers.CharField(
626 help_text="Information that identifies a reservation applicable to the network resource requirements.",
631 storageReservationId = serializers.CharField(
632 help_text="Information that identifies a reservation applicable to the storage resource requirements.",
637 addResources = GrantInfoSerializer(
638 help_text="List of resources that are approved to be added.",
642 tempResources = GrantInfoSerializer(
643 help_text="List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation.",
647 removeResources = GrantInfoSerializer(
648 help_text="List of resources that are approved to be removed.",
652 updateResources = GrantInfoSerializer(
653 help_text="List of resources that are approved to be modified.",
657 vimAssets = VimAssetsSerializer(
658 help_text="Information about assets for the VNF that are managed by the NFVO in the VIM.",
662 extVirtualLinks = ExtVirtualLinkSerializer(
663 help_text="Information about external VLs to connect the VNF to.",
667 extManagedVirtualLinks = ExtManagedVirtualLinkSerializer(
668 help_text="Information about internal VLs that are managed by other entities than the VNFM.",
672 additionalParams = serializers.DictField(
673 help_text="Additional parameters passed by the NFVO, \
674 specific to the VNF and the LCM operation.",
675 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
679 _links = GrantLinksSerializer(
680 help_text="Links to resources related to this resource.",
685 class AffectedVnfcSerializer(serializers.Serializer):
686 id = serializers.CharField(
687 help_text="Identifier of the Vnfc instance.",
690 vduId = serializers.CharField(
691 help_text="Identifier of the related VDU in the VNFD.",
694 changeType = serializers.ChoiceField(
695 help_text="Signals the type of change.",
696 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
699 computeResource = ResourceHandleSerializer(
700 help_text="Reference to the VirtualCompute resource.",
703 metadata = serializers.DictField(
704 help_text="Metadata about this resource.",
705 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
709 affectedVnfcCpIds = serializers.ListSerializer(
710 help_text="Identifiers of CP(s) of the VNFC instance that were affected by the change.",
711 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
715 addedStorageResourceIds = serializers.ListSerializer(
716 help_text="References to VirtualStorage resources that have been added.",
717 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
721 removedStorageResourceIds = serializers.ListSerializer(
722 help_text="References to VirtualStorage resources that have been removed.",
723 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
729 class AffectedVirtualLinkSerializer(serializers.Serializer):
730 id = serializers.CharField(
731 help_text="Identifier of the virtual link instance.",
734 virtualLinkDescId = serializers.CharField(
735 help_text="Identifier of the related VLD in the VNFD.",
738 changeType = serializers.ChoiceField(
739 help_text="Signals the type of change.",
740 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED"],
743 networkResource = ResourceHandleSerializer(
744 help_text="Reference to the VirtualNetwork resource.",
748 metadata = serializers.DictField(
749 help_text="Metadata about this resource.",
750 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
756 class AffectedVirtualStorageSerializer(serializers.Serializer):
757 id = serializers.CharField(
758 help_text="Identifier of the storage instance.",
761 virtualStorageDescId = serializers.CharField(
762 help_text="Identifier of the related VirtualStorage descriptor in the VNFD.",
765 changeType = serializers.ChoiceField(
766 help_text="Signals the type of change.",
767 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
770 storageResource = ResourceHandleSerializer(
771 help_text="Reference to the VirtualStorage resource.",
775 metadata = serializers.DictField(
776 help_text="Metadata about this resource.",
777 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
783 class VnfInfoModificationsSerializer(serializers.Serializer):
784 vnfInstanceName = serializers.CharField(
785 help_text="If present, this attribute signals modifications of the vnfInstanceName attribute in VnfInstance.",
790 vnfInstanceDescription = serializers.CharField(
791 help_text="If present, this attribute signals modifications of the vnfInstanceDescription attribute in VnfInstance.",
796 vnfConfigurableProperties = serializers.DictField(
797 help_text="If present, this attribute signals modifications of the vnfConfigurableProperties attribute in VnfInstance.",
798 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
802 metadata = serializers.DictField(
803 help_text="If present, this attribute signals modifications of the metadata attribute in VnfInstance.",
804 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
808 extensions = serializers.DictField(
809 help_text="If present, this attribute signals modifications of the extensions attribute in VnfInstance.",
810 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
814 vimConnectionInfo = VimConnectionInfoSerializer(
815 help_text="If present, this attribute signals modifications of the vimConnectionInfo attribute in VnfInstance.",
819 vnfPkgId = serializers.CharField(
820 help_text="If present, this attribute signals modifications of the vnfPkgId attribute in VnfInstance.",
825 vnfdId = serializers.CharField(
826 help_text="If present, this attribute signals modifications of the vnfdId attribute in VnfInstance.",
831 vnfProvider = serializers.CharField(
832 help_text="If present, this attribute signals modifications of the vnfProvider attribute in VnfInstance.",
837 vnfProductName = serializers.CharField(
838 help_text="If present, this attribute signals modifications of the vnfProductName attribute in VnfInstance.",
843 vnfSoftwareVersion = serializers.CharField(
844 help_text="If present, this attribute signals modifications of the vnfSoftwareVersion attribute in VnfInstance.",
849 vnfdVersion = serializers.CharField(
850 help_text="If present, this attribute signals modifications of the vnfdVersion attribute in VnfInstance.",
857 class ExtLinkPortInfoSerializer(serializers.Serializer):
858 id = serializers.CharField(
859 help_text="Identifier of this link port as provided by the entity that has created the link port.",
862 resourceHandle = ResourceHandleSerializer(
863 help_text="Reference to the virtualised resource realizing this link port.",
866 cpInstanceId = serializers.CharField(
867 help_text="Identifier of the external CP of the VNF connected to this link port.",
874 # class ExtVirtualLinkInfoSerializer(serializers.Serializer):
875 # id = serializers.CharField(
876 # help_text="Identifier of the external VL and the related external VL information instance.",
879 # resourceHandle = ResourceHandleSerializer(
880 # help_text="Reference to the resource realizing this VL.",
883 # extLinkPorts = ExtLinkPortInfoSerializer(
884 # help_text="Link ports of this VL.",
890 # class ProblemDetailsSerializer(serializers.Serializer):
891 # type = serializers.CharField(
892 # help_text="A URI reference according to IETF RFC 3986 [5] that identifies the problem type.",
897 # title = serializers.CharField(
898 # help_text="A short, human-readable summary of the problem type.",
903 # status = serializers.IntegerField(
904 # help_text="The HTTP status code for this occurrence of the problem.",
907 # detail = serializers.CharField(
908 # help_text="A human-readable explanation specific to this occurrence of the problem.",
911 # instance = serializers.CharField(
912 # help_text="A URI reference that identifies the specific occurrence of the problem.",
919 class LccnLinksSerializer(serializers.Serializer):
920 vnfInstance = LinkSerializer(
921 help_text="Link to the resource representing the VNF instance to which the notified change applies.",
924 subscription = LinkSerializer(
925 help_text="Link to the related subscription.",
928 vnfLcmOpOcc = LinkSerializer(
929 help_text="Link to the VNF lifecycle management operation occurrence that this notification is related to.",
935 class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
936 id = serializers.CharField(
937 help_text="Identifier of this notification.",
940 notificationType = serializers.ChoiceField(
941 help_text="Discriminator for the different notification types.",
943 'VnfLcmOperationOccurrenceNotification',
944 'VnfIdentifierCreationNotification',
945 'VnfIdentifierDeletionNotification'
949 subscriptionId = serializers.CharField(
950 help_text="Identifier of the subscription that this notification relates to.",
953 timeStamp = serializers.CharField(
954 help_text="Date-time of the generation of the notification.",
957 notificationStatus = serializers.ChoiceField(
958 help_text="Indicates whether this notification reports about the start of a lifecycle operation or the result of a lifecycle operation.",
959 choices=["START", "RESULT"],
962 operationState = serializers.ChoiceField(
963 help_text="The state of the VNF LCM operation occurrence.",
964 choices=["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"],
967 vnfInstanceId = serializers.CharField(
968 help_text="The identifier of the VNF instance affected.",
971 operation = serializers.ChoiceField(
972 help_text="The lifecycle management operation.",
973 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
976 isAutomaticInvocation = serializers.BooleanField(
977 help_text="Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM.",
980 vnfLcmOpOccId = serializers.CharField(
981 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the notification.",
984 affectedVnfcs = AffectedVnfcSerializer(
985 help_text="Information about VNFC instances that were affected during the lifecycle operation.",
989 affectedVirtualLinks = AffectedVirtualLinkSerializer(
990 help_text="Information about VL instances that were affected during the lifecycle operation.",
994 affectedVirtualStorages = AffectedVirtualStorageSerializer(
995 help_text="Information about virtualised storage instances that were affected during the lifecycle operation.",
999 changedInfo = VnfInfoModificationsSerializer(
1000 help_text="Information about the changed VNF instance information, including changed VNF configurable properties.",
1004 changedExtConnectivity = ExtVirtualLinkInfoSerializer(
1005 help_text="Information about changed external connectivity.",
1009 error = ProblemDetailsSerializer(
1010 help_text="Details of the latest error, if one has occurred during executing the LCM operation",
1014 _links = LccnLinksSerializer(
1015 help_text="Links to resources related to this notification.",
1021 class VnfIdentifierCreationNotificationSerializer(serializers.Serializer):
1022 id = serializers.CharField(
1023 help_text="Identifier of this notification. \
1024 If a notification is sent multiple times due to multiple subscriptions, \
1025 the id attribute of all these notifications shall have the same value.",
1030 notificationType = serializers.ChoiceField(
1031 help_text="Discriminator for the different notification types.",
1033 'VnfLcmOperationOccurrenceNotification',
1034 'VnfIdentifierCreationNotification',
1035 'VnfIdentifierDeletionNotification'
1039 subscriptionId = serializers.CharField(
1040 help_text="Identifier of the subscription that this notification relates to.",
1045 timeStamp = serializers.DateTimeField(
1046 help_text="Date-time of the generation of the notification.",
1050 vnfInstanceId = serializers.CharField(
1051 help_text="The created VNF instance identifier.",
1056 _links = LccnLinksSerializer(
1057 help_text="Links to resources related to this notification.",
1063 class VnfIdentifierDeletionNotificationSerializer(serializers.Serializer):
1064 id = serializers.CharField(
1065 help_text="Identifier of this notification. \
1066 If a notification is sent multiple times due to multiple subscriptions, \
1067 the id attribute of all these notifications shall have the same value.",
1072 notificationType = serializers.ChoiceField(
1073 help_text="Discriminator for the different notification types.",
1075 'VnfLcmOperationOccurrenceNotification',
1076 'VnfIdentifierCreationNotification',
1077 'VnfIdentifierDeletionNotification'
1081 subscriptionId = serializers.CharField(
1082 help_text="Identifier of the subscription that this notification relates to.",
1087 timeStamp = serializers.DateTimeField(
1088 help_text="Date-time of the generation of the notification.",
1092 vnfInstanceId = serializers.CharField(
1093 help_text="The deleted VNF instance identifier.",
1098 _links = LccnLinksSerializer(
1099 help_text="Links to resources related to this notification.",