mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Merge pull request #3092 from goruha/DescribeInstancesResponse-SAX-parcer-fix
Fix parsing of SpotInstanceRequests responce when we also specify NetworkInterface
This commit is contained in:
commit
0e581b6189
1 changed files with 4 additions and 2 deletions
|
@ -6,7 +6,7 @@ module Fog
|
|||
def reset
|
||||
@block_device_mapping = {}
|
||||
@context = []
|
||||
@contexts = ['blockDeviceMapping', 'groupSet', 'iamInstanceProfile']
|
||||
@contexts = ['blockDeviceMapping', 'groupSet', 'iamInstanceProfile', 'networkInterfaceSet']
|
||||
@spot_instance_request = { 'launchSpecification' => { 'iamInstanceProfile' => {}, 'blockDeviceMapping' => [], 'groupSet' => [] } }
|
||||
@response = { 'spotInstanceRequestSet' => [] }
|
||||
end
|
||||
|
@ -34,7 +34,9 @@ module Fog
|
|||
when 'deviceName', 'status', 'volumeId'
|
||||
@block_device_mapping[name] = value
|
||||
when 'groupId'
|
||||
@spot_instance_request['launchSpecification']['groupSet'] << value
|
||||
if !@context.include?('networkInterfaceSet')
|
||||
@spot_instance_request['launchSpecification']['groupSet'] << value
|
||||
end
|
||||
when 'arn', 'name'
|
||||
@spot_instance_request['launchSpecification']['iamInstanceProfile'][name] = value
|
||||
when 'instanceId', 'launchedAvailabilityZone', 'productDescription', 'spotInstanceRequestId', 'state', 'type'
|
||||
|
|
Loading…
Reference in a new issue