Align grant request with SOL003.
[vfc/nfvo/driver/vnfm/gvnfm.git] / gvnfmadapter / driver / interfaces / serializers.py
1 # Copyright 2018 ZTE Corporation.
2 #
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
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
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.
14
15 from rest_framework import serializers
16
17 LCM_OPERATION_TYPES = [
18     "INSTANTIATE",
19     "SCALE",
20     "SCALE_TO_LEVEL",
21     "CHANGE_FLAVOUR",
22     "TERMINATE",
23     "HEAL",
24     "OPERATE",
25     "CHANGE_EXT_CONN",
26     "MODIFY_INFO"
27 ]
28
29
30 LCM_OPERATION_STATE_TYPES = [
31     "STARTING",
32     "PROCESSING",
33     "COMPLETED",
34     "FAILED_TEMP",
35     "FAILED",
36     "ROLLING_BACK",
37     "ROLLED_BACK"
38 ]
39
40
41 VNFCS_CHANGE_TYPES = [
42     "ADDED",
43     "REMOVED",
44     "MODIFIED",
45     "TEMPORARY"
46 ]
47
48
49 STORAGES_CHANGE_TYPES = [
50     "ADDED",
51     "REMOVED",
52     "MODIFIED",
53     "TEMPORARY"
54 ]
55
56
57 VLS_CHANGE_TYPES = [
58     "ADDED",
59     "REMOVED",
60     "MODIFIED",
61     "TEMPORARY",
62     "LINK_PORT_ADDED",
63     "LINK_PORT_REMOVED"
64 ]
65
66
67 class ResourceHandleSerializer(serializers.Serializer):
68     vimConnectionId = serializers.CharField(
69         help_text="Identifier of the VIM connection to manage the resource.",
70         required=False,
71         allow_null=True,
72         allow_blank=True
73     )
74     resourceProviderId = serializers.CharField(
75         help_text="Identifier of the entity responsible for the management of the resource.",
76         required=False,
77         allow_null=True,
78         allow_blank=True
79     )
80     resourceId = serializers.CharField(
81         help_text="Identifier of the resource in the scope of the VIM or the resource provider.",
82         required=True
83     )
84     vimLevelResourceType = serializers.CharField(
85         help_text="Type of the resource in the scope of the VIM or the resource provider.",
86         required=False,
87         allow_null=True,
88         allow_blank=True
89     )
90
91
92 class ResourceDefinitionSerializer(serializers.Serializer):
93     id = serializers.CharField(
94         help_text="Identifier of this ResourceDefinition, unique at least within the scope of the GrantRequest.",
95         required=True
96     )
97     type = serializers.ChoiceField(
98         help_text="Type of the resource definition referenced.",
99         choices=["COMPUTE", "VL", "STORAGE", "LINKPORT"],
100         required=True
101     )
102     vduId = serializers.CharField(
103         help_text="Reference to the related VDU in the VNFD applicable to this resource.",
104         required=False,
105         allow_null=True,
106         allow_blank=True
107     )
108     resourceTemplateId = serializers.CharField(
109         help_text="Reference to a resource template(such as VnfVirtualLinkDesc) in the VNFD.",
110         required=False,
111         allow_null=True,
112         allow_blank=True
113     )
114     resource = ResourceHandleSerializer(
115         help_text="Resource information for an existing resource.",
116         required=False,
117         allow_null=True
118     )
119
120
121 class ConstraintResourceRefSerializer(serializers.Serializer):
122     idType = serializers.ChoiceField(
123         help_text="The type of the identifier.",
124         choices=["RES_MGMT", "GRANT"],
125         required=True
126     )
127     resourceId = serializers.CharField(
128         help_text="An actual resource-management-level identifier(idType=RES_MGMT), or an identifier that references a ResourceDefinition(idType=GRANT).",
129         required=True
130     )
131     vimConnectionId = serializers.CharField(
132         help_text="",
133         required=False,
134         allow_null=True,
135         allow_blank=True
136     )
137     resourceProviderId = serializers.CharField(
138         help_text="Identifier of the resource provider. It shall only be present when idType = RES_MGMT.",
139         required=False,
140         allow_null=True,
141         allow_blank=True
142     )
143
144
145 class AdditionalParams(serializers.Serializer):
146     sdncontroller = serializers.CharField(help_text="sdncontroller", required=False)
147     NatIpRange = serializers.CharField(help_text="NatIpRange", required=False)
148     m6000_mng_ip = serializers.CharField(help_text="m6000_mng_ip", required=False)
149     externalPluginManageNetworkName = serializers.CharField(help_text="externalPluginManageNetworkName", required=False)
150     location = serializers.CharField(help_text="location", required=False)
151     externalManageNetworkName = serializers.CharField(help_text="externalManageNetworkName", required=False)
152     sfc_data_network = serializers.CharField(help_text="sfc_data_network", required=False)
153     externalDataNetworkName = serializers.CharField(help_text="externalDataNetworkName", required=False)
154     inputs = serializers.DictField(
155         help_text="inputs",
156         child=serializers.CharField(help_text="but i needed to test these 2 fields somehow", allow_blank=True),
157         required=False,
158         allow_null=True
159     )
160
161
162 class VnfInstReqParamsSerializer(serializers.Serializer):
163     vnfDescriptorId = serializers.CharField(
164         help_text="Identifier that identifies the VNFD which defines the VNF instance to be created.",
165         max_length=255,
166         required=True,
167         allow_null=True
168     )
169     vnfInstanceName = serializers.CharField(
170         help_text="Human-readable name of the VNF instance to be created.",
171         max_length=255,
172         required=True,
173         allow_null=False
174     )
175     vnfInstanceDescription = serializers.CharField(
176         help_text="Human-readable description of the VNF instance to be created.",
177         max_length=255,
178         required=False,
179         allow_null=True
180     )
181     additionalParam = AdditionalParams(
182         help_text="Additional input parameters for the instantiation process,"
183                   " specific to the VNF being instantiated.",
184         required=True
185     )
186
187
188 class ResponseSerializer(serializers.Serializer):
189     vnfInstanceId = serializers.CharField(help_text="VNF instance identifier.", required=True)
190     jobId = serializers.CharField(help_text="Job ID.", required=True)
191
192
193 class VnfTermReqSerializer(serializers.Serializer):
194     vnfInstanceId = serializers.CharField(
195         help_text="VNF instance identifier.",
196         max_length=255,
197         required=True,
198         allow_null=True
199     )
200
201
202 class VnfInfo(serializers.Serializer):
203     vnfInstanceId = serializers.CharField(help_text="VNF instance identifier.", required=True)
204     vnfStatus = serializers.CharField(help_text="The instantiation state of the VNF.", required=True)
205     version = serializers.CharField(help_text="Version of the VNF.", required=True)
206
207
208 class VnfQueryRespSerializer(serializers.Serializer):
209     vnfInfo = VnfInfo(
210         help_text="The information items about the selected VNF instance(s) that are returned.",
211         required=True
212     )
213
214
215 class ResponseDescriptor(serializers.Serializer):
216     status = serializers.CharField(help_text="status.", required=True)
217     responsehistorylist = serializers.CharField(help_text="History response messages.", required=True)
218     responseid = serializers.IntegerField(help_text="Response identifier.", required=True)
219     errorcode = serializers.CharField(help_text="Errorcode.", required=True)
220     progress = serializers.IntegerField(help_text="Progress.", required=True)
221     statusdescription = serializers.CharField(help_text="Status description.", required=True)
222
223
224 class OperationStatusInfo(serializers.Serializer):
225     responsedescriptor = ResponseDescriptor(help_text="Response descriptor.", required=True)
226     jobid = serializers.CharField(help_text="Job ID.", required=True)
227
228
229 class VnfOperRespSerializer(serializers.Serializer):
230     operationStatusInfo = OperationStatusInfo(
231         help_text="Operation Status.",
232         required=True
233     )
234
235
236 class VnfGrantReqSerializer(serializers.Serializer):
237     vnfmid = serializers.CharField(help_text="VNFM identifier.", required=True)
238     nfvoid = serializers.CharField(help_text="NFVO identifier.", required=True)
239     vimid = serializers.CharField(help_text="VIM identifier.", required=True)
240     exvimidlist = serializers.CharField(help_text="Extend VIM identifier list.", required=True)
241     tenant = serializers.CharField(help_text="Tenant name.", required=True)
242     vnfistanceid = serializers.CharField(help_text="VNF instance identifier.", required=True)
243     operationright = serializers.CharField(help_text="Operation right.", required=True)
244     vmlist = serializers.CharField(help_text="VM list.", required=True)
245
246
247 class VnfGrantRespSerializer(serializers.Serializer):
248     vimid = serializers.CharField(help_text="VIM identifier.", required=True)
249     tenant = serializers.CharField(help_text="Tenant name.", required=True)
250
251
252 class VnfNotifyReqSerializer(serializers.Serializer):
253     nfvoid = serializers.CharField(help_text="NFVO identifier.", required=True)
254     vnfmid = serializers.CharField(help_text="VNFM identifier.", required=True)
255     vimid = serializers.CharField(help_text="VIM identifier.", required=True)
256     timestamp = serializers.CharField(help_text="Timestamp.", required=True)
257     vnfistanceid = serializers.CharField(help_text="VNF instance identifier.", required=True)
258     eventtype = serializers.CharField(help_text="Event type.", required=True)
259     vmlist = serializers.CharField(help_text="VM list.", required=True)
260
261
262 class LinkSerializer(serializers.Serializer):
263     href = serializers.CharField(
264         help_text="URI of the referenced resource.",
265         required=True,
266         allow_null=False,
267         allow_blank=False)
268
269
270 class VimConnectionInfoSerializer(serializers.Serializer):
271     id = serializers.CharField(
272         help_text="The identifier of the VIM Connection. This identifier is managed by the NFVO.",
273         max_length=255,
274         required=True,
275         allow_null=False,
276         allow_blank=False)
277     vimId = serializers.CharField(
278         help_text="The identifier of the VIM instance. This identifier is managed by the NFVO.",
279         max_length=255,
280         required=False,
281         allow_null=True,
282         allow_blank=True)
283     vimType = serializers.CharField(
284         help_text="Discriminator for the different types of the VIM information.",
285         max_length=255,
286         required=True,
287         allow_null=False,
288         allow_blank=False)
289     interfaceInfo = serializers.DictField(
290         help_text="Information about the interface or interfaces to the VIM",
291         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
292         required=False,
293         allow_null=True)
294     accessInfo = serializers.DictField(
295         help_text="Authentication credentials for accessing the VIM, and other access-related information",
296         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
297         required=False,
298         allow_null=True)
299     extra = serializers.DictField(
300         help_text="VIM type specific additional information. \
301         The applicable structure, and whether or not this attribute is available, is dependent on the content of vimType.",
302         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
303         required=False,
304         allow_null=True)
305
306
307 class ResourceHandleSerializer(serializers.Serializer):
308     vimConnectionId = serializers.CharField(
309         help_text="Identifier of the VIM connection to manage the resource.",
310         max_length=255,
311         required=False,
312         allow_null=True,
313         allow_blank=True)
314     resourceProviderId = serializers.CharField(
315         help_text="Identifier of the entity responsible for the management of the resource.",
316         max_length=255,
317         required=False,
318         allow_null=True,
319         allow_blank=True)
320     resourceId = serializers.CharField(
321         help_text="Identifier of the resource in the scope of the VIM or the resource provider.",
322         required=True,
323         max_length=255,
324         allow_null=False,
325         allow_blank=False)
326     vimLevelResourceType = serializers.CharField(
327         help_text="String, type of the resource in the scope of the VIM or the resource provider.",
328         max_length=255,
329         required=False,
330         allow_null=True,
331         allow_blank=True)
332
333
334 class ProblemDetailsSerializer(serializers.Serializer):
335     type = serializers.CharField(help_text="Type", required=False, allow_null=True)
336     title = serializers.CharField(help_text="Title", required=False, allow_null=True)
337     status = serializers.IntegerField(help_text="Status", required=True)
338     detail = serializers.CharField(help_text="Detail", required=True, allow_null=True)
339     instance = serializers.CharField(help_text="Instance", required=False, allow_null=True)
340     additional_details = serializers.ListField(
341         help_text="Any number of additional attributes, as defined in a " +
342         "specification or by an implementation.",
343         required=False,
344         allow_null=True)
345
346
347 class ExtlinkPortInfoSerializer(serializers.Serializer):
348     id = serializers.CharField(
349         help_text="Identifier of this link port as provided by the entity that has created the link port.",
350         max_length=255,
351         required=True,
352         allow_blank=False,
353         allow_null=False)
354     resourceHandle = ResourceHandleSerializer(
355         help_text="Reference to the virtualised resource realizing this link port.",
356         required=True,
357         allow_null=False)
358     id = serializers.CharField(
359         help_text="Identifier of the external CP of the VNF connected to this link port. \
360         There shall be at most one link port associated with any external connection point instance.",
361         max_length=255,
362         required=False,
363         allow_blank=True,
364         allow_null=True)
365
366
367 class ExtVirtualLinkInfoSerializer(serializers.Serializer):
368     id = serializers.CharField(
369         help_text="Identifier of the external VL and the related external VL information instance. \
370         The identifier is assigned by the NFV-MANO entity that manages this VL instance.",
371         required=True,
372         max_length=255,
373         allow_null=False,
374         allow_blank=False)
375     resourceHandle = ResourceHandleSerializer(
376         help_text="Reference to the resource realizing this VL.",
377         required=True,
378         allow_null=False)
379     extlinkPorts = ExtlinkPortInfoSerializer(
380         help_text="Link ports of this VL.",
381         many=True,
382         required=False,
383         allow_null=True)
384
385
386 class VnfInfoModificationsSerializer(serializers.Serializer):
387     vnfInstanceName = serializers.CharField(
388         help_text="If present, this attribute signals modifications of the " +
389         "'vnfInstanceName' attribute in 'VnfInstance'",
390         max_length=255,
391         required=False,
392         allow_null=True,
393         allow_blank=True)
394     vnfInstanceDescription = serializers.CharField(
395         help_text="If present, this attribute signals modifications of the " +
396         "'vnfInstanceDescription' attribute in 'VnfInstance'",
397         required=False,
398         allow_null=True,
399         allow_blank=True)
400     vnfdId = serializers.CharField(
401         help_text="If present, this attribute signals modifications of the " +
402         "'vnfdId' attribute in 'VnfInstance'",
403         max_length=255,
404         required=False,
405         allow_null=True,
406         allow_blank=True)
407     vnfProvider = serializers.CharField(
408         help_text="If present, this attribute signals modifications of the " +
409         "'vnfProvider'  attribute in 'VnfInstance'",
410         max_length=255,
411         required=False,
412         allow_null=True)
413     vnfProductName = serializers.CharField(
414         help_text="If present, this attribute signals modifications of the " +
415         "'vnfProductName' attribute in 'vnfInstance'",
416         max_length=255,
417         required=False,
418         allow_null=True,
419         allow_blank=True)
420     vnfSoftwareVersion = serializers.CharField(
421         help_text="If present, this attribute signals modifications of the " +
422         "'vnfSoftwareVersion' attribute in 'VnfInstance'.",
423         max_length=255,
424         required=False,
425         allow_null=True,
426         allow_blank=True)
427     vnfdVersion = serializers.CharField(
428         help_text="If present, this attribute signals modifications of the " +
429         "'vnfdVersion' attribute in 'VnfInstance'. ",
430         max_length=255,
431         required=False,
432         allow_null=True,
433         allow_blank=False)
434     vnfPkgId = serializers.CharField(
435         help_text="If present, this attribute signals modifications of the " +
436         "'vnfPkgId' attribute in 'VnfInstance'.",
437         max_length=255,
438         required=False,
439         allow_null=True,
440         allow_blank=False)
441     vnfConfigurableProperties = serializers.DictField(
442         help_text="If present, this attribute signals modifications of the " +
443         "'vnfConfigurableProperties'  attribute in 'VnfInstance'. ",
444         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
445         required=False,
446         allow_null=True,)
447     vimConnectionInfo = VimConnectionInfoSerializer(
448         help_text="If present, this attribute signals modifications of certain" +
449         "entries in the 'vimConnectionInfo'",
450         required=False,
451         many=True,
452         allow_null=True)
453     metadata = serializers.DictField(
454         help_text="If present, this attribute signals modifications of certain" +
455         "'metadata' attribute in 'vnfInstance'.",
456         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
457         required=False,
458         allow_null=True)
459     extensions = serializers.DictField(
460         help_text="If present, this attribute signals modifications of certain" +
461         "'extensions' attribute in 'vnfInstance'.",
462         child=serializers.CharField(help_text="KeyValue Pairs", allow_blank=True),
463         required=False,
464         allow_null=True)
465
466
467 class LcmOpLinkSerializer(serializers.Serializer):
468     self = LinkSerializer(
469         help_text="URI of this resource.",
470         required=True,
471         allow_null=False)
472     vnfInstance = serializers.CharField(
473         help_text="Link to the VNF instance that the operation applies to.",
474         required=True)
475     grant = serializers.CharField(
476         help_text="Link to the grant for this operation, if one exists.",
477         required=False)
478     cancel = serializers.CharField(
479         help_text="Link to the task resource that represents the 'cancel' " +
480         "operation for this VNF LCM operation occurrence.",
481         required=False)
482     retry = serializers.CharField(
483         help_text="Link to the task resource that represents the 'retry' " +
484         "operation for this VNF LCM operation occurrence, if" +
485         " retrying is currently allowed",
486         required=False)
487     rollback = serializers.CharField(
488         help_text="Link to the task resource that represents the 'cancel' " +
489         "operation for this VNF LCM operation occurrence.",
490         required=False)
491     fail = serializers.CharField(
492         help_text="Link to the task resource that represents the 'fail' " +
493         "operation for this VNF LCM operation occurrence.",
494         required=False)
495
496
497 class AffectedVnfcsSerializer(serializers.Serializer):
498     id = serializers.UUIDField(
499         help_text="Identifier of the Vnfc instance, identifying the " +
500         "applicable 'vnfcResourceInfo' entry in the 'VnfInstance' data type",
501         required=True
502     )
503     vduId = serializers.UUIDField(
504         help_text="Identifier of the related VDU in the VNFD.",
505         required=True
506     )
507     changeType = serializers.ChoiceField(
508         help_text="Signals the type of change",
509         required=True,
510         choices=VNFCS_CHANGE_TYPES
511     )
512     affectedVnfcCpIds = serializers.ListField(
513         help_text="Identifiers of CP(s) of the VNFC instance that " +
514         "were affected by the change",
515         required=False,
516         child=serializers.UUIDField(required=True)
517     )
518     addedStorageResourceIds = serializers.ListField(
519         help_text="References to VirtualStorage resources that " +
520         "have been added",
521         required=False,
522         child=serializers.UUIDField()
523     )
524     removedStorageResourceIds = serializers.ListField(
525         help_text="References to VirtualStorage resources that " +
526         "have been removed.",
527         required=False,
528         child=serializers.UUIDField()
529     )
530     metadata = serializers.DictField(
531         help_text="Metadata about this resource. ",
532         required=False,
533         allow_null=True)
534     computeResource = ResourceHandleSerializer(
535         help_text="Reference to the VirtualCompute resource.",
536         required=True,
537         allow_null=False)
538
539
540 class AffectedStoragesSerializer(serializers.Serializer):
541     id = serializers.UUIDField(
542         help_text="Identifier of the Storage instance, identifying the " +
543         "applicable 'virtualStorageResourceInfo' entry in the 'VnfInstance' data type",
544         required=True
545     )
546     virtualStorageDescId = serializers.UUIDField(
547         help_text="Identifier of the related VirtualStorage descriptor " +
548         "in the VNFD. ",
549         required=True
550     )
551     changeType = serializers.ChoiceField(
552         help_text="Signals the type of change",
553         required=True,
554         choices=STORAGES_CHANGE_TYPES
555     )
556     metadata = serializers.DictField(
557         help_text="Metadata about this resource. ",
558         required=False,
559         allow_null=True)
560     storageResource = ResourceHandleSerializer(
561         help_text="Reference to the VirtualStorage resource.",
562         required=True,
563         allow_null=False)
564
565
566 class AffectedVLsSerializer(serializers.Serializer):
567     id = serializers.UUIDField(
568         help_text="Identifier of the virtual link instance, identifying " +
569         "the applicable 'vnfVirtualLinkResourceInfo' ",
570         required=True
571     )
572     virtualLinkDescId = serializers.UUIDField(
573         help_text="Identifier of the related VLD in the VNFD.",
574         required=True
575     )
576     changeType = serializers.ChoiceField(
577         help_text="Signals the type of change",
578         required=True,
579         choices=VLS_CHANGE_TYPES
580     )
581     metadata = serializers.DictField(
582         help_text="Metadata about this resource. ",
583         required=False,
584         allow_null=True)
585     networkResource = ResourceHandleSerializer(
586         help_text="Reference to the VirtualNetwork resource.",
587         required=True,
588         allow_null=False)
589
590
591 class ResourceChangesSerializer(serializers.Serializer):
592     affectedVnfcs = AffectedVnfcsSerializer(
593         help_text="Information about VNFC instances that were affected " +
594         "during the lifecycle operation.",
595         required=False,
596         many=True
597     )
598     affectedVirtualLinks = AffectedVLsSerializer(
599         help_text="Information about VL instances that were affected " +
600         "during the lifecycle operation. ",
601         required=False,
602         many=True
603     )
604     affectedVirtualStorages = AffectedStoragesSerializer(
605         help_text="Information about virtualised storage instances that " +
606         "were affected during the lifecycle operation",
607         required=False,
608         many=True
609     )
610
611
612 class VNFLCMOpOccSerializer(serializers.Serializer):
613     id = serializers.CharField(
614         help_text="Identifier of this VNF lifecycle management operation" +
615         "occurrence,",
616         max_length=255,
617         required=True,
618         allow_null=False
619     )
620     operationState = serializers.ChoiceField(
621         help_text="The state of the VNF LCM operation occurrence. ",
622         required=True,
623         choices=LCM_OPERATION_STATE_TYPES
624     )
625     stateEnteredTime = serializers.CharField(
626         help_text="Date-time when the current state was entered.",
627         max_length=50
628     )
629     startTime = serializers.CharField(
630         help_text="Date-time of the start of the operation.",
631         max_length=50
632     )
633     vnfInstanceId = serializers.UUIDField(
634         help_text="Identifier of the VNF instance to which the operation" +
635         "applies"
636     )
637     grantId = serializers.UUIDField(
638         help_text="Identifier of the grant related to this VNF LCM operation " +
639                   "occurrence, if such grant exists.",
640         allow_null=True
641     )
642     operation = serializers.ChoiceField(
643         help_text="The lifecycle management operation",
644         required=True,
645         choices=LCM_OPERATION_TYPES
646     )
647     isAutomaticInvocation = serializers.BooleanField(
648         help_text="Set to true if this VNF LCM operation occurrence has " +
649         "been triggered by an automated procedure inside the VNFM. " +
650         "Set to False otherwise.",
651         default=False
652     )
653     operationParams = serializers.DictField(
654         help_text="Input parameters of the LCM operation. This attribute " +
655         "shall be formatted according to the request data type of the " +
656         "related LCM operation. The following mapping between operationType and the " +
657         "data type of this attribute shall apply: " +
658         "1. INSTANTIATE: InstantiateVnfRequest" +
659         "2. SCALE: ScaleVnfRequest " +
660         "3. SCALE_TO_LEVEL: ScaleVnfToLevelRequest " +
661         "4. CHANGE_FLAVOUR: ChangeVnfFlavourRequest " +
662         "5. OPERATE: OperateVnfRequest " +
663         "6. HEAL: HealVnfRequest " +
664         "7. CHANGE_EXT_CONN: ChangeExtVnfConnectivityRequest " +
665         "8. TERMINATE: TerminateVnfRequest " +
666         "9. MODIFY_INFO: VnfInfoModifications",
667         required=True,
668         allow_null=False
669     )
670     isCancelPending = serializers.BooleanField(
671         help_text="If the VNF LCM operation occurrence is in 'STARTING'" +
672         "'PROCESSING' or 'ROLLING_BACK' state and the operation is being" +
673         " cancelled, this attribute shall be set to True. Otherwise, " +
674         " it shall be set to False.",
675         required=True
676     )
677     cancelMode = serializers.CharField(
678         help_text="The mode of an ongoing cancellation. Shall be present " +
679         "when isCancelPending=true, and shall be None otherwise.",
680         allow_null=True,
681         required=False
682     )
683     error = ProblemDetailsSerializer(
684         help_text="If 'operationState' is 'FAILED_TEMP' or 'FAILED' or " +
685         "'PROCESSING' or 'ROLLING_BACK' and previous value of 'operationState' " +
686         "was 'FAILED_TEMP'  this attribute shall be present ",
687         allow_null=True,
688         required=False
689     )
690     resourceChanges = ResourceChangesSerializer(
691         help_text="It contains information about the cumulative changes " +
692         "to virtualised resources that were performed so far by the LCM " +
693         "operation since its start, if applicable.",
694         required=False,
695         allow_null=True)
696     changedInfo = VnfInfoModificationsSerializer(
697         help_text="Information about the changed VNF instance information, " +
698         "including VNF configurable properties",
699         required=False,
700         allow_null=True)
701     changedExtConnectivity = ExtVirtualLinkInfoSerializer(
702         help_text="Information about changed external connectivity, if this " +
703         "notification represents the result of a lifecycle operation occurrence. " +
704         "Shall be present if the 'notificationStatus' is set to 'RESULT' and the " +
705         "'operation' is set to 'CHANGE_EXT_CONN'. Shall be absent otherwise.",
706         many=True,
707         required=False,
708         allow_null=True)
709     _links = LcmOpLinkSerializer(
710         help_text="Links to resources related to this resource.",
711         required=True)