def create_lb_health_monitor(type, delay, timeout, max_retries, options = {})
data = {
'health_monitor' => {
'type' => type,
'delay' => delay,
'timeout' => timeout,
'max_retries' => max_retries
}
}
vanilla_options = [:http_method, :url_path, :expected_codes, :admin_state_up, :tenant_id]
vanilla_options.reject { |o| options[o].nil? }.each do |key|
data['health_monitor'][key] = options[key]
end
request(
:body => Fog::JSON.encode(data),
:expects => [201],
:method => 'POST',
:path => 'lb/health_monitors'
)
end