class Chef::RunList::RunListExpansionFromAPI
Expand a run list from the chef-server API.
Public Instance Methods
Source
# File lib/chef/run_list/run_list_expansion.rb, line 221 def fetch_role(name, included_by) Chef::Role.from_hash(rest.get("roles/#{name}")) rescue Net::HTTPClientException => 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
Source
# File lib/chef/run_list/run_list_expansion.rb, line 217 def rest @rest ||= (source || Chef::ServerAPI.new(Chef::Config[:chef_server_url])) end