Class: Fog::Monitoring::OpenStack::NotificationMethod

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

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::Model

#initialize, #save

Constructor Details

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

Instance Method Details

#createObject



14
15
16
17
18
19
# File 'lib/fog/openstack/models/monitoring/notification_method.rb', line 14

def create
  requires :name, :type, :address
  merge_attributes(
    service.create_notification_method(attributes).body
  )
end

#destroyObject



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

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

#to_sObject



34
35
36
# File 'lib/fog/openstack/models/monitoring/notification_method.rb', line 34

def to_s
  name
end

#update(attr = nil) ⇒ Object



21
22
23
24
25
26
# File 'lib/fog/openstack/models/monitoring/notification_method.rb', line 21

def update(attr = nil)
  requires :name, :type, :address
  merge_attributes(
    service.update_notification_method(id, attr || attributes).body
  )
end