Class: Fog::Compute::OpenNebula::Flavors
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::OpenNebula::Flavors
- Defined in:
- lib/fog/opennebula/models/compute/flavors.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
12 13 14 15 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 12 def all data = service.template_pool load(data) end |
#get(flavor_id) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 17 def get(flavor_id) data = service.template_pool({:id => flavor_id}) load(data).first rescue Fog::Compute::OpenNebula::NotFound nil end |
#get_by_name(flavor_name) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 24 def get_by_name(flavor_name) data = service.template_pool({:name => flavor_name}) load(data) rescue Fog::Compute::OpenNebula::NotFound nil end |