Sha256: 2022efcd3106cd549b5f8e13b2911749af372dc8f7f32d972308c4523fffe088

Contents?: true

Size: 989 Bytes

Versions: 32

Compression:

Stored size: 989 Bytes

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)

    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 )

    end

    def read
        @rds.parameter_groups.select { |g| g.id == "#{@options[:name]}" }.first
    end

    alias_method :fog_object, :read

    def delete

        return unless exists?

        @log.info( "Deleting DB Parameter Group #{@options[:name]}" )

        puts fog_object.inspect
        fog_object.destroy

    end

end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
build-cloud-1.1.7 lib/build-cloud/dbparameters.rb
build-cloud-1.1.6 lib/build-cloud/dbparameters.rb
build-cloud-1.1.5 lib/build-cloud/dbparameters.rb
build-cloud-1.1.4 lib/build-cloud/dbparameters.rb
build-cloud-1.1.3 lib/build-cloud/dbparameters.rb
build-cloud-1.1.2 lib/build-cloud/dbparameters.rb
build-cloud-1.0.1 lib/build-cloud/dbparameters.rb
build-cloud-1.1.1 lib/build-cloud/dbparameters.rb
build-cloud-1.0.0 lib/build-cloud/dbparameters.rb
build-cloud-0.0.24 lib/build-cloud/dbparameters.rb
build-cloud-0.0.23 lib/build-cloud/dbparameters.rb
build-cloud-0.0.22 lib/build-cloud/dbparameters.rb
build-cloud-0.0.21 lib/build-cloud/dbparameters.rb
build-cloud-0.0.20 lib/build-cloud/dbparameters.rb
build-cloud-0.0.19 lib/build-cloud/dbparameters.rb
build-cloud-0.0.18 lib/build-cloud/dbparameters.rb
build-cloud-0.0.17 lib/build-cloud/dbparameters.rb
build-cloud-0.0.16 lib/build-cloud/dbparameters.rb
build-cloud-0.0.15 lib/build-cloud/dbparameters.rb
build-cloud-0.0.14 lib/build-cloud/dbparameters.rb