Class: Fog::Compute::QingCloud::Flavors

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/qingcloud/models/compute/flavors.rb

Instance Method Summary collapse

Instance Method Details

#allObject

Returns an array of all flavors that have been created

QingCloud.flavors.all

Returns

Returns an array of all available instances and their general information



70
71
72
73
# File 'lib/fog/qingcloud/models/compute/flavors.rb', line 70

def all
  load(Fog::Compute::QingCloud::FLAVORS)
  self
end

#get(flavor_id) ⇒ Object

Used to retrieve a flavor flavor_id is required to get the associated flavor information. flavors available currently:



78
79
80
# File 'lib/fog/qingcloud/models/compute/flavors.rb', line 78

def get(flavor_id)
  self.class.new(:service => service).all.detect {|flavor| flavor.id == flavor_id}
end