Class: Shef::ClientSession
- Inherits:
-
SoloSession
- Object
- ShefSession
- SoloSession
- Shef::ClientSession
- Defined in:
- lib/chef/shef/shef_session.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from ShefSession
#client, #compile, #node, #node_attributes, #recipe, #run_context
Instance Method Summary collapse
Methods inherited from SoloSession
Methods inherited from ShefSession
#cookbook_loader, #definitions, #initialize, inspect, #node_built?, #reset!, #resource_collection, session_type
Constructor Details
This class inherits a constructor from Shef::ShefSession
Instance Method Details
#rebuild_context ⇒ Object
191 192 193 194 195 196 197 198 |
# File 'lib/chef/shef/shef_session.rb', line 191 def rebuild_context @run_status = Chef::RunStatus.new(@node) Chef::Cookbook::FileVendor.on_create { |manifest| Chef::Cookbook::RemoteFileVendor.new(manifest, Chef::REST.new(Chef::Config[:server_url])) } cookbook_hash = @client.sync_cookbooks @run_context = Chef::RunContext.new(node, Chef::CookbookCollection.new(cookbook_hash)) @run_context.load(Chef::RunList::RunListExpansionFromAPI.new("_default", [])) @run_status.run_context = run_context end |
#save_node ⇒ Object
187 188 189 |
# File 'lib/chef/shef/shef_session.rb', line 187 def save_node @client.save_node end |