Class: Shell::ClientSession
- Inherits:
-
ShellSession
- Object
- ShellSession
- Shell::ClientSession
- Defined in:
- lib/chef/shell/shell_session.rb
Direct Known Subclasses
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, session_type
Constructor Details
This class inherits a constructor from Shell::ShellSession
Instance Method Details
#definitions ⇒ Object
200 201 202 |
# File 'lib/chef/shell/shell_session.rb', line 200 def definitions @run_context.definitions end |
#rebuild_context ⇒ Object
208 209 210 211 212 213 214 215 216 |
# File 'lib/chef/shell/shell_session.rb', line 208 def rebuild_context @run_status = Chef::RunStatus.new(@node, @events) Chef::Cookbook::FileVendor.fetch_from_remote(Chef::ServerAPI.new(Chef::Config[:chef_server_url])) cookbook_hash = @client.sync_cookbooks cookbook_collection = Chef::CookbookCollection.new(cookbook_hash) @run_context = Chef::RunContext.new(node, cookbook_collection, @events) @run_context.load(@node.run_list.(@node.chef_environment)) @run_status.run_context = run_context end |
#save_node ⇒ Object
204 205 206 |
# File 'lib/chef/shell/shell_session.rb', line 204 def save_node @client.save_node end |