Sha256: c2d7bc4000d815e06afa62f387fbea48e1c461c58ded4dd8c8b0f0a58811355a
Contents?: true
Size: 1022 Bytes
Versions: 7
Compression:
Stored size: 1022 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', 'offeringType' @reserved_instance[name] = value when 'duration', 'instanceCount' @reserved_instance[name] = value.to_i when 'fixedPrice', 'amount' @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
7 entries across 7 versions & 4 rubygems