2011-04-09 16:54:24 -04:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module AWS
|
|
|
|
module ELB
|
|
|
|
|
|
|
|
class ConfigureHealthCheck < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
|
|
|
@health_check = {}
|
|
|
|
@response = { 'ConfigureHealthCheckResult' => {}, 'ResponseMetadata' => {} }
|
|
|
|
end
|
|
|
|
|
|
|
|
def start_element(name, attrs = [])
|
|
|
|
super
|
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
|
|
|
when 'Target'
|
2011-05-12 16:15:13 -04:00
|
|
|
@health_check[name] = value
|
2011-04-09 16:54:24 -04:00
|
|
|
when 'Interval', 'Timeout', 'UnhealthyThreshold', 'HealthyThreshold'
|
2011-05-12 16:15:13 -04:00
|
|
|
@health_check[name] = value.to_i
|
2011-04-09 16:54:24 -04:00
|
|
|
|
|
|
|
when 'HealthCheck'
|
|
|
|
@response['ConfigureHealthCheckResult'][name] = @health_check
|
|
|
|
|
|
|
|
when 'RequestId'
|
2011-05-12 16:15:13 -04:00
|
|
|
@response['ResponseMetadata'][name] = value
|
2011-04-09 16:54:24 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|