Sha256: 09548401aa35ad47db5589488a6fae5d1ef4713bdb58d28eeb3656fdbebc2447

Contents?: true

Size: 1.21 KB

Versions: 98

Compression:

Stored size: 1.21 KB

Contents

module Fog
  module Parsers
    module AWS
      module RDS
        class DescribeDBLogFiles < Fog::Parsers::Base
          attr_reader :rds_id

          def initialize(rds_id)
            @rds_id = rds_id
            super()
          end

          def reset
            @response = { 'DescribeDBLogFilesResult' => {'DBLogFiles' => []}, 'ResponseMetadata' => {} }
            fresh_log_file
          end

          def fresh_log_file
            @db_log_file = {'DBInstanceIdentifier' => @rds_id}
          end

          def start_element(name, attrs = [])
            super
          end

          def end_element(name)
            case name
            when 'LastWritten' then @db_log_file[name] = Time.at(value.to_i / 1000)
            when 'LogFileName' then @db_log_file[name] = value
            when 'Size' then @db_log_file[name] = value.to_i
            when 'DescribeDBLogFilesDetails'
              @response['DescribeDBLogFilesResult']['DBLogFiles'] << @db_log_file
              fresh_log_file
            when 'Marker' then @response['DescribeDBLogFilesResult'][name] = value
            when 'RequestId' then @response['ResponseMetadata'][name] = value
            end
          end
        end
      end
    end
  end
end

Version data entries

98 entries across 96 versions & 6 rubygems

Version Path
fog-aws-3.30.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.29.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.28.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.27.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.26.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.25.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.24.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.23.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.22.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.21.1 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.21.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.20.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.19.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.18.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.17.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.16.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.15.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.14.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.13.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-3.12.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb