Sha256: 7d5bd4de532e2f95d2f2213883a19071eed94686ebef24a54cac0ebb43b17588

Contents?: true

Size: 506 Bytes

Versions: 7

Compression:

Stored size: 506 Bytes

Contents

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

module Fog
  module Compute
    class Brightbox

      class Flavors < Fog::Collection

        model Fog::Compute::Brightbox::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

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/brightbox/flavors.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/brightbox/flavors.rb
fog-0.11.0 lib/fog/compute/models/brightbox/flavors.rb
fog-0.10.0 lib/fog/compute/models/brightbox/flavors.rb
fog4encbs-0.9.0.1 lib/fog/compute/models/brightbox/flavors.rb
fog4encbs-0.9.0 lib/fog/compute/models/brightbox/flavors.rb
fog-0.9.0 lib/fog/compute/models/brightbox/flavors.rb