1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|compute] fixed sopt_instance_request reply parsing when the original

request contained a device mapping.
This commit is contained in:
MaF 2011-10-10 12:55:21 +02:00
parent d614c12d69
commit db6344f0de

View file

@ -6,7 +6,7 @@ module Fog
class SpotInstanceRequests < Fog::Parsers::Base class SpotInstanceRequests < Fog::Parsers::Base
def reset def reset
@block_device_mapping = [] @block_device_mapping = {}
@context = [] @context = []
@contexts = ['blockDeviceMapping', 'groupSet'] @contexts = ['blockDeviceMapping', 'groupSet']
@spot_instance_request = { 'launchSpecification' => { 'blockDeviceMapping' => [], 'groupSet' => [] } } @spot_instance_request = { 'launchSpecification' => { 'blockDeviceMapping' => [], 'groupSet' => [] } }
@ -42,7 +42,7 @@ module Fog
when 'item' when 'item'
case @context.last case @context.last
when 'blockDeviceMapping' when 'blockDeviceMapping'
@instance['blockDeviceMapping'] << @block_device_mapping @spot_instance_request['launchSpecification']['blockDeviceMapping'] << @block_device_mapping
@block_device_mapping = {} @block_device_mapping = {}
when nil when nil
@response['spotInstanceRequestSet'] << @spot_instance_request @response['spotInstanceRequestSet'] << @spot_instance_request