Class: Fog::Compute::RackspaceV2::Flavors
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::RackspaceV2::Flavors
- Defined in:
- lib/fog/rackspace/models/compute_v2/flavors.rb
Instance Method Summary collapse
-
#all ⇒ Fog::Compute::RackspaceV2::Flavors
Retrieves information for all available flavors.
-
#get(flavor_id) ⇒ Fog::Compute::RackspaceV2::Flavor
Retrieve image.
Instance Method Details
#all ⇒ Fog::Compute::RackspaceV2::Flavors
Note:
Fog’s currentl implementation only returns 1000 flavors.
Retrieves information for all available flavors
17 18 19 20 |
# File 'lib/fog/rackspace/models/compute_v2/flavors.rb', line 17 def all data = service.list_flavors_detail.body['flavors'] load(data) end |
#get(flavor_id) ⇒ Fog::Compute::RackspaceV2::Flavor
Retrieve image
30 31 32 33 34 35 |
# File 'lib/fog/rackspace/models/compute_v2/flavors.rb', line 30 def get(flavor_id) data = service.get_flavor(flavor_id).body['flavor'] new(data) rescue Fog::Compute::RackspaceV2::NotFound nil end |