Network Flow Log

Network flow log resources store configuration and delivery information regarding traffic flows between networking components in a cloud network. This resource inherits from Resource and has direct access to the resource’s database object. The following attributes are directly accessible:

attr resource_id:
 The primary resource identifier that takes the form of a prefix followed by numbers and letters
attr organization_service_id:
 The ID of the parent organization service (cloud)
attr region_name:
 The region that the instance resides in
attr flow_log_id:
 The provider ID of the flow log
attr status:The status of log delivery (active, inactive)
attr traffic_type:
 The type of traffic being logged
attr log_group_name:
 The name of the logging group
attr delivery_status:
 Logging status of the flow log (success, failed)
attr delivery_error:
 Delivery error description
attr creation_time:
 Time the flow log was created
class DivvyResource.Resources.networkflowlog.NetworkFlowLog(resource_id)

Bases: DivvyResource.Resources.resource.Resource

Network Flow Log Operations

static get_db_class()
static get_provider_id_field()
static get_resource_name_field()

Network flow logs don’t have a name so we will use the log_group_name as the name.

static get_resource_type()
handle_resource_created(user_resource_id=None, project_resource_id=None)

This should be called when a resource is created/discovered after the basic data is added to the database. This gives an opportunity for post-addition hooks (assignment to projects/groups, alerts, etc)

handle_resource_destroyed(user_resource_id=None, project_resource_id=None)

This should be called when a resource is destroyed before the basic data is removed from the database. This gives an opportunity for pre-destruction hooks (removal from projects/groups, alerts, etc).

handle_resource_modified(resource, *args, **kwargs)

This should be called when a resource is modified after the new data has been updated in the DB session. This gives an opportunity for post-modification hooks.