Sha256: 6f17aebbcf05d219a505110d7fc33c5286415b22d966559ef7ec4637258a2d43

Contents?: true

Size: 1010 Bytes

Versions: 29

Compression:

Stored size: 1010 Bytes

Contents

module Fog
  module Parsers
    module Compute
      module AWS

        class DescribeReservedInstances < Fog::Parsers::Base

          def reset
            @reserved_instance = {}
            @response = { 'reservedInstancesSet' => [] }
          end

          def end_element(name)
            case name
            when 'availabilityZone', 'instanceType', 'productDescription', 'reservedInstancesId', 'state'
              @reserved_instance[name] = value
            when 'duration', 'instanceCount'
              @reserved_instance[name] = value.to_i
            when 'fixedPrice', 'usagePrice'
              @reserved_instance[name] = value.to_f
            when 'item'
              @response['reservedInstancesSet'] << @reserved_instance
              @reserved_instance = {}
            when 'requestId'
              @response[name] = value
            when 'start'
              @reserved_instance[name] = Time.parse(value)
            end
          end

        end

      end
    end
  end
end

Version data entries

29 entries across 29 versions & 7 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
michiels-fog-1.3.1 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog-1.3.1 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog-1.3.0 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog-1.2.0 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
ktheory-fog-1.1.2 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog-1.1.2 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog_tractical-1.1.4 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog_tractical-1.1.3 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog-1.1.1 lib/fog/aws/parsers/compute/describe_reserved_instances.rb
fog-1.1.0 lib/fog/aws/parsers/compute/describe_reserved_instances.rb