Sha256: fc926417bd2ffc7a9b3e8cf45d8de4f9a1c745d7a1bbaea8151ed9673ecd4d40

Contents?: true

Size: 1.4 KB

Versions: 71

Compression:

Stored size: 1.4 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 '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

71 entries across 71 versions & 11 rubygems

Version Path
fog-maestrodev-1.19.0.20140212012611 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-1.19.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/aws/parsers/rds/snapshot_parser.rb