Class: Chef::RunList::RunListExpansionFromCouchDB

Inherits:
RunListExpansion show all
Defined in:
lib/chef/run_list/run_list_expansion.rb

Overview

Expand a run list from couchdb. Used in chef-server-api

Instance Attribute Summary

Attributes inherited from RunListExpansion

#default_attrs, #errors, #override_attrs, #recipes, #run_list_items, #source

Instance Method Summary collapse

Methods inherited from RunListExpansion

#applied_role, #applied_role?, #apply_role_attributes, #errors?, #expand, #inflate_role, #initialize, #role_not_found, #roles

Constructor Details

This class inherits a constructor from Chef::RunList::RunListExpansion

Instance Method Details

#couchdbObject



160
161
162
# File 'lib/chef/run_list/run_list_expansion.rb', line 160

def couchdb
  source
end

#fetch_role(name) ⇒ Object



164
165
166
167
168
# File 'lib/chef/run_list/run_list_expansion.rb', line 164

def fetch_role(name)
  Chef::Role.cdb_load(name, couchdb)
rescue Chef::Exceptions::CouchDBNotFound
  role_not_found(name)
end