27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/fog/aws/parsers/compute/describe_images.rb', line 27
def end_element(name)
case name
when 'architecture', 'description', 'imageId', 'imageLocation', 'imageOwnerId', 'imageState', 'imageType', 'kernelId', 'platform', 'ramdiskId', 'rootDeviceType','rootDeviceName'
@image[name] = @value
when 'blockDeviceMapping'
@in_block_device_mapping = false
when 'deviceName', 'virtualName', 'snapshotId', 'deleteOnTermination'
@block_device_mapping[name] = @value
when 'isPublic'
if @value == 'true'
@image[name] = true
else
@image[name] = false
end
when 'item'
if @in_block_device_mapping
@image['blockDeviceMapping'] << @block_device_mapping
@block_device_mapping = {}
elsif @in_tag_set
@image['tagSet'][@tag['key']] = @tag['value']
@tag = {}
elsif !@in_product_codes
@response['imagesSet'] << @image
@image = { 'blockDeviceMapping' => [], 'productCodes' => [], 'tagSet' => {} }
end
when 'key', 'value'
@tag[name] = @value
when 'productCode'
@image['productCodes'] << @value
when 'productCodes'
@in_product_codes = false
when 'requestId'
@response[name] = @value
when 'volumeSize'
@block_device_mapping[name] = @value.to_i
end
end
|