aws 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/elb/right_elb_interface.rb +37 -16
- metadata +1 -1
@@ -129,10 +129,11 @@ module Aws
|
|
129
129
|
end
|
130
130
|
|
131
131
|
|
132
|
-
def describe_load_balancers
|
132
|
+
def describe_load_balancers(lparams={})
|
133
133
|
@logger.info("Describing Load Balancers")
|
134
134
|
|
135
135
|
params = {}
|
136
|
+
params.update( hash_params('LoadBalancerNames.member', lparams[:names]) ) if lparams[:names]
|
136
137
|
|
137
138
|
link = generate_request("DescribeLoadBalancers", params)
|
138
139
|
|
@@ -151,7 +152,7 @@ module Aws
|
|
151
152
|
class QElbCreateParser < AwsParser
|
152
153
|
|
153
154
|
def reset
|
154
|
-
@result =
|
155
|
+
@result = []
|
155
156
|
end
|
156
157
|
|
157
158
|
|
@@ -166,41 +167,61 @@ module Aws
|
|
166
167
|
class QElbDescribeLoadBalancersParser < AwsParser
|
167
168
|
|
168
169
|
def reset
|
169
|
-
@result =
|
170
|
+
@result = []
|
171
|
+
end
|
172
|
+
|
173
|
+
def tagstart(name, attributes)
|
174
|
+
if (name == 'member' && @xmlpath == 'DescribeLoadBalancersResult/LoadBalancersDescriptions')
|
175
|
+
@member = { :listeners=>[], :availability_zones=>[], :health_check=>{} }
|
176
|
+
end
|
177
|
+
if (name == 'member' && @xmlpath == 'DescribeLoadBalancersResult/LoadBalancersDescriptions/member/Listeners')
|
178
|
+
@listener = { }
|
179
|
+
end
|
180
|
+
if (name == 'member' && @xmlpath == 'DescribeLoadBalancersResult/LoadBalancersDescriptions/member/AvailabilityZones')
|
181
|
+
@availability_zone = { }
|
182
|
+
end
|
183
|
+
|
170
184
|
end
|
171
185
|
|
172
186
|
|
173
187
|
def tagend(name)
|
174
188
|
case name
|
175
189
|
when 'LoadBalancerName' then
|
176
|
-
@
|
190
|
+
@member[:load_balancer_name] = @text
|
177
191
|
# when 'AvailabilityZones' then
|
178
192
|
# @result[:availability_zones] = @text
|
179
193
|
when 'CreatedTime' then
|
180
|
-
@
|
194
|
+
@member[:created_time] = Time.parse(@text)
|
181
195
|
when 'DNSName' then
|
182
|
-
@
|
196
|
+
@member[:dns_name] = @text
|
197
|
+
# Listeners
|
183
198
|
when 'Protocol' then
|
184
|
-
@
|
199
|
+
@listener[:protocol] = @text
|
185
200
|
when 'LoadBalancerPort' then
|
186
|
-
@
|
201
|
+
@listener[:load_balancer_port] = @text.to_i
|
187
202
|
when 'InstancePort' then
|
188
|
-
@
|
203
|
+
@listener[:instance_port] = @text.to_i
|
189
204
|
# HEALTH CHECK STUFF
|
190
205
|
when 'Interval' then
|
191
|
-
|
206
|
+
@member[:health_check][:interval] = @text.to_i
|
192
207
|
when 'Target' then
|
193
|
-
|
208
|
+
@member[:health_check][:target] = @text
|
194
209
|
when 'HealthyThreshold' then
|
195
|
-
@
|
210
|
+
@member[:health_check][:healthy_threshold] = @text.to_i
|
196
211
|
when 'Timeout' then
|
197
|
-
@
|
212
|
+
@member[:health_check][:timeout] = @text.to_i
|
198
213
|
when 'UnhealthyThreshold' then
|
199
|
-
@
|
214
|
+
@member[:health_check][:unhealthy_threshold] = @text.to_i
|
200
215
|
# AvailabilityZones
|
201
216
|
when 'member' then
|
202
|
-
@
|
203
|
-
|
217
|
+
if @xmlpath == 'DescribeLoadBalancersResult/LoadBalancersDescriptions/member/Listeners'
|
218
|
+
@member[:listeners] << @listener
|
219
|
+
elsif @xmlpath == 'DescribeLoadBalancersResult/LoadBalancersDescriptions/member/AvailabilityZones'
|
220
|
+
@availability_zone = @text
|
221
|
+
@member[:availability_zones] << @availability_zone
|
222
|
+
elsif @xmlpath == 'DescribeLoadBalancersResult/LoadBalancersDescriptions'
|
223
|
+
@result << @member
|
224
|
+
end
|
204
225
|
|
205
226
|
end
|
206
227
|
end
|