Class: Shell::SoloLegacySession
- Inherits:
-
ShellSession
- Object
- ShellSession
- Shell::SoloLegacySession
- 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, #initialize, inspect, #node_built?, #reset!, #resource_collection, #save_node, session_type
Constructor Details
This class inherits a constructor from Shell::ShellSession
Instance Method Details
#definitions ⇒ Object
170 171 172 |
# File 'lib/chef/shell/shell_session.rb', line 170 def definitions @run_context.definitions end |
#rebuild_context ⇒ Object
174 175 176 177 178 179 180 181 182 183 |
# File 'lib/chef/shell/shell_session.rb', line 174 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 |