Class: Fog::Orchestration::OpenStack::Events

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

Instance Method Summary collapse

Instance Method Details

#all(obj, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/fog/openstack/models/orchestration/events.rb', line 9

def all(obj, options={})
  data = if obj.is_a?(Stack)
    service.list_stack_events(obj, options).body['events']
  else
    service.list_resource_events(obj.stack, obj, options).body['events']
  end

  load data
end

#get(stack, resource, event_id) ⇒ Object



19
20
21
22
23
24
# File 'lib/fog/openstack/models/orchestration/events.rb', line 19

def get(stack, resource, event_id)
  data = service.show_event_details(stack, resource, event_id).body['event']
  new(data)
rescue Fog::Compute::OpenStack::NotFound
  nil
end