google.cloud.forseti.notifier.notifiers.inventory_summary module

Upload inventory summary to GCS.

class InventorySummary(service_config, inventory_index_id)[source]

Bases: object

Create and send inventory summary.

_get_output_filename(filename_template)[source]

Create the output filename.

Parameters:filename_template (string) – template to use for the output filename
Returns:The output filename for the inventory summary file.
Return type:str
_get_summary_data()[source]

Get the summarized inventory data.

Returns:
Summary of sorted inventory data as a list of dicts.
Example: [{resource_type, count}, {}, {}, …]
Return type:list
Raises:NoDataError – If summary data is not found.
_send_email(summary_data)[source]

Send the email for inventory summary.

Parameters:summary_data (list) – Summary of inventory data as a list of dicts. Example: [{resource_type, count}, {}, {}, …]
_upload_to_gcs(summary_data)[source]

Upload inventory summary to GCS.

Parameters:summary_data (list) – Summary of inventory data as a list of dicts. Example: [{resource_type, count}, {}, {}, …]
run()[source]

Generate inventory summary.