Class: Fog::OpenStack::Monitoring::NotificationMethod
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize, #save
Instance Method Details
#create ⇒ Object
15
16
17
18
19
20
|
# File 'lib/fog/openstack/monitoring/models/notification_method.rb', line 15
def create
requires :name, :type, :address
merge_attributes(
service.create_notification_method(attributes).body
)
end
|
#destroy ⇒ Object
35
36
37
38
39
|
# File 'lib/fog/openstack/monitoring/models/notification_method.rb', line 35
def destroy
requires :id
service.delete_notification_method(id)
true
end
|
#patch(attr = nil) ⇒ Object
29
30
31
32
33
|
# File 'lib/fog/openstack/monitoring/models/notification_method.rb', line 29
def patch(attr = nil)
merge_attributes(
service.patch_notification_method(id, attr || attributes).body
)
end
|
#to_s ⇒ Object
41
42
43
|
# File 'lib/fog/openstack/monitoring/models/notification_method.rb', line 41
def to_s
name
end
|
#update(attr = nil) ⇒ Object
22
23
24
25
26
27
|
# File 'lib/fog/openstack/monitoring/models/notification_method.rb', line 22
def update(attr = nil)
requires :name, :type, :address
merge_attributes(
service.put_notification_method(id, attr || attributes).body
)
end
|