Class: Fog::Metering::OpenStack::Events

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/metering/openstack/models/events.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#destroy, #get, #load_response, #summary

Instance Method Details

#all(q = []) ⇒ Object


10
11
12
# File 'lib/fog/metering/openstack/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/metering/openstack/models/events.rb', line 14

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