Sha256: 226838d3fbc877042d8aa3469d58e89f9ea9e9a25f13184285ba47a39b680362
Contents?: true
Size: 1.19 KB
Versions: 77
Compression:
Stored size: 1.19 KB
Contents
module Fog module Compute class Ecloud class Real include Shared def monitors_create_http(data) validate_data([:interval, :response_timeout, :retries, :downtime, :enabled, :request_uri, :response_codes], data) request( :body => generate_http_monitor_request(data), :expects => 201, :method => "POST", :headers => {}, :uri => data[:uri], :parse => true ) end private def generate_http_monitor_request(data) xml = Builder::XmlMarkup.new xml.CreateHttpMonitor do xml.Interval data[:interval] xml.ResponseTimeout data[:response_timeout] xml.Retries data[:retries] xml.Downtime data[:downtime] xml.Enabled data[:enabled] xml.RequestUri data[:request_uri] if data[:http_headers] xml.HttpHeaders data[:http_headers] end xml.ResponseCodes do data[:response_codes].each do |c| xml.ResponseCode c end end end end end end end end
Version data entries
77 entries across 77 versions & 12 rubygems