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
14 15 16 17 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 14 def all data = service.template_pool load(data) end |
#get(flavor_id) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 19 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
33 34 35 36 37 38 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 33 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
26 27 28 29 30 31 |
# File 'lib/fog/opennebula/models/compute/flavors.rb', line 26 def get_by_name(flavor_name) data = service.template_pool(:name => flavor_name) load(data) rescue Fog::Compute::OpenNebula::NotFound nil end |