Class: Topo::Provision::MachineImageGenerator

Inherits:
MachineGenerator show all
Defined in:
lib/topo/provision/generators/machine_image.rb

Direct Known Subclasses

AwsMachineImageGenerator

Instance Attribute Summary collapse

Attributes inherited from ResourceGenerator

#name, #resource_attributes, #resource_type, #undeploy_action

Instance Method Summary collapse

Methods inherited from MachineGenerator

#stop

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) ⇒ MachineImageGenerator

Returns a new instance of MachineImageGenerator.



31
32
33
34
35
36
37
38
39
# File 'lib/topo/provision/generators/machine_image.rb', line 31

def initialize(data)
  @resource_type ||= "machine_image"
  super
  @name = data['name'] + "_image"
  @template_base_name = "machine"
  # Note: specific driver may need to convert image options to symbols
  opts = data['provisioning']['image_options']
  @resource_attributes["image_options"] = opts if opts
end

Instance Attribute Details

#lazy_attributesObject (readonly)

Returns the value of attribute lazy_attributes.



29
30
31
# File 'lib/topo/provision/generators/machine_image.rb', line 29

def lazy_attributes
  @lazy_attributes
end

#machine_optionsObject (readonly)

Returns the value of attribute machine_options.



29
30
31
# File 'lib/topo/provision/generators/machine_image.rb', line 29

def machine_options
  @machine_options
end

#normal_attributesObject (readonly)

Returns the value of attribute normal_attributes.



29
30
31
# File 'lib/topo/provision/generators/machine_image.rb', line 29

def normal_attributes
  @normal_attributes
end