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-0.8.1 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.8.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.7.6 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.7.5 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.7.4 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.7.3 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.7.2 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.6.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.5.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.4.1 lib/fog/aws/parsers/rds/describe_db_log_files.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.4.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.3.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.2.2 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.2.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.1.2 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.1.1 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.1.0 lib/fog/aws/parsers/rds/describe_db_log_files.rb
fog-aws-0.0.8 lib/fog/aws/parsers/rds/describe_db_log_files.rb