Class: Shell::StandAloneSession

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

Instance Attribute Summary

Attributes inherited from ShellSession

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

Instance Method Summary collapse

Methods inherited from ShellSession

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

Constructor Details

This class inherits a constructor from Shell::ShellSession

Instance Method Details

#rebuild_contextObject



148
149
150
151
152
# File 'lib/chef/shell/shell_session.rb', line 148

def rebuild_context
  cookbook_collection = Chef::CookbookCollection.new({})
  @run_context = Chef::RunContext.new(@node, cookbook_collection, @events) # no recipes
  @run_context.load(Chef::RunList::RunListExpansionFromDisk.new("_default", [])) # empty recipe list
end