Method: Toaster::ResourceInspector.get_config_for_potential_state_changes

Defined in:
lib/toaster/chef/resource_inspector.rb

.get_config_for_potential_state_changes(task_or_sourcecode, cookbook_paths = [], state_change_config = {}) ⇒ Object

Returns a hash which maps identifier=>configurations, indicating which types of state changes this task, upon execution, is potentially going to perform. For instance, if the task starts/stops a system service, the identifier “ports” will be in the hash keys. If the task modifies some files, the key will contain the identifier “files”, and possibly a list of potential files that may be edited. This helps us to develop tailor-made state capturing tools (e.g., implemented as ohai plugins) for different types of tasks.



72
73
74
75
76
# File 'lib/toaster/chef/resource_inspector.rb', line 72

def self.get_config_for_potential_state_changes(task_or_sourcecode, 
      cookbook_paths = [], state_change_config = {})
  data = parse_data(task_or_sourcecode, cookbook_paths, state_change_config)
  return data[0]
end