Sha256: 1d3095a46ed5d128b7398ecfc9b876715433e0b4a2bdd2a86982076f890cde2f

Contents?: true

Size: 1.43 KB

Versions: 38

Compression:

Stored size: 1.43 KB

Contents

module Fog
  module Parsers
    module AWS
      module RDS
        class SnapshotParser < Fog::Parsers::Base
          def reset
            @db_snapshot = fresh_snapshot
          end

          def fresh_snapshot
            {}
          end

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

          def end_element(name)
            case name
            when 'AllocatedStorage' then @db_snapshot['AllocatedStorage'] = value.to_i
            when 'AvailabilityZone' then @db_snapshot['AvailabilityZone'] = value
            when 'DBInstanceIdentifier' then @db_snapshot['DBInstanceIdentifier'] = value
            when 'DBSnapshotIdentifier' then @db_snapshot['DBSnapshotIdentifier'] = value
            when 'Engine' then @db_snapshot['Engine'] = value
            when 'EngineVersion' then @db_snapshot['EngineVersion'] = value
            when 'InstanceCreateTime' then @db_snapshot['InstanceCreateTime'] = Time.parse value
            when 'Iops' then @db_snapshot['Iops'] = value
            when 'MasterUsername' then @db_snapshot['MasterUsername'] = value
            when 'Port' then @db_snapshot['Port'] = value.to_i
            when 'SnapshotCreateTime' then @db_snapshot['SnapshotCreateTime'] = Time.parse value
            when 'SnapshotType' then @db_snapshot['SnapshotType'] = value
            when 'Status' then @db_snapshot['Status'] = value
            end
          end
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 5 rubygems

Version Path
fog-aws-0.8.1 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.8.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.7.6 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.7.5 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.7.4 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.7.3 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.7.2 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.6.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.5.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.4.1 lib/fog/aws/parsers/rds/snapshot_parser.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.4.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.3.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.2.2 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.2.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.1.2 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.1.1 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.1.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-aws-0.0.8 lib/fog/aws/parsers/rds/snapshot_parser.rb