Class: Fog::Orchestration::OpenStack::Resources
Instance Attribute Summary
#response
Instance Method Summary
collapse
#destroy, #find_by_id, #load_response, #summary
Instance Method Details
#all(options = {}, deprecated_options = {}) ⇒ Object
14
15
16
17
|
# File 'lib/fog/orchestration/openstack/models/resources.rb', line 14
def all(options = {}, deprecated_options = {})
data = service.list_resources(options, deprecated_options)
load_response(data, 'resources')
end
|
#get(resource_name, stack = nil) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/fog/orchestration/openstack/models/resources.rb', line 19
def get(resource_name, stack = nil)
stack = first.stack if stack.nil?
data = service.show_resource_data(stack.stack_name, stack.id, resource_name).body['resource']
new(data)
rescue Fog::Compute::OpenStack::NotFound
nil
end
|
27
28
29
30
31
|
# File 'lib/fog/orchestration/openstack/models/resources.rb', line 27
def metadata(stack_name, stack_id, resource_name)
service.show_resource_metadata(stack_name, stack_id, resource_name).body['resource']
rescue Fog::Compute::OpenStack::NotFound
nil
end
|
#types ⇒ Object
10
11
12
|
# File 'lib/fog/orchestration/openstack/models/resources.rb', line 10
def types
service.list_resource_types.body['resource_types'].sort
end
|