Sha256: 3136e31b399d8ea49123b6ae08c9a9861ddf60411ada65632de4519d72995c49

Contents?: true

Size: 506 Bytes

Versions: 19

Compression:

Stored size: 506 Bytes

Contents

require 'fog/core/collection'
require 'fog/brightbox/models/compute/flavor'

module Fog
  module Brightbox
    class Compute

      class Flavors < Fog::Collection

        model Fog::Brightbox::Compute::Flavor

        def all
          data = connection.list_server_types
          load(data)
        end

        def get(identifier)
          data = connection.get_server_type(identifier)
          new(data)
        rescue Excon::Errors::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
fog-0.4.0 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.34 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.33 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.32 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.31 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.30 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.29 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.28 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.27 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.26 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.25 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.24 lib/fog/brightbox/models/compute/flavors.rb
bbcloud-0.8.1 lib/bbcloud/vendor/fog-0.3.23/lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.23 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.22 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.21 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.20 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.19 lib/fog/brightbox/models/compute/flavors.rb
fog-0.3.18 lib/fog/brightbox/models/compute/flavors.rb