Class: Fog::OpenStack::Compute::Services
Instance Attribute Summary
#response
Instance Method Summary
collapse
#destroy, #find_by_id, #load_response
Instance Method Details
#all(options = {}) ⇒ Object
Also known as:
summary
10
11
12
|
# File 'lib/fog/openstack/compute/models/services.rb', line 10
def all(options = {})
load_response(service.list_services(options), 'services')
end
|
#details(options = {}) ⇒ Object
16
17
18
19
|
# File 'lib/fog/openstack/compute/models/services.rb', line 16
def details(options = {})
Fog::Logger.deprecation('Calling OpenStack[:compute].services.details is deprecated, use .services.all')
all(options)
end
|
#get(service_id) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/fog/openstack/compute/models/services.rb', line 21
def get(service_id)
serv = service.list_services.body['services'].detect do |s|
s['id'] == service_id
end
new(serv) if serv
rescue Fog::OpenStack::Compute::NotFound
nil
end
|