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