Class | Chef::EventDispatch::Base
In: | lib/chef/event_dispatch/base.rb
Parent: | Object

## EventDispatch::Base

EventDispatch::Base is a completely abstract base class that defines the API used by both the classes that collect event information and those that process them.

### Methods

attribute_file_load_failed attribute_file_loaded attribute_load_complete attribute_load_start converge_complete converge_start cookbook_clean_complete cookbook_clean_start cookbook_resolution_complete cookbook_resolution_failed cookbook_resolution_start cookbook_sync_complete cookbook_sync_failed cookbook_sync_start definition_file_load_failed definition_file_loaded definition_load_complete definition_load_start handler_executed handlers_completed handlers_start library_file_load_failed library_file_loaded library_load_complete library_load_start lwrp_file_load_failed lwrp_file_loaded lwrp_load_complete lwrp_load_start msg node_load_completed node_load_failed node_load_start ohai_completed provider_requirement_failed recipe_file_load_failed recipe_file_loaded recipe_load_complete recipe_load_start recipe_not_found registration_completed registration_failed registration_start removed_cookbook_file resource_action_start resource_bypassed resource_completed resource_current_state_load_bypassed resource_current_state_loaded resource_failed resource_failed_retriable resource_skipped resource_up_to_date resource_update_applied resource_updated run_completed run_failed run_list_expand_failed run_start skipping_registration synchronized_cookbook updated_cookbook_file whyrun_assumption

### Public Instance methods

attribute_file_load_failed(path, exception)

Called when an attribute file fails to load.

attribute_file_loaded(path)

Called after the attribute file is loaded

attribute_load_complete()

Called when attribute file loading is finished

attribute_load_start(attribute_file_count)

Called before attribute files are loaded

converge_complete()

Called when the converge phase is finished.

converge_start(run_context)

Called before convergence starts

cookbook_clean_complete()

Called when cookbook cleaning is finished.

cookbook_clean_start()

Called before unneeded cookbooks are removed

cookbook_resolution_complete(cookbook_collection)

Called when the cookbook collection is returned from the server.

cookbook_resolution_failed(expanded_run_list, exception)

Called when there is an error getting the cookbook collection from the server.

cookbook_resolution_start(expanded_run_list)

Called before the cookbook collection is fetched from the server.

cookbook_sync_complete()

Called after all cookbooks have been sync‘d.

cookbook_sync_failed(cookbooks, exception)

Called when an error occurs during cookbook sync

cookbook_sync_start(cookbook_count)

Called before cookbook sync starts

definition_file_load_failed(path, exception)

Called when a resource definition file fails to load

definition_file_loaded(path)

Called when a resource definition has been loaded

definition_load_complete()

Called when resource defintions are done loading

definition_load_start(definition_file_count)

Called before resource definitions are loaded

handler_executed(handler)

Called after an individual handler has run

handlers_completed()

Called after all handlers have executed

handlers_start(handler_count)

Called before handlers run

library_file_load_failed(path, exception)

Called when a library file has an error on load.

library_file_loaded(path)

Called when library file has been loaded

library_load_complete()

Called when library file loading has finished

library_load_start(file_count)

Called when library file loading starts

lwrp_file_load_failed(path, exception)

Called after a LWR or LWP file errors on load

lwrp_file_loaded(path)

Called after a LWR or LWP has been loaded

lwrp_load_complete()

Called when LWRPs are finished loading

lwrp_load_start(lwrp_file_count)

Called when LWRP loading starts

msg(message)

An uncategorized message. This supports the case that a user needs to pass output that doesn‘t fit into one of the callbacks above. Note that there‘s no semantic information about the content or importance of the message. That means that if you‘re using this too often, you should add a callback for it.

node_load_completed(node, expanded_run_list, config)

Called after Chef client has loaded the node data. Default and override attrs from roles have been computed, but not yet applied. Normal attrs from JSON have been added to the node.

node_load_failed(node_name, exception, config)

Failed to load node data from the server

node_load_start(node_name, config)

Called before Chef client loads the node data from the server

ohai_completed(node)

Called right after ohai runs.

provider_requirement_failed(action, resource, exception, message)

Called when an assertion declared by a provider fails

recipe_file_load_failed(path, exception)

Called after a recipe file fails to load

recipe_file_loaded(path)

Called after the recipe has been loaded

recipe_load_complete()

Called when recipes have been loaded.

recipe_load_start(recipe_count)

Called before recipes are loaded

recipe_not_found(exception)

Called when a recipe cannot be resolved

registration_completed()
registration_failed(node_name, exception, config)

Failed to register this client with the server.

registration_start(node_name, config)

About to attempt to register as `node_name`

removed_cookbook_file(path)

Called after the file at `path` is removed. It may be removed if the cookbook containing it was removed from the run list, or if the file was removed from the cookbook.

resource_action_start(resource, action, notification_type=nil, notifier=nil)

Called before action is executed on a resource.

resource_bypassed(resource, action, current_resource)

Called when evaluating a resource that does not support whyrun in whyrun mode

resource_completed(resource)

Called when a resource action has been completed

resource_current_state_load_bypassed(resource, action, current_resource)

Called when resource current state load is skipped due to the provider not supporting whyrun mode.

resource_current_state_loaded(resource, action, current_resource)

Called after load_current_resource has run.

resource_failed(resource, action, exception)

Called when a resource fails and will not be retried.

resource_failed_retriable(resource, action, retry_count, exception)

Called when a resource fails, but will retry.

resource_skipped(resource, action, conditional)

Called when a resource action has been skipped b/c of a conditional

resource_up_to_date(resource, action)

Called when a resource has no converge actions, e.g., it was already correct.

resource_update_applied(resource, action, update)

Called when a change has been made to a resource. May be called multiple times per resource, e.g., a file may have its content updated, and then its permissions updated.

resource_updated(resource, action)

Called after a resource has been completely converged, but only if modifications were made.

run_completed(node)

Called at the end a successful Chef run.

run_failed(exception)

Called at the end of a failed Chef run.

run_list_expand_failed(node, exception)

Error expanding the run list

run_start(version)

Called at the very start of a Chef Run

skipping_registration(node_name, config)

Already have a client key, assuming this node has registered.

synchronized_cookbook(cookbook_name)

Called when cookbook `cookbook_name` has been sync‘d

updated_cookbook_file(cookbook_name, path)

Called when an individual file in a cookbook has been updated

whyrun_assumption(action, resource, message)

Called when a provider makes an assumption after a failed assertion in whyrun mode, in order to allow execution to continue

[Validate]