Sha256: 17c6dac9c5fbd1762d409303992fd98a0a8554b35a6130dfad914e3870fa99ee

Contents?: true

Size: 529 Bytes

Versions: 8

Compression:

Stored size: 529 Bytes

Contents

require 'fog/openstack/models/collection'
require 'fog/openstack/models/metering/event'

module Fog
  module Metering
    class OpenStack
      class Events < Fog::OpenStack::Collection
        model Fog::Metering::OpenStack::Event

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/models/metering/events.rb
fog-openstack-0.1.9 lib/fog/openstack/models/metering/events.rb
fog-openstack-0.1.8 lib/fog/openstack/models/metering/events.rb
fog-openstack-0.1.7 lib/fog/openstack/models/metering/events.rb
fog-openstack-0.1.6 lib/fog/openstack/models/metering/events.rb
fog-openstack-0.1.5 lib/fog/openstack/models/metering/events.rb
fog-openstack-0.1.4 lib/fog/openstack/models/metering/events.rb
fog-openstack-0.1.3 lib/fog/openstack/models/metering/events.rb