Class: ChefMetal::ConvergenceStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/chef_metal/convergence_strategy.rb,
lib/chef_metal/convergence_strategy/install_sh.rb,
lib/chef_metal/convergence_strategy/install_msi.rb,
lib/chef_metal/convergence_strategy/no_converge.rb,
lib/chef_metal/convergence_strategy/install_cached.rb,
lib/chef_metal/convergence_strategy/precreate_chef_objects.rb

Direct Known Subclasses

NoConverge, PrecreateChefObjects

Defined Under Namespace

Classes: InstallCached, InstallMsi, InstallSh, NoConverge, PrecreateChefObjects

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(convergence_options, config) ⇒ ConvergenceStrategy

convergence_options - a freeform hash of options to the converger. config - a Chef::Config-like object with global config like :log_level



5
6
7
8
# File 'lib/chef_metal/convergence_strategy.rb', line 5

def initialize(convergence_options, config)
  @convergence_options = convergence_options || {}
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



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

def config
  @config
end

#convergence_optionsObject (readonly)

Returns the value of attribute convergence_options.



10
11
12
# File 'lib/chef_metal/convergence_strategy.rb', line 10

def convergence_options
  @convergence_options
end

Instance Method Details

#cleanup_convergence(action_handler, machine_spec) ⇒ Object



22
23
24
# File 'lib/chef_metal/convergence_strategy.rb', line 22

def cleanup_convergence(action_handler, machine_spec)
  raise "cleanup_convergence not overridden on #{self.class}"
end

#converge(action_handler, machine) ⇒ Object



18
19
20
# File 'lib/chef_metal/convergence_strategy.rb', line 18

def converge(action_handler, machine)
  raise "converge not overridden on #{self.class}"
end

#setup_convergence(action_handler, machine) ⇒ Object

Get the machine ready to converge, but do not converge.



14
15
16
# File 'lib/chef_metal/convergence_strategy.rb', line 14

def setup_convergence(action_handler, machine)
  raise "setup_convergence not overridden on #{self.class}"
end