Sha256: afaa6c093a94c058f5c4e6e51d1dd7c2e86c2131a433b8ada2f568aefa56efca

Contents?: true

Size: 1.01 KB

Versions: 32

Compression:

Stored size: 1.01 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', '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
              @reserved_instances_offering = {}
            when 'requestId'
              @response[name] = value
            end
          end

        end

      end
    end
  end
end

Version data entries

32 entries across 32 versions & 8 rubygems

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