google.cloud.forseti.notifier.notifier module

Notifier runner.

convert_to_timestamp(violations)[source]

Convert violation created_at_datetime to timestamp string.

Parameters:violations (dict) – List of violations as dict with created_at_datetime.
Returns:
List of violations as dict with created_at_datetime
converted to timestamp string.
Return type:list
find_notifiers(notifier_name)[source]

Get the first class in the given sub module

Parameters:notifier_name (str) – Name of the notifier.
Returns:The class in the sub module
Return type:class
run(inventory_index_id, progress_queue, service_config=None)[source]

Run the notifier.

Entry point when the notifier is run as a library.

Parameters:
  • inventory_index_id (int64) – Inventory index id.
  • progress_queue (Queue) – The progress queue.
  • service_config (ServiceConfig) – Forseti 2.0 service configs.
Returns:

Status code.

Return type:

int