Class: Ironfan::Dsl::Rds

Inherits:
Cloud show all
Defined in:
lib/ironfan/dsl/rds.rb,
lib/ironfan/headers.rb

Defined Under Namespace

Classes: SecurityGroup

Instance Attribute Summary

Attributes included from Gorillib::Resolution

#underlay

Instance Method Summary collapse

Methods inherited from Cloud

#defaults, receive

Methods inherited from Ironfan::Dsl

#_skip_fields, #skip_fields, #to_manifest

Methods included from Gorillib::Resolution

#deep_resolve, #merge_resolve, #merge_values, #read_resolved_attribute, #read_set_attribute, #read_set_or_underlay_attribute, #read_underlay_attribute, #resolve, #resolve!, #resolve_value

Methods included from CookbookRequirements

#_cookbook_reqs, #children, #cookbook_req, #cookbook_reqs, #join_req

Methods inherited from Builder

ui, #ui

Instance Method Details

#default_portObject



46
47
48
49
50
# File 'lib/ironfan/dsl/rds.rb', line 46

def default_port
  return 3306 if engine == "MySQL"
  return 1521 if ["oracle-se1", "oracle-se", "oracle-ee"].include?(engine)
  return 1433 if ["sqlserver-ee", "sqlserver-se", "sqlserver-ex", "sqlserver-web"].include?(engine)
end

#implied_volumesObject

This is a dummy function to fill Ironfan’s requirements.



42
43
44
# File 'lib/ironfan/dsl/rds.rb', line 42

def implied_volumes
  []
end

#receive_provider(obj) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/ironfan/dsl/rds.rb', line 33

def receive_provider(obj)
  if obj.is_a?(String)
    write_attribute :provider, Gorillib::Inflector.constantize(Gorillib::Inflector.camelize(obj.gsub(/\./, '/')))
  else
    super(obj)
  end
end

#to_display(style, values = {}) ⇒ Object



52
53
54
55
56
57
58
59
60
61
# File 'lib/ironfan/dsl/rds.rb', line 52

def to_display(style,values={})
  return values if style == :minimal

  values["Engine"] =            engine
  values["AZ"] =                default_availability_zone
  return values if style == :default

#        values["Public IP"] =        elastic_ip if elastic_ip
  values
end