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
- #all ⇒ Object
- #get(flavor_id) ⇒ Object
- #get_by_filter(flavor_filter) ⇒ Object
- #get_by_name(flavor_name) ⇒ Object
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_filter(flavor_filter) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 31 def get_by_filter(flavor_filter) data = service.template_pool(flavor_filter) load(data) 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 |