Base notifier to perform notifications

class BaseNotification(resource, inventory_index_id, violations, global_configs, notifier_config, notification_config)[source]

Bases: object

Base notifier to perform notifications

_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 185
_abc_registry = <_weakrefset.WeakSet object>

Create the output filename.

Parameters:filename_template (string) – template to use for the output filename
Returns:The output filename for the violations CSV file.
Return type:str
classmethod check_data_format(data_format)[source]

Raise InvalidDataFormatError unless data_format is supported.

Parameters:data_format (string) – should be either ‘csv’ or ‘json’
Raises:InvalidDataFormatError – if not valid

Runs the notifier.

supported_data_formats = ['csv', 'json']
exception InvalidDataFormatError(notifier, invalid_data_format)[source]

Bases: exceptions.Exception

Raised in case of an invalid notifier data format.