class Shell::SoloLegacySession
Public Instance Methods
definitions()
click to toggle source
# File lib/chef/shell/shell_session.rb, line 170 def definitions @run_context.definitions end
rebuild_context()
click to toggle source
# 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
Private Instance Methods
rebuild_node()
click to toggle source
# File lib/chef/shell/shell_session.rb, line 187 def rebuild_node # Tell the client we're chef solo so it won't try to contact the server Chef::Config[:solo_legacy_mode] = true @client = Chef::Client.new(json_configuration, Chef::Config[:shell_config]) @client.run_ohai @client.load_node @client.build_node end