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_not, #fn_or, #fn_ref, #get_att, #get_azs, #join, #select

Instance Method Details

#attribute(stack, key, value) ⇒ Object



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

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.



30
31
32
33
34
35
36
37
# File 'lib/convection/model/cloudfile.rb', line 30

def stack(stack_name, template, options = {}, &block)
  options[:region] ||= region
  options[:cloud] = name
  options[:attributes] = attributes

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

#stack_group(group_name, group_list) ⇒ Object



39
40
41
# File 'lib/convection/model/cloudfile.rb', line 39

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



19
20
21
# File 'lib/convection/model/cloudfile.rb', line 19

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