Class: Topo::Provision::ChefNodeGenerator

Inherits:
ResourceGenerator show all
Defined in:
lib/topo/provision/generators/chef_node.rb

Instance Attribute Summary

Attributes inherited from ResourceGenerator

#name, #resource_attributes, #resource_type, #undeploy_action

Instance Method Summary collapse

Methods inherited from ResourceGenerator

#default_action, #default_resource_template, #deploy, #do_action, #template, #template_root_dir, #undeploy

Methods included from Topo::ParseGen

#convert_keys_to_sym, #convert_keys_to_sym_deep, #expand_ref, #lazy_attribute_to_s, #topo_refs, #value_from_path

Constructor Details

#initialize(data) ⇒ ChefNodeGenerator

Returns a new instance of ChefNodeGenerator.



25
26
27
28
29
30
31
# File 'lib/topo/provision/generators/chef_node.rb', line 25

def initialize(data)
  @resource_type ||= "chef_node"
  super
  %w[run_list chef_environment tags attributes].each do |key|
    @resource_attributes[key] = data[key] if data.key? key
  end
end