Class: Ironfan::Provider::ChefServer

Inherits:
Ironfan::Provider show all
Defined in:
lib/ironfan/headers.rb,
lib/ironfan/provider/chef.rb,
lib/ironfan/provider/chef/node.rb,
lib/ironfan/provider/chef/role.rb,
lib/ironfan/provider/chef/client.rb

Defined Under Namespace

Classes: Client, Node, Role

Class Method Summary collapse

Methods inherited from Ironfan::Provider

aggregate!, forget!, load, prepare!, receive, #resources, validate

Methods inherited from Builder

ui, #ui

Class Method Details

.post_rest(type, content, options = {}) ⇒ Object

Utility functions


14
15
16
17
18
19
20
21
# File 'lib/ironfan/provider/chef.rb', line 14

def self.post_rest(type, content, options={})
  params = [ Chef::Config[:chef_server_url] ]
  if options[:client]
    params << options[:client].name
    params << options[:client].key_filename
  end
  Chef::REST.new(*params).post_rest(type,content)
end

.resourcesObject


7
8
9
# File 'lib/ironfan/provider/chef.rb', line 7

def self.resources
  [ Client, Node, Role ]
end

.search(*params, &block) ⇒ Object


23
24
25
# File 'lib/ironfan/provider/chef.rb', line 23

def self.search(*params,&block)
  Chef::Search::Query.new.search(*params,&block)
end