Class: Fog::OpenStack::Event::Events

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/openstack/event/models/events.rb

Instance Attribute Summary

Attributes inherited from Collection

#response

Instance Method Summary collapse

Methods inherited from Collection

#destroy, #get, #load_response, #summary

Instance Method Details

#all(q = []) ⇒ Object



10
11
12
# File 'lib/fog/openstack/event/models/events.rb', line 10

def all(q = [])
  load_response(service.list_events(q))
end

#find_by_id(message_id) ⇒ Object



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

def find_by_id(message_id)
  event = service.get_event(message_id).body
  new(event)
rescue Fog::OpenStack::Event::NotFound
  nil
end