66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
# File 'lib/fog/aws/parsers/compute/describe_instance_attribute.rb', line 66
def end_element(name)
if @in_instanceType
case name
when 'value'
@response['instanceType'] = value
when 'instanceType'
@in_instanceType = false
end
elsif @in_kernel
case name
when 'value'
@response['kernelId'] = value
when 'kernel'
@in_kernelId = false
end
elsif @in_ramdisk
case name
when 'value'
@response['ramdiskId'] = value
when 'ramdisk'
@in_ramdiskId = false
end
elsif @in_userData
case name
when 'value'
@response['userData'] = value
when 'userData'
@in_userData = false
end
elsif @in_disableApiTermination
case name
when 'value'
@response['disableApiTermination'] = (value == 'true')
when 'disableApiTermination'
@in_disableApiTermination = false
end
elsif @in_instanceInitiatedShutdownBehavior
case name
when 'value'
@response['instanceInitiatedShutdownBehavior'] = value
when 'instanceInitiatedShutdownBehavior'
@in_instanceInitiatedShutdownBehavior = false
end
elsif @in_rootDeviceName
case name
when 'value'
@response['rootDeviceName'] = value
when 'rootDeviceName'
@in_rootDeviceName = false
end
elsif @in_blockDeviceMapping
case name
when 'item'
@response["blockDeviceMapping"] << @block_device_mapping
@block_device_mapping = {}
when 'volumeId', 'status', 'deviceName'
@block_device_mapping[name] = value
when 'attachTime'
@block_device_mapping['attachTime'] = Time.parse(value)
when 'deleteOnTermination'
@block_device_mapping['deleteOnTermination'] = (value == 'true')
when 'blockDeviceMapping'
@in_blockDeviceMapping = false
end
elsif @in_productCodes
@response['productCodes'] << value
case name
when 'productCodes'
@in_productCodes = false
end
elsif @in_ebsOptimized
case name
when 'value'
@response['ebsOptimized'] = (value == 'true')
when 'ebsOptimized'
@in_ebsOptimized = false
end
elsif @in_sriovNetSupport
case name
when 'value'
@response["sriovNetSupport"] = value
when "sriovNetSupport"
@in_sriovNetSupport = false
end
elsif @in_sourceDestCheck
case name
when 'value'
@response['sourceDestCheck'] = (value == 'true')
when 'sourceDestCheck'
@in_sourceDestCheck = false
end
elsif @in_groupSet
case name
when 'item'
@response['groupSet'] << @group
@group = {}
when 'groupId'
@group["groupId"] = value
when 'groupSet'
@in_groupSet = false
end
else
case name
when 'requestId', 'instanceId'
@response[name] = value
end
end
end
|