class Fog::Compute::Softlayer::Flavors

Public Instance Methods

all() click to toggle source

Returns an array of all flavors that have been created

Fog::Softlayer.flavors.all

# File lib/fog/softlayer/models/compute/flavors.rb, line 66
def all
  load(Fog::Compute::Softlayer::FLAVORS)
  self
end
get(flavor_id) click to toggle source
Used to retrieve a flavor
flavor_id is required to get the associated flavor information.
flavors available currently:

m1.tiny

You can run the following command to get the details:
Softlayer.flavors.get("m1.tiny")

==== Returns

>> Softlayer.flavors.get(“m1.tiny”)

<Fog::Softlayer::Compute::Flavor
 id="m1.tiny",
 cores=1,
 disk=160,
 name="Tiny Instance",
 ram=1024
>
# File lib/fog/softlayer/models/compute/flavors.rb, line 92
def get(flavor_id)
  self.class.new(:service => service).all.detect {|flavor| flavor.id == flavor_id}
end