Sha256: e290032128ca3735f44e83d99e904d827c4153dc83baccc817c7fdc134b6d429

Contents?: true

Size: 1.06 KB

Versions: 53

Compression:

Stored size: 1.06 KB

Contents

module Fog
  module Parsers
    module Compute
      module AWS
        class DescribeReservedInstancesOfferings < Fog::Parsers::Base
          def reset
            @reserved_instances_offering = {}
            @response = { 'reservedInstancesOfferingsSet' => [] }
          end

          def end_element(name)
            case name
            when 'availabilityZone', 'currencyCode', 'instanceType', 'offeringType', 'instanceTenancy', '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 unless @reserved_instances_offering.empty?
              @reserved_instances_offering = {}
            when 'requestId'
              @response[name] = value
            end
          end
        end
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 5 rubygems

Version Path
fog-aws-1.4.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-1.3.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-1.2.1 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-1.2.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-1.1.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-1.0.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.13.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.12.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.11.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.10.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.9.4 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.9.3 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.9.2 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.9.1 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.9.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.8.1 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.8.0 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.7.6 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb
fog-aws-0.7.5 lib/fog/aws/parsers/compute/describe_reserved_instances_offerings.rb