Module: Convection::DSL::Cloudfile

Includes:
Helpers
Included in:
Model::Cloudfile
Defined in:
lib/convection/model/cloudfile.rb

Overview

DSL for Cloudfile

Instance Method Summary collapse

Methods included from Helpers

#camel_case, included, method_name, #screaming_snake_case, #snake_case

Methods included from IntrinsicFunctions

#base64, #find_in_map, #fn_and, #fn_equals, #fn_if, #fn_import_value, #fn_not, #fn_or, #fn_ref, #fn_sub, #get_att, #get_azs, included, #join, mixers, #select

Instance Method Details

#attribute(stack, key, value) ⇒ Object



27
28
29
# File 'lib/convection/model/cloudfile.rb', line 27

def attribute(stack, key, value)
  @attributes.set(stack, key, value)
end

#stack(stack_name, template, options = {}, &block) ⇒ Object

Adds a stack with the provided options to the list of stacks.



34
35
36
37
38
39
40
41
42
43
# File 'lib/convection/model/cloudfile.rb', line 34

def stack(stack_name, template, options = {}, &block)
  options[:region] ||= region
  options[:exclude_availability_zones] = exclude_availability_zones unless exclude_availability_zones.nil?
  options[:cloud] = name
  options[:attributes] = attributes
  options[:retry_limit] = retry_limit

  @stacks[stack_name] = Control::Stack.new(stack_name, template, options, &block)
  @deck << @stacks[stack_name]
end

#stack_group(group_name, group_list) ⇒ Object



45
46
47
# File 'lib/convection/model/cloudfile.rb', line 45

def stack_group(group_name, group_list)
  @stack_groups[group_name] = group_list
end

#template(*args, &block) ⇒ Object

Helper to define a template in-line



23
24
25
# File 'lib/convection/model/cloudfile.rb', line 23

def template(*args, &block)
  Model::Template.new(*args, &block)
end