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
16 from lcm.ns.serializers.resource_handle import ResourceHandleSerializer
17 from lcm.ns.serializers.link import linkSerializer
18 from lcm.ns.serializers.pub_serializers import AddressRangeSerializer
20 # class ResourceHandleSerializer(serializers.Serializer):
21 # vimConnectionId = serializers.CharField(
22 # help_text="Identifier of the VIM connection to manage the resource.",
27 # resourceProviderId = serializers.CharField(
28 # help_text="Identifier of the entity responsible for the management of the resource.",
33 # resourceId = serializers.CharField(
34 # help_text="Identifier of the resource in the scope of the VIM or the resource provider.",
37 # vimLevelResourceType = serializers.CharField(
38 # help_text="Type of the resource in the scope of the VIM or the resource provider.",
45 class ResourceDefinitionSerializer(serializers.Serializer):
46 id = serializers.CharField(
47 help_text="Identifier of this ResourceDefinition, unique at least within the scope of the GrantRequest.",
50 type = serializers.ChoiceField(
51 help_text="Type of the resource definition referenced.",
52 choices=["COMPUTE", "VL", "STORAGE", "LINKPORT"],
55 vduId = serializers.CharField(
56 help_text="Reference to the related VDU in the VNFD applicable to this resource.",
61 resourceTemplateId = serializers.CharField(
62 help_text="Reference to a resource template(such as VnfVirtualLinkDesc) in the VNFD.",
67 resource = ResourceHandleSerializer(
68 help_text="Resource information for an existing resource.",
74 class ConstraintResourceRefSerializer(serializers.Serializer):
75 idType = serializers.ChoiceField(
76 help_text="The type of the identifier.",
77 choices=["RES_MGMT", "GRANT"],
80 resourceId = serializers.CharField(
81 help_text="An actual resource-management-level identifier(idType=RES_MGMT), or an identifier that references a ResourceDefinition(idType=GRANT).",
84 vimConnectionId = serializers.CharField(
90 resourceProviderId = serializers.CharField(
91 help_text="Identifier of the resource provider. It shall only be present when idType = RES_MGMT.",
98 class PlacementConstraintSerializer(serializers.Serializer):
99 affinityOrAntiAffinity = serializers.ChoiceField(
100 help_text="The type of the constraint.",
101 choices=["AFFINITY", "ANTI_AFFINITY"],
104 scope = serializers.ChoiceField(
105 help_text="The scope of the placement constraint indicating the category of the place where the constraint applies.",
106 choices=["NFVI_POP", "ZONE", "ZONE_GROUP", "NFVI_NODE"],
109 resource = ConstraintResourceRefSerializer(
110 help_text="References to resources in the constraint rule.",
116 class VimConstraintSerializer(serializers.Serializer):
117 sameResourceGroup = serializers.BooleanField(
118 help_text="Set to true when the constraint applies not only to the same VIM connection, but also to the same infrastructure resource group.",
121 resource = ConstraintResourceRefSerializer(
122 help_text="References to resources in the constraint rule.",
128 # class LinkSerializer(serializers.Serializer):
129 # href = serializers.CharField(
130 # help_text="URI of the referenced resource.",
135 class GrantRequestLinksSerializer(serializers.Serializer):
136 vnfLcmOpOcc = linkSerializer(
137 help_text="Related VNF lifecycle management operation occurrence.",
140 vnfInstance = linkSerializer(
141 help_text="Related VNF instance.",
146 class GrantRequestSerializer(serializers.Serializer):
147 vnfInstanceId = serializers.CharField(
148 help_text="Identifier of the VNF instance which this grant request is related to.",
151 vnfLcmOpOccId = serializers.CharField(
152 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the GrantRequest.",
153 required=False, # TODO required
157 vnfdId = serializers.CharField(
158 help_text="Identifier of the VNFD that defines the VNF for which the LCM operation is to be granted.",
159 required=False, # TODO required
163 flavourId = serializers.CharField(
164 help_text="Identifier of the VNF deployment flavour of the VNFD that defines the VNF for which the LCM operation is to be granted.",
169 operation = serializers.ChoiceField(
170 help_text="The lifecycle management operation for which granting is requested.",
171 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
174 isAutomaticInvocation = serializers.BooleanField(
175 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.",
178 instantiationLevelId = serializers.CharField(
179 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.",
184 addResources = ResourceDefinitionSerializer(
185 help_text="List of resource definitions in the VNFD for resources to be added by the LCM operation.",
189 tempResources = ResourceDefinitionSerializer(
190 help_text="List of resource definitions in the VNFD for resources to be temporarily instantiated during the runtime of the LCM operation.",
194 removeResources = ResourceDefinitionSerializer(
195 help_text="Provides the definitions of resources to be removed by the LCM operation.",
199 updateResources = ResourceDefinitionSerializer(
200 help_text="Provides the definitions of resources to be modified by the LCM operation.",
204 placementConstraints = PlacementConstraintSerializer(
205 help_text="Placement constraints that the VNFM may send to the NFVO in order to influence the resource placement decision.",
209 vimConstraints = VimConstraintSerializer(
210 help_text="Used by the VNFM to require that multiple resources are managed through the same VIM connection.",
214 additionalParams = serializers.DictField(
215 help_text="Additional parameters passed by the VNFM.",
216 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
220 _links = GrantRequestLinksSerializer(
221 help_text="Links to resources related to this request.",
222 required=False # TODO required
226 class VimConnectionInfoSerializer(serializers.Serializer):
227 id = serializers.CharField(
228 help_text="The identifier of the VIM Connection. This identifier is managed by the NFVO.",
231 vimId = serializers.CharField(
232 help_text="The identifier of the VIM instance. This identifier is managed by the NFVO.",
237 vimType = serializers.CharField(
238 help_text="Discriminator for the different types of the VIM information.",
243 interfaceInfo = serializers.DictField(
244 help_text="Information about the interface or interfaces to the VIM.",
245 child=serializers.CharField(help_text="Interface Info", allow_blank=True),
249 accessInfo = serializers.DictField(
250 help_text="Authentication credentials for accessing the VIM.",
251 child=serializers.CharField(help_text="Access Info", allow_blank=True),
255 extra = serializers.DictField(
256 help_text="VIM type specific additional information.",
257 child=serializers.CharField(help_text="Extra", allow_blank=True),
263 class ZoneInfoSerializer(serializers.Serializer):
264 id = serializers.CharField(
265 help_text="The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the Grant structure.",
268 zoneId = serializers.CharField(
269 help_text="The identifier of the resource zone, as managed by the resource management layer(typically, the VIM).",
274 vimConnectionId = serializers.CharField(
275 help_text="Identifier of the connection to the VIM that manages the resource zone.",
280 resourceProviderId = serializers.CharField(
281 help_text="Identifies the entity responsible for the management the resource zone.",
288 class ZoneGroupInfoSerializer(serializers.Serializer):
289 zoneId = serializers.ListSerializer(
290 help_text="References of identifiers of ZoneInfo structures.",
291 child=serializers.CharField(help_text="IdentifierLocal", allow_blank=True),
297 class GrantInfoSerializer(serializers.Serializer):
298 resourceDefinitionId = serializers.CharField(
299 help_text="Identifier of the related ResourceDefinition from the related GrantRequest.",
302 reservationId = serializers.CharField(
303 help_text="The reservation identifier applicable to the VNFC/VirtualLink/VirtualStorage.",
308 vimConnectionId = serializers.CharField(
309 help_text="Identifier of the VIM connection to be used to manage this resource.",
314 resourceProviderId = serializers.CharField(
315 help_text="Identifies the entity responsible for the management of the virtualised resource.",
320 zoneId = serializers.CharField(
321 help_text="Reference to the identifier of the ZoneInfo in the Grant.",
326 resourceGroupId = serializers.CharField(
327 help_text="Identifier of the infrastructure resource group.",
334 class VimComputeResourceFlavourSerializer(serializers.Serializer):
335 vimConnectionId = serializers.CharField(
336 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
341 resourceProviderId = serializers.CharField(
342 help_text="Identifies the entity responsible for the management of the virtualised resource.",
347 vnfdVirtualComputeDescId = serializers.CharField(
348 help_text="Identifier which references the virtual compute descriptor in the VNFD that maps to this flavour.",
353 vimFlavourId = serializers.CharField(
354 help_text="Identifier of the compute resource flavour in the resource management layer (i.e. VIM).",
361 class VimSoftwareImageSerializer(serializers.Serializer):
362 vimConnectionId = serializers.CharField(
363 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
368 resourceProviderId = serializers.CharField(
369 help_text="Identifies the entity responsible for the management of the virtualised resource.",
374 vnfdSoftwareImageId = serializers.CharField(
375 help_text="Identifier which references the software image descriptor in the VNFD.",
380 vimSoftwareImageId = serializers.CharField(
381 help_text="Identifier of the software image in the resource management layer (i.e. VIM).",
388 class VimAssetsSerializer(serializers.Serializer):
389 computeResourceFlavours = VimComputeResourceFlavourSerializer(
390 help_text="Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.",
394 softwareImages = VimSoftwareImageSerializer(
395 help_text="Mappings between software images defined in the VNFD and software images managed in the VIM.",
401 # class AddressRangeSerializer(serializers.Serializer):
402 # minAddress = serializers.CharField(
403 # help_text="Lowest IP address belonging to the range.",
406 # maxAddress = serializers.CharField(
407 # help_text="Highest IP address belonging to the range.",
412 class IpAddresseSerializer(serializers.Serializer):
413 type = serializers.ChoiceField(
414 help_text="The type of the IP addresses.",
415 choices=["IPV4", "IPV6"],
418 fixedAddresses = serializers.ListSerializer(
419 help_text="Fixed addresses to assign.",
420 child=serializers.CharField(help_text="IpAddress"),
424 numDynamicAddresses = serializers.IntegerField(
425 help_text="Number of dynamic addresses to assign.",
428 addressRange = AddressRangeSerializer(
429 help_text="An IP address range to be used, e.g. in case of egress connections.",
433 subnetId = serializers.CharField(
434 help_text="Subnet defined by the identifier of the subnet resource in the VIM.",
441 class IpOverEthernetAddressSerializer(serializers.Serializer):
442 macAddress = serializers.CharField(
443 help_text="MAC address.",
448 ipAddresses = IpAddresseSerializer(
449 help_text="List of IP addresses to assign to the CP instance.",
455 class CpProtocolDataConfigSerializer(serializers.Serializer):
456 layerProtocol = serializers.ChoiceField(
457 help_text="Identifier of layer(s) and protocol(s).",
458 choices=["IP_OVER_ETHERNET"],
461 ipOverEthernet = IpOverEthernetAddressSerializer(
462 help_text="Network address data for IP over Ethernet to assign to the extCP instance.",
468 class VnfExtCpConfigDataSerializer(serializers.Serializer):
469 cpInstanceId = serializers.CharField(
470 help_text="Identifier of the external CP instance to which this set of configuration parameters is requested to be applied.",
475 linkPortId = serializers.CharField(
476 help_text="Identifier of a pre-configured link port to which the external CP will be associated.",
481 cpProtocolData = CpProtocolDataConfigSerializer(
482 help_text="Parameters for configuring the network protocols on the link port that connects the CP to a VL.",
488 class VnfExtCpSerializer(serializers.Serializer):
489 cpdId = serializers.CharField(
490 help_text="The identifier of the CPD in the VNFD.",
493 cpConfig = VnfExtCpConfigDataSerializer(
494 help_text="List of instance data that need to be configured on the CP instances created from the respective CPD.",
500 class ExtLinkPortSerializer(serializers.Serializer):
501 id = serializers.CharField(
502 help_text="Identifier of this link port as provided by the entity that has created the link port.",
505 resourceHandle = serializers.CharField(
506 help_text="Reference to the virtualised resource realizing this link port.",
511 class ExtVirtualLinkSerializer(serializers.Serializer):
512 id = serializers.CharField(
513 help_text="The identifier of the external VL instance.",
516 vimConnectionId = serializers.CharField(
517 help_text="Identifier of the VIM connection to manage this resource.",
522 resourceProviderId = serializers.CharField(
523 help_text="Identifies the entity responsible for the management of this resource.",
528 resourceId = serializers.CharField(
529 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
532 extCps = VnfExtCpSerializer(
533 help_text="External CPs of the VNF to be connected to this external VL.",
537 extLinkPorts = ExtLinkPortSerializer(
538 help_text="Externally provided link ports to be used to connect external connection points to this external VL.",
544 class ExtManagedVirtualLinkSerializer(serializers.Serializer):
545 id = serializers.CharField(
546 help_text="The identifier of the externally-managed internal VL instance.",
549 virtualLinkDescId = serializers.CharField(
550 help_text="The identifier of the VLD in the VNFD for this VL.",
553 vimConnectionId = serializers.CharField(
554 help_text="Identifier of the VIM connection to manage this resource.",
559 resourceProviderId = serializers.CharField(
560 help_text="Identifies the entity responsible for the management of this resource.",
565 resourceId = serializers.CharField(
566 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
571 class GrantLinksSerializer(serializers.Serializer):
572 self = linkSerializer(
573 help_text="URI of this resource.",
576 vnfLcmOpOcc = linkSerializer(
577 help_text="Related VNF lifecycle management operation occurrence.",
580 vnfInstance = linkSerializer(
581 help_text="Related VNF instance.",
586 class GrantSerializer(serializers.Serializer):
587 id = serializers.CharField(
588 help_text="Identifier of the grant.",
591 vnfInstanceId = serializers.CharField(
592 help_text="Identifier of the related VNF instance.",
595 vnfLcmOpOccId = serializers.CharField(
596 help_text="Identifier of the related VNF lifecycle management operation occurrence.",
597 required=False, # TODO required
601 vimConnections = VimConnectionInfoSerializer(
602 help_text="Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources.",
606 zones = ZoneInfoSerializer(
607 help_text="Identifies resource zones where the resources are approved to be allocated by the VNFM.",
611 zoneGroups = ZoneGroupInfoSerializer(
612 help_text="Information about groups of resource zones.",
616 computeReservationId = serializers.CharField(
617 help_text="Information that identifies a reservation applicable to the compute resource requirements.",
622 networkReservationId = serializers.CharField(
623 help_text="Information that identifies a reservation applicable to the network resource requirements.",
628 storageReservationId = serializers.CharField(
629 help_text="Information that identifies a reservation applicable to the storage resource requirements.",
634 addResources = GrantInfoSerializer(
635 help_text="List of resources that are approved to be added.",
639 tempResources = GrantInfoSerializer(
640 help_text="List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation.",
644 removeResources = GrantInfoSerializer(
645 help_text="List of resources that are approved to be removed.",
649 updateResources = GrantInfoSerializer(
650 help_text="List of resources that are approved to be modified.",
654 vimAssets = VimAssetsSerializer(
655 help_text="Information about assets for the VNF that are managed by the NFVO in the VIM.",
659 extVirtualLinks = ExtVirtualLinkSerializer(
660 help_text="Information about external VLs to connect the VNF to.",
664 extManagedVirtualLinks = ExtManagedVirtualLinkSerializer(
665 help_text="Information about internal VLs that are managed by other entities than the VNFM.",
669 additionalParams = serializers.DictField(
670 help_text="Additional parameters passed by the NFVO, \
671 specific to the VNF and the LCM operation.",
672 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
676 _links = GrantLinksSerializer(
677 help_text="Links to resources related to this resource.",
682 class AffectedVnfcSerializer(serializers.Serializer):
683 id = serializers.CharField(
684 help_text="Identifier of the Vnfc instance.",
687 vduId = serializers.CharField(
688 help_text="Identifier of the related VDU in the VNFD.",
691 changeType = serializers.ChoiceField(
692 help_text="Signals the type of change.",
693 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
696 computeResource = ResourceHandleSerializer(
697 help_text="Reference to the VirtualCompute resource.",
700 metadata = serializers.DictField(
701 help_text="Metadata about this resource.",
702 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
706 affectedVnfcCpIds = serializers.ListSerializer(
707 help_text="Identifiers of CP(s) of the VNFC instance that were affected by the change.",
708 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
712 addedStorageResourceIds = serializers.ListSerializer(
713 help_text="References to VirtualStorage resources that have been added.",
714 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
718 removedStorageResourceIds = serializers.ListSerializer(
719 help_text="References to VirtualStorage resources that have been removed.",
720 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
726 class AffectedVirtualLinkSerializer(serializers.Serializer):
727 id = serializers.CharField(
728 help_text="Identifier of the virtual link instance.",
731 virtualLinkDescId = serializers.CharField(
732 help_text="Identifier of the related VLD in the VNFD.",
735 changeType = serializers.ChoiceField(
736 help_text="Signals the type of change.",
737 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED"],
740 networkResource = ResourceHandleSerializer(
741 help_text="Reference to the VirtualNetwork resource.",
745 metadata = serializers.DictField(
746 help_text="Metadata about this resource.",
747 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
753 class AffectedVirtualStorageSerializer(serializers.Serializer):
754 id = serializers.CharField(
755 help_text="Identifier of the storage instance.",
758 virtualStorageDescId = serializers.CharField(
759 help_text="Identifier of the related VirtualStorage descriptor in the VNFD.",
762 changeType = serializers.ChoiceField(
763 help_text="Signals the type of change.",
764 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
767 storageResource = ResourceHandleSerializer(
768 help_text="Reference to the VirtualStorage resource.",
772 metadata = serializers.DictField(
773 help_text="Metadata about this resource.",
774 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
780 class VnfInfoModificationsSerializer(serializers.Serializer):
781 vnfInstanceName = serializers.CharField(
782 help_text="If present, this attribute signals modifications of the vnfInstanceName attribute in VnfInstance.",
787 vnfInstanceDescription = serializers.CharField(
788 help_text="If present, this attribute signals modifications of the vnfInstanceDescription attribute in VnfInstance.",
793 vnfConfigurableProperties = serializers.DictField(
794 help_text="If present, this attribute signals modifications of the vnfConfigurableProperties attribute in VnfInstance.",
795 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
799 metadata = serializers.DictField(
800 help_text="If present, this attribute signals modifications of the metadata attribute in VnfInstance.",
801 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
805 extensions = serializers.DictField(
806 help_text="If present, this attribute signals modifications of the extensions attribute in VnfInstance.",
807 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
811 vimConnectionInfo = VimConnectionInfoSerializer(
812 help_text="If present, this attribute signals modifications of the vimConnectionInfo attribute in VnfInstance.",
816 vnfPkgId = serializers.CharField(
817 help_text="If present, this attribute signals modifications of the vnfPkgId attribute in VnfInstance.",
822 vnfdId = serializers.CharField(
823 help_text="If present, this attribute signals modifications of the vnfdId attribute in VnfInstance.",
828 vnfProvider = serializers.CharField(
829 help_text="If present, this attribute signals modifications of the vnfProvider attribute in VnfInstance.",
834 vnfProductName = serializers.CharField(
835 help_text="If present, this attribute signals modifications of the vnfProductName attribute in VnfInstance.",
840 vnfSoftwareVersion = serializers.CharField(
841 help_text="If present, this attribute signals modifications of the vnfSoftwareVersion attribute in VnfInstance.",
846 vnfdVersion = serializers.CharField(
847 help_text="If present, this attribute signals modifications of the vnfdVersion attribute in VnfInstance.",
854 class ExtLinkPortInfoSerializer(serializers.Serializer):
855 id = serializers.CharField(
856 help_text="Identifier of this link port as provided by the entity that has created the link port.",
859 resourceHandle = ResourceHandleSerializer(
860 help_text="Reference to the virtualised resource realizing this link port.",
863 cpInstanceId = serializers.CharField(
864 help_text="Identifier of the external CP of the VNF connected to this link port.",
871 class ExtVirtualLinkInfoSerializer(serializers.Serializer):
872 id = serializers.CharField(
873 help_text="Identifier of the external VL and the related external VL information instance.",
876 resourceHandle = ResourceHandleSerializer(
877 help_text="Reference to the resource realizing this VL.",
880 extLinkPorts = ExtLinkPortInfoSerializer(
881 help_text="Link ports of this VL.",
887 class ProblemDetailsSerializer(serializers.Serializer):
888 type = serializers.CharField(
889 help_text="A URI reference according to IETF RFC 3986 [5] that identifies the problem type.",
894 title = serializers.CharField(
895 help_text="A short, human-readable summary of the problem type.",
900 status = serializers.IntegerField(
901 help_text="The HTTP status code for this occurrence of the problem.",
904 detail = serializers.CharField(
905 help_text="A human-readable explanation specific to this occurrence of the problem.",
908 instance = serializers.CharField(
909 help_text="A URI reference that identifies the specific occurrence of the problem.",
916 class LccnLinksSerializer(serializers.Serializer):
917 vnfInstance = linkSerializer(
918 help_text="Link to the resource representing the VNF instance to which the notified change applies.",
921 subscription = linkSerializer(
922 help_text="Link to the related subscription.",
925 vnfLcmOpOcc = linkSerializer(
926 help_text="Link to the VNF lifecycle management operation occurrence that this notification is related to.",
932 class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
933 id = serializers.CharField(
934 help_text="Identifier of this notification.",
937 notificationType = serializers.ChoiceField(
938 help_text="Discriminator for the different notification types.",
940 'VnfLcmOperationOccurrenceNotification',
941 'VnfIdentifierCreationNotification',
942 'VnfIdentifierDeletionNotification'
946 subscriptionId = serializers.CharField(
947 help_text="Identifier of the subscription that this notification relates to.",
950 timeStamp = serializers.CharField(
951 help_text="Date-time of the generation of the notification.",
954 notificationStatus = serializers.ChoiceField(
955 help_text="Indicates whether this notification reports about the start of a lifecycle operation or the result of a lifecycle operation.",
956 choices=["START", "RESULT"],
959 operationState = serializers.ChoiceField(
960 help_text="The state of the VNF LCM operation occurrence.",
961 choices=["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"],
964 vnfInstanceId = serializers.CharField(
965 help_text="The identifier of the VNF instance affected.",
968 operation = serializers.ChoiceField(
969 help_text="The lifecycle management operation.",
970 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
973 isAutomaticInvocation = serializers.BooleanField(
974 help_text="Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM.",
977 vnfLcmOpOccId = serializers.CharField(
978 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the notification.",
981 affectedVnfcs = AffectedVnfcSerializer(
982 help_text="Information about VNFC instances that were affected during the lifecycle operation.",
986 affectedVirtualLinks = AffectedVirtualLinkSerializer(
987 help_text="Information about VL instances that were affected during the lifecycle operation.",
991 affectedVirtualStorages = AffectedVirtualStorageSerializer(
992 help_text="Information about virtualised storage instances that were affected during the lifecycle operation.",
996 changedInfo = VnfInfoModificationsSerializer(
997 help_text="Information about the changed VNF instance information, including changed VNF configurable properties.",
1001 changedExtConnectivity = ExtVirtualLinkInfoSerializer(
1002 help_text="Information about changed external connectivity.",
1006 error = ProblemDetailsSerializer(
1007 help_text="Details of the latest error, if one has occurred during executing the LCM operation",
1011 _links = LccnLinksSerializer(
1012 help_text="Links to resources related to this notification.",
1018 class VnfIdentifierCreationNotificationSerializer(serializers.Serializer):
1019 id = serializers.CharField(
1020 help_text="Identifier of this notification. \
1021 If a notification is sent multiple times due to multiple subscriptions, \
1022 the id attribute of all these notifications shall have the same value.",
1027 notificationType = serializers.ChoiceField(
1028 help_text="Discriminator for the different notification types.",
1030 'VnfLcmOperationOccurrenceNotification',
1031 'VnfIdentifierCreationNotification',
1032 'VnfIdentifierDeletionNotification'
1036 subscriptionId = serializers.CharField(
1037 help_text="Identifier of the subscription that this notification relates to.",
1042 timeStamp = serializers.DateTimeField(
1043 help_text="Date-time of the generation of the notification.",
1047 vnfInstanceId = serializers.CharField(
1048 help_text="The created VNF instance identifier.",
1053 _links = LccnLinksSerializer(
1054 help_text="Links to resources related to this notification.",
1060 class VnfIdentifierDeletionNotificationSerializer(serializers.Serializer):
1061 id = serializers.CharField(
1062 help_text="Identifier of this notification. \
1063 If a notification is sent multiple times due to multiple subscriptions, \
1064 the id attribute of all these notifications shall have the same value.",
1069 notificationType = serializers.ChoiceField(
1070 help_text="Discriminator for the different notification types.",
1072 'VnfLcmOperationOccurrenceNotification',
1073 'VnfIdentifierCreationNotification',
1074 'VnfIdentifierDeletionNotification'
1078 subscriptionId = serializers.CharField(
1079 help_text="Identifier of the subscription that this notification relates to.",
1084 timeStamp = serializers.DateTimeField(
1085 help_text="Date-time of the generation of the notification.",
1089 vnfInstanceId = serializers.CharField(
1090 help_text="The deleted VNF instance identifier.",
1095 _links = LccnLinksSerializer(
1096 help_text="Links to resources related to this notification.",