Class: Fog::Compute::Ecloud::Monitor
Instance Attribute Summary
#loaded
Instance Method Summary
collapse
#load_unless_loaded!, #reload
Instance Method Details
#edit(options = {}) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/fog/ecloud/models/compute/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 ⇒ Object
40
41
42
|
# File 'lib/fog/ecloud/models/compute/monitor.rb', line 40
def id
href.scan(/\d+/)[0]
end
|
#internet_service_id ⇒ Object
36
37
38
|
# File 'lib/fog/ecloud/models/compute/monitor.rb', line 36
def internet_service_id
other_links[:Link][:href].scan(/\d+/)[0]
end
|