lib/chef_metal/machine.rb in chef-metal-0.10.2 vs lib/chef_metal/machine.rb in chef-metal-0.11.beta

- old
+ new

@@ -1,20 +1,28 @@ module ChefMetal class Machine - def initialize(node) - @node = node + def initialize(machine_spec) + @machine_spec = machine_spec end - attr_reader :node + attr_reader :machine_spec + def name + machine_spec.name + end + + def node + machine_spec.node + end + # Sets up everything necessary for convergence to happen on the machine. # The node MUST be saved as part of this procedure. Other than that, # nothing is guaranteed except that converge() will work when this is done. - def setup_convergence(action_handler, machine_resource) + def setup_convergence(action_handler) raise "setup_convergence not overridden on #{self.class}" end - def converge(action_handler, chef_server) + def converge(action_handler) raise "converge not overridden on #{self.class}" end def execute(action_handler, command, options = {}) raise "execute not overridden on #{self.class}"