Class: Fog::OpenStack::Compute::Flavors
Instance Attribute Summary
#response
Instance Method Summary
collapse
#destroy, #find_by_id, #load_response
Instance Method Details
#all(options = {}) ⇒ Object
10
11
12
13
|
# File 'lib/fog/openstack/compute/models/flavors.rb', line 10
def all(options = {})
data = service.list_flavors_detail(options)
load_response(data, 'flavors')
end
|
#get(flavor_id) ⇒ Object
20
21
22
23
24
25
|
# File 'lib/fog/openstack/compute/models/flavors.rb', line 20
def get(flavor_id)
data = service.get_flavor_details(flavor_id).body['flavor']
new(data)
rescue Fog::OpenStack::Compute::NotFound
nil
end
|
#summary(options = {}) ⇒ Object
15
16
17
18
|
# File 'lib/fog/openstack/compute/models/flavors.rb', line 15
def summary(options = {})
data = service.list_flavors(options)
load_response(data, 'flavors')
end
|