Class: Fog::Monitoring::OpenStack::Alarm

Inherits:
OpenStack::Model show all
Defined in:
lib/fog/monitoring/openstack/models/alarm.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#create, #initialize, #save

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#destroyObject



35
36
37
38
39
# File 'lib/fog/monitoring/openstack/models/alarm.rb', line 35

def destroy
  requires :id
  service.delete_alarm(id)
  true
end

#patch(attr = nil) ⇒ Object



27
28
29
30
31
32
33
# File 'lib/fog/monitoring/openstack/models/alarm.rb', line 27

def patch(attr = nil)
  requires :id
  merge_attributes(
    service.patch_alarm(id, attr || attributes).body
  )
  self
end

#to_sObject



41
42
43
# File 'lib/fog/monitoring/openstack/models/alarm.rb', line 41

def to_s
  name
end

#update(attr = nil) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/fog/monitoring/openstack/models/alarm.rb', line 19

def update(attr = nil)
  requires :id
  merge_attributes(
    service.update_alarm(id, attr || attributes).body
  )
  self
end