Class: Fog::OpenStack::Orchestration::Events
- Inherits:
-
Collection
- Object
- Collection
- Collection
- Fog::OpenStack::Orchestration::Events
show all
- Defined in:
- lib/fog/openstack/orchestration/models/events.rb
Instance Attribute Summary
Attributes inherited from Collection
#response
Instance Method Summary
collapse
Methods inherited from Collection
#destroy, #find_by_id, #load_response, #summary
Instance Method Details
#all(options = {}, options_deprecated = {}) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/fog/openstack/orchestration/models/events.rb', line 10
def all(options = {}, options_deprecated = {})
data = if options.kind_of?(Stack)
service.list_stack_events(options, options_deprecated)
elsif options.kind_of?(Hash)
service.list_events(options)
else
service.list_resource_events(options.stack, options, options_deprecated)
end
load_response(data, 'events')
end
|
#get(stack, resource, event_id) ⇒ Object
22
23
24
25
26
27
|
# File 'lib/fog/openstack/orchestration/models/events.rb', line 22
def get(stack, resource, event_id)
data = service.show_event_details(stack, resource, event_id).body['event']
new(data)
rescue Fog::OpenStack::Compute::NotFound
nil
end
|