Sha256: 9f38221a8ae397bb449dcb2fda6bd1d5e22fd6db81a7c71764b041116a4e0361

Contents?: true

Size: 991 Bytes

Versions: 16

Compression:

Stored size: 991 Bytes

Contents

require 'fog/core/collection'
require 'fog/aws/models/rds/parameter'

module Fog
  module AWS
    class RDS
      class Parameters < Fog::Collection
        attribute :group
        attribute :filters
        model Fog::AWS::RDS::Parameter

        def initialize(attributes)
          self.filters ||= {}
          if attributes[:source]
            filters[:source] = attributes[:source]
          end
          super
        end

        def all(filters = filters)
          self.filters = filters
          result = []
          marker = nil
          finished = false
          while !finished
            data = service.describe_db_parameters(group.id, filters.merge(:marker => marker)).body
            result.concat(data['DescribeDBParametersResult']['Parameters'])
            marker = data['DescribeDBParametersResult']['Marker']
            finished = marker.nil?
          end
          load(result) # data is an array of attribute hashes
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/models/rds/parameters.rb
fog-1.26.0 lib/fog/aws/models/rds/parameters.rb
fog-1.25.0 lib/fog/aws/models/rds/parameters.rb
nsidc-fog-1.24.1 lib/fog/aws/models/rds/parameters.rb
fog-1.24.0 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.11 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.10 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.9 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.8 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.7 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.6 lib/fog/aws/models/rds/parameters.rb
fog-1.23.0 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.4 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.3 lib/fog/aws/models/rds/parameters.rb
ns-fog-1.22.2 lib/fog/aws/models/rds/parameters.rb
fog-1.22.1 lib/fog/aws/models/rds/parameters.rb