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/command_executor.rb,
lib/toft/chef/chef_attributes.rb,
lib/toft/puppet/puppet_runner.rb

Defined Under Namespace

Modules: Chef, CommandExecutor, Puppet Classes: ChefAttributes, CommandExecutionError, CommandResult, FileChecker, Node, NodeController

Constant Summary collapse

DYNAMIC_IP =
"0.0.0.0"
DOMAIN =
"foo"
VERSION =
"0.0.13"

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.cookbook_pathObject

Returns the value of attribute cookbook_path.



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

def cookbook_path
  @cookbook_path
end

.data_bag_pathObject

Returns the value of attribute data_bag_path.



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

def data_bag_path
  @data_bag_path
end

.manifest_pathObject

Returns the value of attribute manifest_path.



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

def manifest_path
  @manifest_path
end

.role_pathObject

Returns the value of attribute role_path.



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

def role_path
  @role_path
end

Instance Method Details

#create_node(hostname, options = {}) ⇒ Object



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

def create_node(hostname, options = {})
  NodeController.instance.create_node(hostname, options)
end

#destroy_node(hostname) ⇒ Object



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

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

#find(name) ⇒ Object



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

def find(name)
  return NodeController.instance.nodes if name === :all
  NodeController.instance.nodes[name] if name.is_a? String
end