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
19 # class ResourceHandleSerializer(serializers.Serializer):
20 # vimConnectionId = serializers.CharField(
21 # help_text="Identifier of the VIM connection to manage the resource.",
26 # resourceProviderId = serializers.CharField(
27 # help_text="Identifier of the entity responsible for the management of the resource.",
32 # resourceId = serializers.CharField(
33 # help_text="Identifier of the resource in the scope of the VIM or the resource provider.",
36 # vimLevelResourceType = serializers.CharField(
37 # help_text="Type of the resource in the scope of the VIM or the resource provider.",
44 class ResourceDefinitionSerializer(serializers.Serializer):
45 id = serializers.CharField(
46 help_text="Identifier of this ResourceDefinition, unique at least within the scope of the GrantRequest.",
49 type = serializers.ChoiceField(
50 help_text="Type of the resource definition referenced.",
51 choices=["COMPUTE", "VL", "STORAGE", "LINKPORT"],
54 vduId = serializers.CharField(
55 help_text="Reference to the related VDU in the VNFD applicable to this resource.",
60 resourceTemplateId = serializers.CharField(
61 help_text="Reference to a resource template(such as VnfVirtualLinkDesc) in the VNFD.",
66 resource = ResourceHandleSerializer(
67 help_text="Resource information for an existing resource.",
73 class ConstraintResourceRefSerializer(serializers.Serializer):
74 idType = serializers.ChoiceField(
75 help_text="The type of the identifier.",
76 choices=["RES_MGMT", "GRANT"],
79 resourceId = serializers.CharField(
80 help_text="An actual resource-management-level identifier(idType=RES_MGMT), or an identifier that references a ResourceDefinition(idType=GRANT).",
83 vimConnectionId = serializers.CharField(
89 resourceProviderId = serializers.CharField(
90 help_text="Identifier of the resource provider. It shall only be present when idType = RES_MGMT.",
97 class PlacementConstraintSerializer(serializers.Serializer):
98 affinityOrAntiAffinity = serializers.ChoiceField(
99 help_text="The type of the constraint.",
100 choices=["AFFINITY", "ANTI_AFFINITY"],
103 scope = serializers.ChoiceField(
104 help_text="The scope of the placement constraint indicating the category of the place where the constraint applies.",
105 choices=["NFVI_POP", "ZONE", "ZONE_GROUP", "NFVI_NODE"],
108 resource = ConstraintResourceRefSerializer(
109 help_text="References to resources in the constraint rule.",
115 class VimConstraintSerializer(serializers.Serializer):
116 sameResourceGroup = serializers.BooleanField(
117 help_text="Set to true when the constraint applies not only to the same VIM connection, but also to the same infrastructure resource group.",
120 resource = ConstraintResourceRefSerializer(
121 help_text="References to resources in the constraint rule.",
127 # class LinkSerializer(serializers.Serializer):
128 # href = serializers.CharField(
129 # help_text="URI of the referenced resource.",
134 class GrantRequestLinksSerializer(serializers.Serializer):
135 vnfLcmOpOcc = linkSerializer(
136 help_text="Related VNF lifecycle management operation occurrence.",
139 vnfInstance = linkSerializer(
140 help_text="Related VNF instance.",
145 class GrantRequestSerializer(serializers.Serializer):
146 vnfInstanceId = serializers.CharField(
147 help_text="Identifier of the VNF instance which this grant request is related to.",
150 vnfLcmOpOccId = serializers.CharField(
151 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the GrantRequest.",
152 required=False, # TODO required
156 vnfdId = serializers.CharField(
157 help_text="Identifier of the VNFD that defines the VNF for which the LCM operation is to be granted.",
158 required=False, # TODO required
162 flavourId = serializers.CharField(
163 help_text="Identifier of the VNF deployment flavour of the VNFD that defines the VNF for which the LCM operation is to be granted.",
168 operation = serializers.ChoiceField(
169 help_text="The lifecycle management operation for which granting is requested.",
170 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
173 isAutomaticInvocation = serializers.BooleanField(
174 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.",
177 instantiationLevelId = serializers.CharField(
178 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.",
183 addResources = ResourceDefinitionSerializer(
184 help_text="List of resource definitions in the VNFD for resources to be added by the LCM operation.",
188 tempResources = ResourceDefinitionSerializer(
189 help_text="List of resource definitions in the VNFD for resources to be temporarily instantiated during the runtime of the LCM operation.",
193 removeResources = ResourceDefinitionSerializer(
194 help_text="Provides the definitions of resources to be removed by the LCM operation.",
198 updateResources = ResourceDefinitionSerializer(
199 help_text="Provides the definitions of resources to be modified by the LCM operation.",
203 placementConstraints = PlacementConstraintSerializer(
204 help_text="Placement constraints that the VNFM may send to the NFVO in order to influence the resource placement decision.",
208 vimConstraints = VimConstraintSerializer(
209 help_text="Used by the VNFM to require that multiple resources are managed through the same VIM connection.",
213 additionalParams = serializers.DictField(
214 help_text="Additional parameters passed by the VNFM.",
215 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
219 _links = GrantRequestLinksSerializer(
220 help_text="Links to resources related to this request.",
221 required=False # TODO required
225 class VimConnectionInfoSerializer(serializers.Serializer):
226 id = serializers.CharField(
227 help_text="The identifier of the VIM Connection. This identifier is managed by the NFVO.",
230 vimId = serializers.CharField(
231 help_text="The identifier of the VIM instance. This identifier is managed by the NFVO.",
236 vimType = serializers.CharField(
237 help_text="Discriminator for the different types of the VIM information.",
242 interfaceInfo = serializers.DictField(
243 help_text="Information about the interface or interfaces to the VIM.",
244 child=serializers.CharField(help_text="Interface Info", allow_blank=True),
248 accessInfo = serializers.DictField(
249 help_text="Authentication credentials for accessing the VIM.",
250 child=serializers.CharField(help_text="Access Info", allow_blank=True),
254 extra = serializers.DictField(
255 help_text="VIM type specific additional information.",
256 child=serializers.CharField(help_text="Extra", allow_blank=True),
262 class ZoneInfoSerializer(serializers.Serializer):
263 id = serializers.CharField(
264 help_text="The identifier of this ZoneInfo instance, for the purpose of referencing it from other structures in the Grant structure.",
267 zoneId = serializers.CharField(
268 help_text="The identifier of the resource zone, as managed by the resource management layer(typically, the VIM).",
273 vimConnectionId = serializers.CharField(
274 help_text="Identifier of the connection to the VIM that manages the resource zone.",
279 resourceProviderId = serializers.CharField(
280 help_text="Identifies the entity responsible for the management the resource zone.",
287 class ZoneGroupInfoSerializer(serializers.Serializer):
288 zoneId = serializers.ListSerializer(
289 help_text="References of identifiers of ZoneInfo structures.",
290 child=serializers.CharField(help_text="IdentifierLocal", allow_blank=True),
296 class GrantInfoSerializer(serializers.Serializer):
297 resourceDefinitionId = serializers.CharField(
298 help_text="Identifier of the related ResourceDefinition from the related GrantRequest.",
301 reservationId = serializers.CharField(
302 help_text="The reservation identifier applicable to the VNFC/VirtualLink/VirtualStorage.",
307 vimConnectionId = serializers.CharField(
308 help_text="Identifier of the VIM connection to be used to manage this resource.",
313 resourceProviderId = serializers.CharField(
314 help_text="Identifies the entity responsible for the management of the virtualised resource.",
319 zoneId = serializers.CharField(
320 help_text="Reference to the identifier of the ZoneInfo in the Grant.",
325 resourceGroupId = serializers.CharField(
326 help_text="Identifier of the infrastructure resource group.",
333 class VimComputeResourceFlavourSerializer(serializers.Serializer):
334 vimConnectionId = serializers.CharField(
335 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
340 resourceProviderId = serializers.CharField(
341 help_text="Identifies the entity responsible for the management of the virtualised resource.",
346 vnfdVirtualComputeDescId = serializers.CharField(
347 help_text="Identifier which references the virtual compute descriptor in the VNFD that maps to this flavour.",
352 vimFlavourId = serializers.CharField(
353 help_text="Identifier of the compute resource flavour in the resource management layer (i.e. VIM).",
360 class VimSoftwareImageSerializer(serializers.Serializer):
361 vimConnectionId = serializers.CharField(
362 help_text="Identifier of the VIM connection to access the flavour referenced in this structure.",
367 resourceProviderId = serializers.CharField(
368 help_text="Identifies the entity responsible for the management of the virtualised resource.",
373 vnfdSoftwareImageId = serializers.CharField(
374 help_text="Identifier which references the software image descriptor in the VNFD.",
379 vimSoftwareImageId = serializers.CharField(
380 help_text="Identifier of the software image in the resource management layer (i.e. VIM).",
387 class VimAssetsSerializer(serializers.Serializer):
388 computeResourceFlavours = VimComputeResourceFlavourSerializer(
389 help_text="Mappings between virtual compute descriptors defined in the VNFD and compute resource flavours managed in the VIM.",
393 softwareImages = VimSoftwareImageSerializer(
394 help_text="Mappings between software images defined in the VNFD and software images managed in the VIM.",
400 class AddressRangeSerializer(serializers.Serializer):
401 minAddress = serializers.CharField(
402 help_text="Lowest IP address belonging to the range.",
405 maxAddress = serializers.CharField(
406 help_text="Highest IP address belonging to the range.",
411 class IpAddresseSerializer(serializers.Serializer):
412 type = serializers.ChoiceField(
413 help_text="The type of the IP addresses.",
414 choices=["IPV4", "IPV6"],
417 fixedAddresses = serializers.ListSerializer(
418 help_text="Fixed addresses to assign.",
419 child=serializers.CharField(help_text="IpAddress"),
423 numDynamicAddresses = serializers.IntegerField(
424 help_text="Number of dynamic addresses to assign.",
427 addressRange = AddressRangeSerializer(
428 help_text="An IP address range to be used, e.g. in case of egress connections.",
432 subnetId = serializers.CharField(
433 help_text="Subnet defined by the identifier of the subnet resource in the VIM.",
440 class IpOverEthernetAddressSerializer(serializers.Serializer):
441 macAddress = serializers.CharField(
442 help_text="MAC address.",
447 ipAddresses = IpAddresseSerializer(
448 help_text="List of IP addresses to assign to the CP instance.",
454 class CpProtocolDataConfigSerializer(serializers.Serializer):
455 layerProtocol = serializers.ChoiceField(
456 help_text="Identifier of layer(s) and protocol(s).",
457 choices=["IP_OVER_ETHERNET"],
460 ipOverEthernet = IpOverEthernetAddressSerializer(
461 help_text="Network address data for IP over Ethernet to assign to the extCP instance.",
467 class VnfExtCpConfigDataSerializer(serializers.Serializer):
468 cpInstanceId = serializers.CharField(
469 help_text="Identifier of the external CP instance to which this set of configuration parameters is requested to be applied.",
474 linkPortId = serializers.CharField(
475 help_text="Identifier of a pre-configured link port to which the external CP will be associated.",
480 cpProtocolData = CpProtocolDataConfigSerializer(
481 help_text="Parameters for configuring the network protocols on the link port that connects the CP to a VL.",
487 class VnfExtCpSerializer(serializers.Serializer):
488 cpdId = serializers.CharField(
489 help_text="The identifier of the CPD in the VNFD.",
492 cpConfig = VnfExtCpConfigDataSerializer(
493 help_text="List of instance data that need to be configured on the CP instances created from the respective CPD.",
499 class ExtLinkPortSerializer(serializers.Serializer):
500 id = serializers.CharField(
501 help_text="Identifier of this link port as provided by the entity that has created the link port.",
504 resourceHandle = serializers.CharField(
505 help_text="Reference to the virtualised resource realizing this link port.",
510 class ExtVirtualLinkSerializer(serializers.Serializer):
511 id = serializers.CharField(
512 help_text="The identifier of the external VL instance.",
515 vimConnectionId = serializers.CharField(
516 help_text="Identifier of the VIM connection to manage this resource.",
521 resourceProviderId = serializers.CharField(
522 help_text="Identifies the entity responsible for the management of this resource.",
527 resourceId = serializers.CharField(
528 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
531 extCps = VnfExtCpSerializer(
532 help_text="External CPs of the VNF to be connected to this external VL.",
536 extLinkPorts = ExtLinkPortSerializer(
537 help_text="Externally provided link ports to be used to connect external connection points to this external VL.",
543 class ExtManagedVirtualLinkSerializer(serializers.Serializer):
544 id = serializers.CharField(
545 help_text="The identifier of the externally-managed internal VL instance.",
548 virtualLinkDescId = serializers.CharField(
549 help_text="The identifier of the VLD in the VNFD for this VL.",
552 vimConnectionId = serializers.CharField(
553 help_text="Identifier of the VIM connection to manage this resource.",
558 resourceProviderId = serializers.CharField(
559 help_text="Identifies the entity responsible for the management of this resource.",
564 resourceId = serializers.CharField(
565 help_text="The identifier of the resource in the scope of the VIM or the resource provider.",
570 class GrantLinksSerializer(serializers.Serializer):
571 self = linkSerializer(
572 help_text="URI of this resource.",
575 vnfLcmOpOcc = linkSerializer(
576 help_text="Related VNF lifecycle management operation occurrence.",
579 vnfInstance = linkSerializer(
580 help_text="Related VNF instance.",
585 class GrantSerializer(serializers.Serializer):
586 id = serializers.CharField(
587 help_text="Identifier of the grant.",
590 vnfInstanceId = serializers.CharField(
591 help_text="Identifier of the related VNF instance.",
594 vnfLcmOpOccId = serializers.CharField(
595 help_text="Identifier of the related VNF lifecycle management operation occurrence.",
596 required=False, # TODO required
600 vimConnections = VimConnectionInfoSerializer(
601 help_text="Provides information regarding VIM connections that are approved to be used by the VNFM to allocate resources.",
605 zones = ZoneInfoSerializer(
606 help_text="Identifies resource zones where the resources are approved to be allocated by the VNFM.",
610 zoneGroups = ZoneGroupInfoSerializer(
611 help_text="Information about groups of resource zones.",
615 computeReservationId = serializers.CharField(
616 help_text="Information that identifies a reservation applicable to the compute resource requirements.",
621 networkReservationId = serializers.CharField(
622 help_text="Information that identifies a reservation applicable to the network resource requirements.",
627 storageReservationId = serializers.CharField(
628 help_text="Information that identifies a reservation applicable to the storage resource requirements.",
633 addResources = GrantInfoSerializer(
634 help_text="List of resources that are approved to be added.",
638 tempResources = GrantInfoSerializer(
639 help_text="List of resources that are approved to be temporarily instantiated during the runtime of the lifecycle operation.",
643 removeResources = GrantInfoSerializer(
644 help_text="List of resources that are approved to be removed.",
648 updateResources = GrantInfoSerializer(
649 help_text="List of resources that are approved to be modified.",
653 vimAssets = VimAssetsSerializer(
654 help_text="Information about assets for the VNF that are managed by the NFVO in the VIM.",
658 extVirtualLinks = ExtVirtualLinkSerializer(
659 help_text="Information about external VLs to connect the VNF to.",
663 extManagedVirtualLinks = ExtManagedVirtualLinkSerializer(
664 help_text="Information about internal VLs that are managed by other entities than the VNFM.",
668 additionalParams = serializers.DictField(
669 help_text="Additional parameters passed by the NFVO, \
670 specific to the VNF and the LCM operation.",
671 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
675 _links = GrantLinksSerializer(
676 help_text="Links to resources related to this resource.",
681 class AffectedVnfcSerializer(serializers.Serializer):
682 id = serializers.CharField(
683 help_text="Identifier of the Vnfc instance.",
686 vduId = serializers.CharField(
687 help_text="Identifier of the related VDU in the VNFD.",
690 changeType = serializers.ChoiceField(
691 help_text="Signals the type of change.",
692 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
695 computeResource = ResourceHandleSerializer(
696 help_text="Reference to the VirtualCompute resource.",
699 metadata = serializers.DictField(
700 help_text="Metadata about this resource.",
701 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
705 affectedVnfcCpIds = serializers.ListSerializer(
706 help_text="Identifiers of CP(s) of the VNFC instance that were affected by the change.",
707 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
711 addedStorageResourceIds = serializers.ListSerializer(
712 help_text="References to VirtualStorage resources that have been added.",
713 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
717 removedStorageResourceIds = serializers.ListSerializer(
718 help_text="References to VirtualStorage resources that have been removed.",
719 child=serializers.CharField(help_text="Identifier In Vnf", allow_blank=True),
725 class AffectedVirtualLinkSerializer(serializers.Serializer):
726 id = serializers.CharField(
727 help_text="Identifier of the virtual link instance.",
730 virtualLinkDescId = serializers.CharField(
731 help_text="Identifier of the related VLD in the VNFD.",
734 changeType = serializers.ChoiceField(
735 help_text="Signals the type of change.",
736 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY", "LINK_PORT_ADDED", "LINK_PORT_REMOVED"],
739 networkResource = ResourceHandleSerializer(
740 help_text="Reference to the VirtualNetwork resource.",
744 metadata = serializers.DictField(
745 help_text="Metadata about this resource.",
746 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
752 class AffectedVirtualStorageSerializer(serializers.Serializer):
753 id = serializers.CharField(
754 help_text="Identifier of the storage instance.",
757 virtualStorageDescId = serializers.CharField(
758 help_text="Identifier of the related VirtualStorage descriptor in the VNFD.",
761 changeType = serializers.ChoiceField(
762 help_text="Signals the type of change.",
763 choices=["ADDED", "REMOVED", "MODIFIED", "TEMPORARY"],
766 storageResource = ResourceHandleSerializer(
767 help_text="Reference to the VirtualStorage resource.",
771 metadata = serializers.DictField(
772 help_text="Metadata about this resource.",
773 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
779 class VnfInfoModificationsSerializer(serializers.Serializer):
780 vnfInstanceName = serializers.CharField(
781 help_text="If present, this attribute signals modifications of the vnfInstanceName attribute in VnfInstance.",
786 vnfInstanceDescription = serializers.CharField(
787 help_text="If present, this attribute signals modifications of the vnfInstanceDescription attribute in VnfInstance.",
792 vnfConfigurableProperties = serializers.DictField(
793 help_text="If present, this attribute signals modifications of the vnfConfigurableProperties attribute in VnfInstance.",
794 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
798 metadata = serializers.DictField(
799 help_text="If present, this attribute signals modifications of the metadata attribute in VnfInstance.",
800 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
804 extensions = serializers.DictField(
805 help_text="If present, this attribute signals modifications of the extensions attribute in VnfInstance.",
806 child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
810 vimConnectionInfo = VimConnectionInfoSerializer(
811 help_text="If present, this attribute signals modifications of the vimConnectionInfo attribute in VnfInstance.",
815 vnfPkgId = serializers.CharField(
816 help_text="If present, this attribute signals modifications of the vnfPkgId attribute in VnfInstance.",
821 vnfdId = serializers.CharField(
822 help_text="If present, this attribute signals modifications of the vnfdId attribute in VnfInstance.",
827 vnfProvider = serializers.CharField(
828 help_text="If present, this attribute signals modifications of the vnfProvider attribute in VnfInstance.",
833 vnfProductName = serializers.CharField(
834 help_text="If present, this attribute signals modifications of the vnfProductName attribute in VnfInstance.",
839 vnfSoftwareVersion = serializers.CharField(
840 help_text="If present, this attribute signals modifications of the vnfSoftwareVersion attribute in VnfInstance.",
845 vnfdVersion = serializers.CharField(
846 help_text="If present, this attribute signals modifications of the vnfdVersion attribute in VnfInstance.",
853 class ExtLinkPortInfoSerializer(serializers.Serializer):
854 id = serializers.CharField(
855 help_text="Identifier of this link port as provided by the entity that has created the link port.",
858 resourceHandle = ResourceHandleSerializer(
859 help_text="Reference to the virtualised resource realizing this link port.",
862 cpInstanceId = serializers.CharField(
863 help_text="Identifier of the external CP of the VNF connected to this link port.",
870 class ExtVirtualLinkInfoSerializer(serializers.Serializer):
871 id = serializers.CharField(
872 help_text="Identifier of the external VL and the related external VL information instance.",
875 resourceHandle = ResourceHandleSerializer(
876 help_text="Reference to the resource realizing this VL.",
879 extLinkPorts = ExtLinkPortInfoSerializer(
880 help_text="Link ports of this VL.",
886 class ProblemDetailsSerializer(serializers.Serializer):
887 type = serializers.CharField(
888 help_text="A URI reference according to IETF RFC 3986 [5] that identifies the problem type.",
893 title = serializers.CharField(
894 help_text="A short, human-readable summary of the problem type.",
899 status = serializers.IntegerField(
900 help_text="The HTTP status code for this occurrence of the problem.",
903 detail = serializers.CharField(
904 help_text="A human-readable explanation specific to this occurrence of the problem.",
907 instance = serializers.CharField(
908 help_text="A URI reference that identifies the specific occurrence of the problem.",
915 class LccnLinksSerializer(serializers.Serializer):
916 vnfInstance = linkSerializer(
917 help_text="Link to the resource representing the VNF instance to which the notified change applies.",
920 subscription = linkSerializer(
921 help_text="Link to the related subscription.",
924 vnfLcmOpOcc = linkSerializer(
925 help_text="Link to the VNF lifecycle management operation occurrence that this notification is related to.",
931 class VnfLcmOperationOccurrenceNotificationSerializer(serializers.Serializer):
932 id = serializers.CharField(
933 help_text="Identifier of this notification.",
936 notificationType = serializers.ChoiceField(
937 help_text="Discriminator for the different notification types.",
939 'VnfLcmOperationOccurrenceNotification',
940 'VnfIdentifierCreationNotification',
941 'VnfIdentifierDeletionNotification'
945 subscriptionId = serializers.CharField(
946 help_text="Identifier of the subscription that this notification relates to.",
949 timeStamp = serializers.CharField(
950 help_text="Date-time of the generation of the notification.",
953 notificationStatus = serializers.ChoiceField(
954 help_text="Indicates whether this notification reports about the start of a lifecycle operation or the result of a lifecycle operation.",
955 choices=["START", "RESULT"],
958 operationState = serializers.ChoiceField(
959 help_text="The state of the VNF LCM operation occurrence.",
960 choices=["STARTING", "PROCESSING", "COMPLETED", "FAILED_TEMP", "FAILED", "ROLLING_BACK", "ROLLED_BACK"],
963 vnfInstanceId = serializers.CharField(
964 help_text="The identifier of the VNF instance affected.",
967 operation = serializers.ChoiceField(
968 help_text="The lifecycle management operation.",
969 choices=["INSTANTIATE", "SCALE", "SCALE_TO_LEVEL", "CHANGE_FLAVOUR", "TERMINATE", "HEAL", "OPERATE", "CHANGE_EXT_CONN", "MODIFY_INFO"],
972 isAutomaticInvocation = serializers.BooleanField(
973 help_text="Set to true if this VNF LCM operation occurrence has been triggered by an automated procedure inside the VNFM.",
976 vnfLcmOpOccId = serializers.CharField(
977 help_text="The identifier of the VNF lifecycle management operation occurrence associated to the notification.",
980 affectedVnfcs = AffectedVnfcSerializer(
981 help_text="Information about VNFC instances that were affected during the lifecycle operation.",
985 affectedVirtualLinks = AffectedVirtualLinkSerializer(
986 help_text="Information about VL instances that were affected during the lifecycle operation.",
990 affectedVirtualStorages = AffectedVirtualStorageSerializer(
991 help_text="Information about virtualised storage instances that were affected during the lifecycle operation.",
995 changedInfo = VnfInfoModificationsSerializer(
996 help_text="Information about the changed VNF instance information, including changed VNF configurable properties.",
1000 changedExtConnectivity = ExtVirtualLinkInfoSerializer(
1001 help_text="Information about changed external connectivity.",
1005 error = ProblemDetailsSerializer(
1006 help_text="Details of the latest error, if one has occurred during executing the LCM operation",
1010 _links = LccnLinksSerializer(
1011 help_text="Links to resources related to this notification.",
1017 class VnfIdentifierCreationNotificationSerializer(serializers.Serializer):
1018 id = serializers.CharField(
1019 help_text="Identifier of this notification. \
1020 If a notification is sent multiple times due to multiple subscriptions, \
1021 the id attribute of all these notifications shall have the same value.",
1026 notificationType = serializers.ChoiceField(
1027 help_text="Discriminator for the different notification types.",
1029 'VnfLcmOperationOccurrenceNotification',
1030 'VnfIdentifierCreationNotification',
1031 'VnfIdentifierDeletionNotification'
1035 subscriptionId = serializers.CharField(
1036 help_text="Identifier of the subscription that this notification relates to.",
1041 timeStamp = serializers.DateTimeField(
1042 help_text="Date-time of the generation of the notification.",
1046 vnfInstanceId = serializers.CharField(
1047 help_text="The created VNF instance identifier.",
1052 _links = LccnLinksSerializer(
1053 help_text="Links to resources related to this notification.",
1059 class VnfIdentifierDeletionNotificationSerializer(serializers.Serializer):
1060 id = serializers.CharField(
1061 help_text="Identifier of this notification. \
1062 If a notification is sent multiple times due to multiple subscriptions, \
1063 the id attribute of all these notifications shall have the same value.",
1068 notificationType = serializers.ChoiceField(
1069 help_text="Discriminator for the different notification types.",
1071 'VnfLcmOperationOccurrenceNotification',
1072 'VnfIdentifierCreationNotification',
1073 'VnfIdentifierDeletionNotification'
1077 subscriptionId = serializers.CharField(
1078 help_text="Identifier of the subscription that this notification relates to.",
1083 timeStamp = serializers.DateTimeField(
1084 help_text="Date-time of the generation of the notification.",
1088 vnfInstanceId = serializers.CharField(
1089 help_text="The deleted VNF instance identifier.",
1094 _links = LccnLinksSerializer(
1095 help_text="Links to resources related to this notification.",