Sha256: fd14d4b87d17569a0c3452c207a61664d0609180c5052a8ae3cff5768c5c1f8f
Contents?: true
Size: 1.3 KB
Versions: 32
Compression:
Stored size: 1.3 KB
Contents
class BuildCloud::DbParameterGroup include ::BuildCloud::Component @@objects = [] def initialize ( fog_interfaces, log, options = {} ) @rds = fog_interfaces[:rds] @log = log @options = options @log.debug( options.inspect ) required_options(:family, :description, :id, :params) end def create return if exists? @log.info( "Creating DB Parameter Group #{@options[:id]}" ) options = @options.dup param_group = @rds.create_db_parameter_group(options[:id], options[:family], options[:description]) @log.debug( param_group.inspect ) params = @rds.modify_db_parameter_group options[:id], options[:params].collect! { |c| { 'ParameterName' => c[:param_name], 'ParameterValue' => c[:param_value], 'ApplyMethod' => c[:apply_method], } } @log.debug( params.inspect ) end def read @rds.parameter_groups.select { |g| g.id == "#{@options[:id]}".downcase }.first end alias_method :fog_object, :read def delete return unless exists? @log.info( "Deleting DB Parameter Group #{@options[:id]}" ) puts fog_object.inspect fog_object.destroy end end
Version data entries
32 entries across 32 versions & 1 rubygems