Class: Shell::SoloLegacySession

Inherits:
ShellSession show all
Defined in:
lib/chef/shell/shell_session.rb

Instance Attribute Summary

Attributes inherited from ShellSession

#client, #compile, #node, #node_attributes, #recipe, #run_context

Instance Method Summary collapse

Methods inherited from ShellSession

#cookbook_loader, #initialize, inspect, #node_built?, #reset!, #resource_collection, #save_node, session_type

Constructor Details

This class inherits a constructor from Shell::ShellSession

Instance Method Details

#definitionsObject


166
167
168
# File 'lib/chef/shell/shell_session.rb', line 166

def definitions
  @run_context.definitions
end

#rebuild_contextObject


170
171
172
173
174
175
176
177
178
179
# File 'lib/chef/shell/shell_session.rb', line 170

def rebuild_context
  @run_status = Chef::RunStatus.new(@node, @events)
  Chef::Cookbook::FileVendor.fetch_from_disk(Chef::Config[:cookbook_path])
  cl = Chef::CookbookLoader.new(Chef::Config[:cookbook_path])
  cl.load_cookbooks
  cookbook_collection = Chef::CookbookCollection.new(cl)
  @run_context = Chef::RunContext.new(node, cookbook_collection, @events)
  @run_context.load(Chef::RunList::RunListExpansionFromDisk.new("_default", []))
  @run_status.run_context = run_context
end