+ alarm_definition = api_ims_inventory_v1.model(
+ "AlarmDefinitionDto",
+ {
+ 'alarmDefinitionId': fields.String(
+ example='eaefa070-7cb6-3403-be46-177bd9ccc2d3',
+ description='Provides a unique identifier of the alarm ' +
+ 'being raised.'),
+ 'alarmName': fields.String(
+ example='100.104',
+ description='Provides short name for the alarm.'),
+ 'alarmLastChange': fields.String(
+ example='0.1',
+ description='Indicates the Alarm Dictionary Version in ' +
+ 'which this alarm last changed.'),
+ 'alarmChangeType': fields.String(
+ example='ADDED',
+ description='Indicates the type of change that occurred ' +
+ 'during the alarm last change; added, deleted, modified.'),
+ 'alarmDescription': fields.String(
+ example='host=<hostname>.filesystem=<mount-dir>\n ' +
+ 'File System threshold exceeded; threshold x%, actual y% .\n' +
+ ' CRITICAL @ 90%\n ' +
+ 'MAJOR @ 80%\nOR\n' +
+ 'host=<hostname>.volumegroup=<volumegroup-name>\n ' +
+ 'Monitor and if condition persists, consider addin ...',
+ description='Provides a longer descriptive meaning of ' +
+ 'the alarm condition and a description of the ' +
+ 'consequences of the alarm condition.'),
+ 'proposedRepairActions': fields.String(
+ example='Reduce usage or resize filesystem.',
+ description='Provides guidance for proposed repair actions.'),
+ 'clearingType': fields.String(
+ example='MANUAL',
+ description='Identifies whether alarm is cleared ' +
+ 'automatically or manually.'),
+ 'managementInterfaceId': fields.String(
+ example='O2IMS',
+ description='List of management interface over which ' +
+ 'alarms are transmitted for this Entity Type.'),
+ 'pkNotificationField': fields.String(
+ example='',
+ description='Identifies which field or list of fields in ' +
+ 'the alarm notification contains the primary key (PK) into ' +
+ 'the Alarm Dictionary for this interface; i.e. which ' +
+ 'field contains the Alarm Definition ID.'),
+ 'alarmAdditionalFields': fields.String(
+ example='',
+ description='List of metadata key-value pairs used to ' +
+ 'associate meaningful metadata to the related resource type.'),
+ }
+
+ )
+ alarm_dictionary = api_ims_inventory_v1.model(
+ "AlarmDictionaryDto",
+ {
+ 'id': fields.String(
+ example='7e1e59c3-c99e-3d1c-9934-21548a3a699a',
+ description='Identifier for the Alarm Dictionary.'),
+ 'alarmDictionaryVersion': fields.String(
+ example='0.1',
+ description='Version of the Alarm Dictionary.'),
+ 'alarmDictionarySchemaVersion': fields.String(
+ example='0.1',
+ description='Version of the Alarm Dictionary Schema to ' +
+ 'which this alarm dictionary conforms.'),
+ 'entityType': fields.String(
+ example='pserver',
+ description='O-RAN entity type emitting the alarm: This ' +
+ 'shall be unique per vendor ResourceType.model and ' +
+ 'ResourceType.version'),
+ 'vendor': fields.String(
+ example='',
+ description='Vendor of the Entity Type to whom this ' +
+ 'Alarm Dictionary applies. This should be the same value ' +
+ 'as in the ResourceType.vendor attribute.'),
+ 'managementInterfaceId': fields.String(
+ example='O2IMS',
+ description='List of management interface over which ' +
+ 'alarms are transmitted for this Entity Type.'),
+ 'pkNotificationField': fields.String(
+ example='',
+ description='Identifies which field or list of fields in ' +
+ 'the alarm notification contains the primary key (PK) into ' +
+ 'the Alarm Dictionary for this interface; i.e. which field ' +
+ 'contains the Alarm Definition ID.'),
+ # 'alarmDefinition': fields.String,
+ 'alarmDefinition': fields.List(
+ fields.Nested(alarm_definition),
+ attribute='alarmDefinition',
+ example='',
+ description='Contains the list of alarms that can be ' +
+ 'detected against this ResourceType.'),
+ }
+ )