2010-05-02 22:06:03 -04:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module AWS
|
|
|
|
module ELB
|
|
|
|
|
|
|
|
class DescribeInstanceHealth < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
|
|
|
@response = { 'DescribeInstanceHealthResult' => { 'InstanceStates' => [] }, 'ResponseMetadata' => {} }
|
|
|
|
@instance_state = {}
|
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
|
|
|
when 'Description', 'State', 'InstanceId', 'ReasonCode'
|
2011-05-12 16:15:13 -04:00
|
|
|
@instance_state[name] = value
|
2010-05-02 22:06:03 -04:00
|
|
|
when 'member'
|
|
|
|
@response['DescribeInstanceHealthResult']['InstanceStates'] << @instance_state
|
|
|
|
@instance_state = {}
|
|
|
|
when 'RequestId'
|
2011-05-12 16:15:13 -04:00
|
|
|
@response['ResponseMetadata'][name] = value
|
2010-05-02 22:06:03 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|