Sha256: 812622c5164abded9e4dcba92e9595a338584b5bc9366038078fde4462ee89fc

Contents?: true

Size: 953 Bytes

Versions: 10

Compression:

Stored size: 953 Bytes

Contents

module Fog
  module Parsers
    module Compute
      module AWS
        class DescribeVolumesModifications < Fog::Parsers::Base
          def reset
            @response     = { 'volumeModificationSet' => [] }
            @modification = {}
          end

          def end_element(name)
            case name
            when 'modificationState', 'originalVolumeType', 'statusMessage', 'targetVolumeType', 'volumeId'
              @modification[name] = value
            when 'startTime', 'endTime'
              @modification[name] = Time.parse(value)
            when 'originalIops', 'originalSize', 'progress', 'targetIops', 'targetSize'
              @modification[name] = value.to_i
            when 'requestId'
              @response[name] = value
            when 'item'
              @response['volumeModificationSet'] << @modification.dup
              @modification = {}
            end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 8 versions & 2 rubygems

Version Path
fog-aws-3.1.0 lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aws-2.0.1/lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aws-2.0.1/lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aws-2.0.1/lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
fog-aws-3.0.0 lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
fog-aws-2.0.1 lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
fog-aws-2.0.0 lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
fog-aws-1.4.1 lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
fog-aws-1.4.0 lib/fog/aws/parsers/compute/describe_volumes_modifications.rb
fog-aws-1.3.0 lib/fog/aws/parsers/compute/describe_volumes_modifications.rb