class AlarmSerializer(serializers.Serializer): id = serializers.CharField( help_text="Identifier of this Alarm information element.", required=True, allow_null=False) managedObjectId = serializers.CharField( help_text="Identifier of the affected NS instance.", required=True, allow_null=False) rootCauseFaultyComponent = FaultyComponentInfoSerializer( help_text="The NS components that are causing the NS fault.", required=False, allow_null=True) rootCauseFaultyResource = FaultyResourceInfoSerialzier( help_text="The virtualised resources that are" " causing the NS fault.", required=False, allow_null=True) alarmRaisedTime = serializers.DateField( help_text="Time stamp indicating when the alarm is raised by " "the managed object", required=True, allow_null=False) alarmChangedTime = serializers.DateField( help_text="Time stamp indicating when the alarm was last" " changed.", required=False, allow_null=True) alarmClearedTime = serializers.DateField( help_text="Time stamp indicating when the alarm was cleared.", required=False, allow_null=True) ackState = serializers.ListField( help_text="Acknowledgement state of the alarm.", child=serializers.ChoiceField(choices=enum_to_list(ACK_STATE)), required=True, allow_null=False) perceivedSeverity = serializers.ListField( help_text="Perceived severity of the managed object failure.", child=serializers.ChoiceField( choices=enum_to_list(PERCEIVED_SEVERITY_TYPE)), required=True, allow_null=False) eventTime = serializers.DateField( help_text="Time stamp indicating when the fault was observed.", required=True, allow_null=False) eventType = serializers.ListField( help_text="Type of event", child=serializers.ChoiceField(choices=enum_to_list(EVENT_TYPE)), required=True, allow_null=False) faultType = serializers.CharField( help_text="Additional information to clarify the type of the fault.", required=False, allow_null=True) probableCause = serializers.CharField( help_text="Information about the probable cause of the fault.", required=True, allow_null=False)
class VnfPkgInfoSerializer(serializers.Serializer): id = serializers.CharField(help_text="Identifier of the VNF package.", required=True, allow_null=False) vnfdId = serializers.CharField(help_text="This identifier, which is managed by the VNF provider", required=False, allow_null=True) vnfProvider = serializers.CharField(help_text="Provider of the VNF package and the VNFD.", required=False, allow_null=True) vnfProductName = serializers.CharField(help_text="Name to identify the VNF product.", required=False, allow_null=True) vnfSoftwareVersion = serializers.CharField(help_text="Software version of the VNF.", required=False, allow_null=True) vnfdVersion = serializers.CharField(help_text="The version of the VNFD.", required=False, allow_null=True) checksum = serializers.CharField(help_text="Checksum of the on-boarded VNF package.", required=False, allow_null=True) softwareImages = VnfPackageSoftwareImageInfoSerializer(help_text="Information about VNF package artifacts" " that are software images", required=False, allow_null=True, many=True) additionalArtifacts = VnfPackageArtifactInfoSerializer(help_text="Information about VNF package artifacts" " contained in the VNF package that are" " not software images.", required=False, allow_null=True, many=True) onboardingState = serializers.ListField(help_text="On-boarding state of the VNF package", child=serializers.ChoiceField( choices=enum_to_list(PACKAGE_ONBOARDING_STATE_TYPE)), required=True, allow_null=False) operationalState = serializers.ListField(help_text="Operational state of the VNF package", child=serializers.ChoiceField( choices=enum_to_list(PACKAGE_OPERATIONAL_STATE_TYPE)), required=True, allow_null=False) usageState = serializers.ListField(help_text="Usage state of the VNF package.", child=serializers.ChoiceField( choices=enum_to_list(PACKAGE_USAGE_STATE_TYPE)), required=True, allow_null=False) _links = serializers.CharField(help_text="Links to resources related to this resource.", required=True, allow_null=False)
class NotifyLcmReqSerializer(serializers.Serializer): status = serializers.ChoiceField( help_text="Status of operation", choices=enum_to_list(LCM_NOTIFICATION_STATUS), required=True ) operation = serializers.ChoiceField( help_text="Lifecycle Operation", choices=enum_to_list(LIFE_CYCLE_OPERATION), required=True ) jobId = serializers.CharField( help_text="ID of Job", required=False, allow_null=True, allow_blank=True) vnfdmodule = serializers.CharField( help_text="VNFD Module", required=False, allow_null=True, allow_blank=True) affectedVnfc = AffectedVnfcLcmSerializer( help_text="Affected VNFC", many=True) affectedVl = AffectedVirtualLinkLcmSerializer( help_text="Affected VL", many=True) affectedCp = AffectedCpSerializer( help_text="Affected CP", many=True) affectedVirtualStorage = AffectedVirtualStorageLcm( help_text="Affected Virtual Storage(Not supported)", many=True)
class AffinityOrAntiAffinityRuleSerializer(serializers.Serializer): vnfdId = serializers.ListField( child=serializers.CharField(), help_text="Identifier of the VNFD on which the VNF instance is based.", required=False, allow_null=True) vnfProfileId = serializers.ListField( child=serializers.CharField(), help_text= "Identifier of (Reference to) a vnfProfile defined in the NSD which the existing VNF instance shall be matched with.", required=False, allow_null=True) vnfInstanceId = serializers.ListField( child=serializers.CharField(), help_text= "Identifier of the existing VNF instance to be used in the NS.", required=True, allow_null=False) affinityOrAntiAffiinty = serializers.ChoiceField( help_text="The type of the constraint.", choices=enum_to_list(AFFINITY_OR_ANTIAFFIINTY), required=True, allow_null=False, allow_blank=False) scope = serializers.ChoiceField( help_text= "Specifies the scope of the rule where the placement constraint applies.", choices=enum_to_list(AFFINITY_OR_ANTIAFFIINTY_SCOPE), required=True, allow_null=False, allow_blank=False)
class VnfPackageSoftwareImageInfoSerializer(serializers.Serializer): id = serializers.CharField(help_text="Identifier of the software image.", required=True, allow_null=False) name = serializers.CharField(help_text="Name of the software image.", required=True, allow_null=False) provider = serializers.CharField(help_text="Provider of the software image.", required=True, allow_null=False) version = serializers.CharField(help_text="Version of the software image.", required=True, allow_null=False) checksum = serializers.CharField(help_text="Checksum of the software image file.", required=True, allow_null=False) containerFormat = serializers.ListField(help_text="Container format indicates whether the software image" " is in a file format that also contains metadata" " about the actual software.", child=serializers.ChoiceField( choices=enum_to_list(CONTAINER_FORMAT)), required=True, allow_null=False) diskFormat = serializers.ListField(help_text="Disk format of a software image is the format of the " "underlying disk image", child=serializers.ChoiceField( choices=enum_to_list(DISK_FORMAT)), required=True, allow_null=False) createdAt = serializers.DateField(help_text="Time when this software image was created.", required=True, allow_null=False) minDisk = serializers.CharField(help_text="The minimal disk for this software image in bytes.", required=True, allow_null=False) minRam = serializers.CharField(help_text="The minimal RAM for this software image in bytes.", required=True, allow_null=False) size = serializers.CharField(help_text="Size of this software image in bytes.", required=True, allow_null=False) userMetadata = serializers.DictField(help_text="User-defined data.", required=False, allow_null=True) imagePath = serializers.CharField(help_text="Path in the VNF package, which identifies the image " "artifact and also allows to access a copy of the image " "artifact.", required=True, allow_null=False)
class NfpRuleSerializer(serializers.Serializer): etherDestinationAddress = serializers.CharField( help_text="Indicates a destination Mac address", required=False, allow_null=True) etherSourceAddress = serializers.CharField( help_text="Indicates a source Mac address", required=False, allow_null=True) etherType = serializers.ChoiceField( help_text="Indicates the protocol carried over the Ethernet layer", choices=enum_to_list(IPADDRESSES_TYPE), required=False, allow_null=True) vlanTag = serializers.ListField( help_text="ndicates a VLAN identifier in an IEEE 802.1Q-2014 tag", required=False, allow_null=True) protocol = serializers.ChoiceField( help_text="Indicates the L4 protocol, For IPv4 [7] this corresponds to" "the field called Protocol to identifythe next level protocol", choices=enum_to_list(PROTOCOL), required=False, allow_null=True) dscp = serializers.CharField( help_text= "For IPv4 [7] a string of 0 and 1 digits that corresponds to the" "6-bit Differentiated Services Code Point (DSCP) field of the IP header.", required=False, allow_null=True) sourcePortRange = serializers.CharField( help_text="Indicates a range of source ports", required=False, allow_null=True) destinationPortRange = serializers.CharField( help_text="Indicates a range of destination ports", required=False, allow_null=True) sourceIpAddressPrefix = serializers.CharField( help_text="Indicates the source IP address range in CIDR format.", required=False, allow_null=True) destinationIpAddressPrefix = serializers.CharField( help_text="Indicates the destination IP address range in CIDR format.", required=False, allow_null=True) extendedCriteria = MaskSerializer( help_text="Indicates values of specific bits in a frame", required=False, allow_null=True, many=True)
class PlacementConstraintSerializer(serializers.Serializer): affinityOrAntiAffinity = serializers.ChoiceField( help_text="The type of the constraint.", choices=enum_to_list(AFFINITY_OR_ANTIAFFIINTY), required=True) scope = serializers.ChoiceField( help_text= "The scope of the placement constraint indicating the category of the place where the constraint applies.", choices=enum_to_list(AFFINITY_OR_ANTIAFFIINTY_SCOPE), required=True) resource = ConstraintResourceRefSerializer( help_text="References to resources in the constraint rule.", many=True, required=False)
class AffectedNssSerializer(serializers.Serializer): nsInstanceId = serializers.UUIDField( help_text="Identifier of the nested NS instance.", required=True) nsdId = serializers.UUIDField( help_text="Identifier of the NSD of the nested NS instance.", required=True) changeType = serializers.ChoiceField( help_text="Signals the type of change", required=True, choices=enum_to_list(CHANGE_TYPE)) changeResult = serializers.ChoiceField( help_text= "Signals the result of change identified by the 'changeType' attribute.", required=True, choices=enum_to_list(CHANGE_RESULT))
class AffectedVLsSerializer(serializers.Serializer): id = serializers.UUIDField(help_text="Identifier of the VL Instance.", required=True) virtualLinkDescId = serializers.UUIDField( help_text="Identifier of the VLD in the NSD for this VL.", required=True) changeType = serializers.ChoiceField( help_text="Signals the type of change", required=True, choices=enum_to_list(CHANGE_TYPE)) changeResult = serializers.ChoiceField( help_text= "Signals the result of change identified by the 'changeType' attribute.", required=True, choices=enum_to_list(CHANGE_RESULT))
class NfpInfoSerializer(serializers.Serializer): id = serializers.CharField(help_text="Identifier of this NFP instance.", required=True) nfpdId = serializers.CharField( help_text= "Identifier of the NFPD used to instantiate this NFP instance.", required=False, allow_null=True) nfpName = serializers.CharField( help_text="Human readable name for the NFP instance.", required=False, allow_null=True) description = serializers.CharField( help_text="Human readable description for the NFP instance.", required=True) nscpHandle = NsCpHandleSerializer( help_text= "Identifier(s) of the CPs and/or SAPs which the NFP passes by", required=True, many=True) totalCp = serializers.CharField( help_text="Total number of CP and SAP instances in this NFP instance.", required=False, allow_null=True) nfpRule = NfpRuleSerializer( help_text= "The NfpRule data type is an expression of the conditions that shall be met in order for the NFP to be applicable to the packet", required=True) nfpState = serializers.ChoiceField( help_text="The state of the NFP instance.", choices=enum_to_list(NFP_STATE), required=True)
class AffectedCpSerializer(serializers.Serializer): changeType = serializers.ChoiceField( help_text="Type of Change", choices=enum_to_list(VNFC_CHANGE_TYPE), # ["added", "removed", "modified"], required=True) virtualLinkInstanceId = serializers.CharField( help_text="ID of VL instance", required=False, allow_null=True, allow_blank=True) cpInstanceId = serializers.CharField( help_text="ID of CP instance", required=False, allow_null=True, allow_blank=True) cpdId = serializers.CharField( help_text="ID of CPD in VNFD", required=False, allow_null=True, allow_blank=True) ownerType = serializers.CharField( help_text="Type of Owner", required=False, allow_null=True, allow_blank=True) ownerId = serializers.CharField( help_text="ID of Owner", required=False, allow_null=True, allow_blank=True) portResource = PortResourceSerializer( help_text="Port Resource", required=False, allow_null=True)
class AffectedVnfcLcmSerializer(serializers.Serializer): vnfcInstanceId = serializers.CharField( help_text="ID of VNFC instance", required=False, allow_null=True, allow_blank=True) vduId = serializers.CharField( help_text="ID of VDU in VNFD", required=False, allow_null=True, allow_blank=True) changeType = serializers.ChoiceField( help_text="Type of Change", choices=enum_to_list(VNFC_CHANGE_TYPE), # ["added", "removed", "modified"], required=True) vimId = serializers.CharField( help_text="ID of VIM", required=False, allow_null=True, allow_blank=True) vmId = serializers.CharField( help_text="ID of virtual machine", required=False, allow_null=True, allow_blank=True) vmName = serializers.CharField( help_text="Name of virtual machine", required=False, allow_null=True, allow_blank=True)
class GrantVnfReqSerializer(serializers.Serializer): vnfInstanceId = serializers.CharField( help_text="ID of VNF instance", required=True) vnfDescriptorId = serializers.CharField( help_text="ID of VNF Descriptor", required=False, allow_null=True, allow_blank=True) lifecycleOperation = serializers.ChoiceField( help_text="Lifecycle Operation", choices=enum_to_list(LIFE_CYCLE_OPERATION), required=True) jobId = serializers.CharField( help_text="ID of Job", required=False, allow_null=True, allow_blank=True) addResource = ResourceChangeSerializer( help_text="Add resources", many=True) removeResource = ResourceChangeSerializer( help_text="Remove resources", many=True) additionalParam = serializers.DictField( help_text="Additional parameters passed to the NFVO, specific to the VNF and the LCM operation. The currently interpreted keys are the following: vimId", child=serializers.CharField(help_text="Additional parameters", allow_blank=True), required=False, allow_null=True)
class VnfIdentifierDeletionNotificationSerializer(serializers.Serializer): id = serializers.CharField(help_text="Identifier of this notification. \ If a notification is sent multiple times due to multiple subscriptions, \ the id attribute of all these notifications shall have the same value.", required=True, allow_null=False, allow_blank=False) notificationType = serializers.ChoiceField( help_text="Discriminator for the different notification types.", choices=enum_to_list(VNF_NOTIFICATION_TYPE), required=True) subscriptionId = serializers.CharField( help_text= "Identifier of the subscription that this notification relates to.", required=False, allow_null=True, allow_blank=True) timeStamp = serializers.DateTimeField( help_text="Date-time of the generation of the notification.", required=True, allow_null=False, ) vnfInstanceId = serializers.CharField( help_text="The deleted VNF instance identifier.", required=True, allow_null=False, allow_blank=False) _links = LccnLinksSerializer( help_text="Links to resources related to this notification.", required=True, allow_null=False)
class VnfLinkPortInfo(serializers.Serializer): id = serializers.CharField( help_text= "Identifier of this link port as provided by the entity that has created the link port.", max_length=255, required=True, allow_null=False, allow_blank=False) resourceHandle = ResourceHandleSerializer( help_text= "Reference to the virtualised network resource realizing this link port.", required=True, allow_null=False) cpInstanceId = serializers.CharField( help_text= "When the link port is used for external connectivity by the VNF, \ this attribute represents the identifier of the external CP of the VNF to be connected to this \ link port.", max_length=255, required=False, allow_null=True, allow_blank=True) cpInstanceType = serializers.ChoiceField( required=False, choices=enum_to_list(CP_INSTANCE_TYPE), help_text="Type of the CP instance that is identified by cpInstanceId." )
class ResourceDefinitionSerializer(serializers.Serializer): id = serializers.CharField( help_text= "Identifier of this ResourceDefinition, unique at least within the scope of the GrantRequest.", required=True) type = serializers.ChoiceField( help_text="Type of the resource definition referenced.", choices=enum_to_list(RESOURE_TYPE), required=True) vduId = serializers.CharField( help_text= "Reference to the related VDU in the VNFD applicable to this resource.", required=False, allow_null=True, allow_blank=True) resourceTemplateId = serializers.CharField( help_text= "Reference to a resource template(such as VnfVirtualLinkDesc) in the VNFD.", required=False, allow_null=True, allow_blank=True) resource = ResourceHandleSerializer( help_text="Resource information for an existing resource.", required=False, allow_null=True)
class VnfPkgInfoModifications(serializers.Serializer): operationalState = serializers.ListField(help_text="New value of the operational state of the on-boarded " "instance of the VNF package", child=serializers.ChoiceField( choices=enum_to_list(PACKAGE_OPERATIONAL_STATE_TYPE)), required=False, allow_null=True, many=True,) userDefinedData = serializers.DictField(help_text="User defined data to be updated.", required=False, allow_null=True)
class FmNotificationsFilterSerializer(serializers.Serializer): nsInstanceSubscriptionFilter = NsInstanceSubscriptionFilterSerializer( help_text= "Filter criteria to select NS instances about which to notify.", required=False, allow_null=True) notificationTypes = serializers.ListField( help_text="Match particular notification types", child=serializers.ChoiceField( required=False, choices=enum_to_list(NOTIFICATION_TYPES)), required=False, allow_null=True, many=True) faultyResourceTypes = serializers.ListField( help_text="Match alarms related to NSs with a faulty " "resource type listed in this attribute", child=serializers.ChoiceField( choices=enum_to_list(FAULTY_RESOURCE_TYPE)), required=False, allow_null=True, many=True, ) perceivedSeverities = serializers.ListField( help_text="Match alarms related to NSs with a perceived " "severity listed in this attribute.", child=serializers.ChoiceField( choices=enum_to_list(PERCEIVED_SEVERITY_TYPE)), required=False, allow_null=True, many=True, ) eventTypes = serializers.ListField( help_text="Match alarms releted to NSs with an event type listed in" "this attribute.", child=serializers.ChoiceField(choices=enum_to_list(EVENT_TYPE)), required=False, allow_null=True, many=True, ) probableCauses = serializers.CharField( help_text="Match alarms related to NSs with a probable cause " "listed in this attribute", required=False, allow_null=True, many=True)
class CpProtocolInfoSerializer(serializers.Serializer): layerProtocol = serializers.ChoiceField( help_text="Identifier of layer(s) and protocol(s)", choices=enum_to_list(LAYER_PROTOCOL), required=True) ipOverEthernet = IpOverEthernetAddressInfoSerializer( help_text="Network address data for IP over Ethernet to assign to the extCP instance.", required=False, allow_null=True)
class AffectedVnffgsSerializer(serializers.Serializer): vnffgInstanceId = serializers.UUIDField( help_text="Identifier of the VNFFG instance.", required=True ) vnffgdId = serializers.UUIDField( help_text="Identifier of the VNFFGD of the VNFFG instance.", required=True ) changeType = serializers.ChoiceField( help_text="Signals the type of lifecycle change.", required=True, choices=enum_to_list(CHANGE_TYPE) ) changeResult = serializers.ChoiceField( help_text="Signals the result of change identified by the 'changeType' attribute.", required=True, choices=enum_to_list(CHANGE_RESULT) )
class ThresholdCriteriaSerializer(serializers.Serializer): performanceMetric = serializers.CharField( help_text="Defines the performance metric associated with the " "threshold", required=True, allow_null=False) thresholdType = serializers.ListField( help_text="Type of threshold.", child=serializers.ChoiceField(required=True, choices=enum_to_list(THRESHOLD_TYPE)), required=True, allow_null=False)
class SubscriptionAuthenticationSerializer(serializers.Serializer): authType = serializers.ListField(help_text="Defines the types of Authentication " "Authorization the API consumer is willing to " "accept when receiving a notification.", child=serializers.ChoiceField( choices=enum_to_list(AUTH_TYPE)), required=True, allow_null=False) paramsBasic = serializers.CharField(help_text="Parameters for authentication/authorization using BASIC", required=False, allow_null=True) paramsOauth2ClientCredentials = serializers.CharField(help_text="Parameters for authentication/" "authorization using " "OAUTH2_CLIENT_CREDENTIALS", required=False, allow_null=True)
class AffectedVnfsSerializer(serializers.Serializer): vnfInstanceId = serializers.UUIDField( help_text="Identifier of the VNF instance.", required=True) vnfdId = serializers.UUIDField( help_text="Identifier of the VNFD of the VNF Instance.", required=True) vnfProfileId = serializers.UUIDField( help_text="Identifier of the VNF profile of the NSD.", required=True) vnfName = serializers.CharField(help_text="Name of the VNF Instance.", required=True) changeType = serializers.ChoiceField( help_text="Signals the type of change", required=True, choices=enum_to_list(CHANGE_TYPE)) changeResult = serializers.ChoiceField( help_text= "Signals the result of change identified by the 'changeType' attribute.", required=True, choices=enum_to_list(CHANGE_RESULT)) changedInfo = ChangedInfoSerializer( help_text= "Information about the changed VNF instance information, including VNF configurable properties, if applicable.", required=False)
class PkgmNotificationsFilterSerializer(serializers.Serializer): notificationTypes = serializers.ListField(help_text="Match particular notification types", child=serializers.ChoiceField( choices=enum_to_list(NOTIFICATION_TYPES)), required=True, allow_null=False) vnfProductsFromProviders = serializers.ListField(help_text="If present, match VNF packages that contain" " VNF products from certain providers.", required=False, allow_null=True, many=True) vnfdId = serializers.ListField(help_text="Match VNF packages with a VNFD identifier listed in the" " attribute", required=False, allow_null=True, many=True) vnfPkgId = serializers.ListField(help_text="Match VNF packages with a package identifier listed in " "the attribute.", required=False, allow_null=True, many=True) operationalState = serializers.ListField(help_text="Match particular operational state of the on" "boarded VNF package.", child=serializers.ChoiceField( choices=enum_to_list(PACKAGE_OPERATIONAL_STATE_TYPE)), required=True, allow_null=False) usageState = serializers.ListField(help_text="Match particular usage state of the on-boarded " "VNF package.", child=serializers.ChoiceField( choices=enum_to_list(PACKAGE_USAGE_STATE_TYPE)), required=True, allow_null=False)
class FaultyResourceInfoSerialzier(serializers.Serializer): faultyResource = ResourceHandleSerualizer( help_text="Information that identifies the faulty resource " "instance and its managing entity", required=True, allow_null=False) faultyResourceType = serializers.ListField( help_text="Type of the faulty resource.", child=serializers.ChoiceField( choices=enum_to_list(FAULTY_RESOURCE_TYPE)), required=True, allow_null=False, )
class AffectedSapsSerializer(serializers.Serializer): sapInstanceId = serializers.UUIDField( help_text="Identifier of the SAP instance.", required=True ) sapdId = serializers.UUIDField( help_text="Identifier of the SAPD for this SAP.", required=True ) sapName = serializers.CharField( help_text="Human readable name for the SAP.", required=True) changeType = serializers.ChoiceField( help_text="Signals the type of lifecycle change", required=True, choices=enum_to_list(CHANGE_TYPE) ) changeResult = serializers.ChoiceField( help_text="Signals the result of change identified by the 'changeType' attribute.", required=True, choices=enum_to_list(CHANGE_RESULT) )
class AffectedPnfsSerializer(serializers.Serializer): pnfId = serializers.UUIDField( help_text= "Identifier of the affected PNF. This identifier is allocated by the OSS/BSS. ", required=True) pnfdId = serializers.UUIDField( help_text="Identifier of the PNFD on which the PNF is based.", required=True) pnfProfileId = serializers.UUIDField( help_text="Identifier of the VNF profile of the NSD.", required=True) pnfName = serializers.CharField(help_text="Name of the PNF.", required=True) cpInstanceId = serializers.UUIDField( help_text="Identifier of the NS profile of the NSD.", required=True) changeType = serializers.ChoiceField( help_text="Signals the type of change", required=True, choices=enum_to_list(CHANGE_TYPE)) changeResult = serializers.ChoiceField( help_text= "Signals the result of change identified by the 'changeType' attribute.", required=True, choices=enum_to_list(CHANGE_RESULT))
class ThresholdCrossedNotificationSerializer(serializers.Serializer): id = serializers.CharField( help_text= "Identifier of this notification. If a notification is sent multiple" " times due to multiple subscriptions", required=True, allow_null=False) notificationType = serializers.CharField( help_text="Discriminator for the different notification types.", required=True, allow_null=False) subscriptionId = serializers.CharField( help_text="Identifier of the subscription that this notification " "relates to.", required=True, allow_null=False) timeStamp = serializers.CharField( help_text="Date and time of the generation of the notification.", required=True, allow_null=False) thresholdId = serializers.CharField( help_text="Identifier of the threshold which has been crossed.", required=True, allow_null=False) crossingDirection = serializers.ListField( help_text="An indication of whether the threshold was crossed " "in upward or downward direction.", child=serializers.ChoiceField( required=True, choices=enum_to_list(CROSSINGDIRECTION_TYPE)), required=True, allow_null=False) objectInstanceId = serializers.CharField( help_text="Identifier that identifies a NS instance.", required=True, allow_null=False) performanceMetric = serializers.CharField( help_text="Performance metric associated with the " "threshold", required=True, allow_null=False) performanceValue = serializers.CharField( help_text="Value of the metric that resulted in threshold " "crossing.", required=True, allow_null=False) _links = serializers.CharField( help_text="Links to resources related to this notification", required=True, allow_null=False)
class NetworkResourceSerializer(serializers.Serializer): resourceType = serializers.ChoiceField( help_text="Type of Resource", choices=enum_to_list(NETWORK_RESOURCE_TYPE), required=True) resourceId = serializers.CharField( help_text="ID of network resource", required=False, allow_null=True, allow_blank=True) resourceName = serializers.CharField( help_text="Name of network resource", required=False, allow_null=True, allow_blank=True)
class ResourceChangeSerializer(serializers.Serializer): type = serializers.ChoiceField( help_text="Change Type", choices=enum_to_list(RESOURCE_CHANGE_TYPE), required=True) resourceDefinitionId = serializers.CharField( help_text="Identifier of resource", required=False, allow_null=True, allow_blank=True) vdu = serializers.CharField( help_text="Identifier identifier of VDU", required=False, allow_null=True, allow_blank=True)