probator_auditor_required_tags

class probator_auditor_required_tags.RequiredTagsAuditor

Bases: probator.plugins.BaseAuditor

static bootstrap()

Bootstrap plugin configuration items

run()

Execute the auditor

Returns:None
get_action_config_for_class(resource_type_name)

Return the computed alert configuration for a given resource type

Parameters:resource_type_name (str) – Name of the resource class
Returns:dict - Returns an alert configuration dictionary
get_next_action(resource_class, issue)

Return the next action to perform

Parameters:
  • resource_class (BaseResource) – Resource class for issue
  • issue (RequiredTagsIssue) – Full action schedule for resource type
Returns:

dict, None

resource_type_issues(resource_class, existing_issues)

Return a list of resources missing required tags

Parameters:
  • resource_class (BaseResource) – Class of resource type to gather
  • existing_issues (list of RequiredTagsIssue) – List of existing issues
Returns:

dict - Dictionary of all discovered issues

get_state_action(*, resource_type, issue_state)

Return the action for a given state

Parameters:
  • resource_type (str) – Resource type name
  • issue_state (str) – Issue state name
Returns:

str

handle_actions(*, issues)

Perform audit actions (stop / remove)

Parameters:issues (list of IssueAction) – List of issues
Returns:None
notify(*, new_issues, updated_issues, fixed_issues)

Notify users, if needed

Parameters:
  • new_issues (list of IssueAction) – List of new issues
  • updated_issues (list of IssueAction) – List of existing / updated issues
  • fixed_issues (list of BaseResource) – List of resources whose issues were fixed
Returns:

None