class Chef::RunList::RunListExpansionFromAPI
Expand a run list from the chef-server API.
Public Instance Methods
fetch_role(name, included_by)
click to toggle source
# File lib/chef/run_list/run_list_expansion.rb, line 218 def fetch_role(name, included_by) Chef::Role.from_hash(rest.get("roles/#{name}")) rescue Net::HTTPServerException => e if e.message == '404 "Not Found"' role_not_found(name, included_by) else raise end rescue Exception => e @role_errors[name] = e.to_s raise end
rest()
click to toggle source
# File lib/chef/run_list/run_list_expansion.rb, line 214 def rest @rest ||= (source || Chef::ServerAPI.new(Chef::Config[:chef_server_url])) end