Module: Toft

Defined in:
lib/toft.rb,
lib/toft/node.rb,
lib/toft/version.rb,
lib/toft/file_checker.rb,
lib/toft/node_controller.rb,
lib/toft/chef/chef_runner.rb,
lib/toft/chef/chef_attributes.rb

Defined Under Namespace

Modules: Chef Classes: ChefAttributes, FileChecker, Node, NodeController

Constant Summary collapse

VERSION =
"0.0.2"

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.cookbook_pathObject

Returns the value of attribute cookbook_path.



8
9
10
# File 'lib/toft.rb', line 8

def cookbook_path
  @cookbook_path
end

.role_pathObject

Returns the value of attribute role_path.



8
9
10
# File 'lib/toft.rb', line 8

def role_path
  @role_path
end

Instance Method Details

#create_node(hostname, ip) ⇒ Object



11
12
13
# File 'lib/toft.rb', line 11

def create_node(hostname, ip)
  NodeController.instance.create_node(hostname, ip)
end

#destroy_node(hostname) ⇒ Object



19
20
21
# File 'lib/toft.rb', line 19

def destroy_node(hostname)
  NodeController.instance.destroy_node(hostname)
end

#find(hostname) ⇒ Object



15
16
17
# File 'lib/toft.rb', line 15

def find(hostname)
  NodeController.instance.nodes[hostname]
end

#node_countObject



23
24
25
# File 'lib/toft.rb', line 23

def node_count
  NodeController.instance.nodes.size
end