Sha256: 205d02c82f9c27642a3a69bd2b6b2b0153ce7e18b6807ef448fa2ae8d5bb46b9

Contents?: true

Size: 1.08 KB

Versions: 29

Compression:

Stored size: 1.08 KB

Contents

module Fog
  module Compute
    class Ecloud
      class Real
        include Shared

        def monitors_create_ecv(data)
          validate_data([:interval, :response_timeout, :retries, :downtime, :enabled, :send_string, :receive_string], data)

          request(
            :body => generate_ecv_monitor_request(data),
            :expects => 201,
            :method => "POST",
            :headers => {},
            :uri => data[:uri],
            :parse => true
          )
        end

        private

        def generate_ecv_monitor_request(data)
          xml = Builder::XmlMarkup.new
          xml.CreateEcvMonitor do
            xml.Interval data[:interval]
            xml.ResponseTimeout data[:response_timeout]
            xml.Retries data[:retries]
            xml.Downtime data[:downtime]
            xml.Enabled data[:enabled]
            xml.SendString data[:send_string]
            if data[:http_headers]
              xml.HttpHeaders data[:http_headers]
            end
            xml.ReceiveString data[:receive_string]
          end
        end
      end
    end
  end
end

Version data entries

29 entries across 27 versions & 6 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-ecloud-0.1.1/lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
fog-ecloud-0.3.0 lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
fog-ecloud-0.2.0 lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
fog-ecloud-0.1.3 lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
fog-ecloud-0.1.2 lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
fog-ecloud-0.1.1 lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
fog-ecloud-0.1.0 lib/fog/compute/ecloud/requests/monitors_create_ecv.rb
fog-ecloud-0.0.2 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
fog-ecloud-0.0.1 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
fog-1.25.0 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
nsidc-fog-1.24.1 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
fog-1.24.0 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
ns-fog-1.22.11 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
ns-fog-1.22.10 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
ns-fog-1.22.9 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb
ns-fog-1.22.8 lib/fog/ecloud/requests/compute/monitors_create_ecv.rb