Sha256: a1b45b5716c47e4649b072839a63ecf4d70023e10cb6b02e3237f194c6fc56fe

Contents?: true

Size: 1.17 KB

Versions: 77

Compression:

Stored size: 1.17 KB

Contents

module Fog
  module Compute
    class Ecloud
      class Real
        include Shared

        def monitors_edit_http(data)
          validate_data([:interval, :response_timeout, :retries, :downtime, :enabled, :request_uri, :response_codes], data)

          request(
            :body => generate_edit_http_request(data),
            :expects => 200,
            :method => "PUT",
            :headers => {},
            :uri => data[:uri],
            :parse => true
          )
        end

        private

        def generate_edit_http_request(data)
          xml = Builder::XmlMarkup.new
          xml.HttpMonitor 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 xml[:httpheaders]
              xml.HttpHeaders xml[:http_headers]
            end
            xml.ResponseCodes do
              xml[: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

Version Path
fog-maestrodev-1.20.0.20140305101839 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-1.20.0 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-1.19.0 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/ecloud/requests/compute/monitors_edit_http.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/ecloud/requests/compute/monitors_edit_http.rb