Sha256: a2661705c1b9bf2be0de12ed872d0bc08513ffa4a1b3c02d034471d5207d8d23

Contents?: true

Size: 998 Bytes

Versions: 8

Compression:

Stored size: 998 Bytes

Contents

module Fog
  module Parsers
    module AWS
      module Compute

        class DescribeReservedInstancesOfferings < Fog::Parsers::Base

          def reset
            @reserved_instances_offering = {}
            @response = { 'reservedInstancesOfferingsSet' => [] }
          end

          def end_element(name)
            case name
            when 'availabilityZone', 'instanceType', 'productDescription', 'reservedInstancesOfferingId'
              @reserved_instances_offering[name] = @value
            when 'duration'
              @reserved_instances_offering[name] = @value.to_i
            when 'fixedPrice', 'usagePrice'
              @reserved_instances_offering[name] = @value.to_f
            when 'item'
              @response['reservedInstancesOfferingsSet'] << @reserved_instances_offering
              @reserved_instances_offering = {}
            when 'requestId'
              @response[name] = @value
            end
          end

        end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fog-0.7.2 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.7.1 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.7.0 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.6.0 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.5.3 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.5.2 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.5.1 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb
fog-0.5.0 lib/fog/compute/parsers/aws/describe_reserved_instances_offerings.rb