Sha256: f1f6ab8b3b32a7f16bea920c166ba4b36d938b0b83f2586f71c262666e53a454

Contents?: true

Size: 517 Bytes

Versions: 11

Compression:

Stored size: 517 Bytes

Contents

module Fog
  module Rackspace
    class Servers

      def flavors
        Fog::Rackspace::Servers::Flavors.new(:connection => self)
      end

      class Flavors < Fog::Collection

        model Fog::Rackspace::Servers::Flavor

        def all
          data = connection.list_flavors_detail.body['flavors']
          load(data)
        end

        def get(flavor_id)
          connection.get_flavor_details(flavor_id)
        rescue Excon::Errors::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fog-0.0.58 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.57 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.56 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.55 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.54 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.53 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.52 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.51 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.50 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.49 lib/fog/rackspace/models/servers/flavors.rb
fog-0.0.48 lib/fog/rackspace/models/servers/flavors.rb