Sha256: c90320f50df3760561d52dff76b4580c74fe7802c38245a392bd7f82c3caca95

Contents?: true

Size: 1.33 KB

Versions: 38

Compression:

Stored size: 1.33 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 'Status' then @db_snapshot['Status'] = value
            end
          end
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 9 rubygems

Version Path
fog-1.5.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
rackspace-fog-1.4.2 lib/rackspace-fog/aws/parsers/rds/snapshot_parser.rb
fog-1.4.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
michiels-fog-1.3.1 lib/fog/aws/parsers/rds/snapshot_parser.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-1.3.1 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-1.3.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-1.2.0 lib/fog/aws/parsers/rds/snapshot_parser.rb
ktheory-fog-1.1.2 lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/rds/snapshot_parser.rb
fog-1.1.2 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog_tractical-1.1.4 lib/fog/aws/parsers/rds/snapshot_parser.rb
fog_tractical-1.1.3 lib/fog/aws/parsers/rds/snapshot_parser.rb