class Fog::Compute::Ecloud::Monitor

Public Instance Methods

edit(options = {}) click to toggle source
# File lib/fog/compute/ecloud/models/monitor.rb, line 20
def edit(options = {})
  href = "#{service.base_path}/internetServices/#{internet_service_id}/monitor?type="
  case type
  when "application/vnd.tmrk.cloud.pingMonitor"
    options[:uri] = href + "ping"
    data = service.monitors_edit_ping(options).body
  when "application/vnd.tmrk.cloud.httpMonitor"
    options[:uri] = href + "http"
    data = service.monitors_edit_http(options).body
  when "application/vnd.tmrk.cloud.ecvMonitor"
    options[:uri] = href + "ecv"
    data = service.monitors_edit_ecv(options).body
  end
  object = collection.from_data(data)
end
id() click to toggle source
# File lib/fog/compute/ecloud/models/monitor.rb, line 40
def id
  href.scan(/\d+/)[0]
end
internet_service_id() click to toggle source
# File lib/fog/compute/ecloud/models/monitor.rb, line 36
def internet_service_id
  other_links[:Link][:href].scan(/\d+/)[0]
end