Sha256: 65b1143507e6cc9f0aa56b01a017c31785bc031903f5f025bc3930d295f1f879

Contents?: true

Size: 1018 Bytes

Versions: 15

Compression:

Stored size: 1018 Bytes

Contents

module Fog
  class Compute

    def self.new(attributes)
      case provider = attributes.delete(:provider)
      when 'AWS'
        require 'fog/aws'
        Fog::AWS::Compute.new(attributes)
      when 'Bluebox'
        require 'fog/bluebox'
        Fog::Bluebox::Compute.new(attributes)
      when 'Brightbox'
        require 'fog/brightbox'
        Fog::Brightbox::Compute.new(attributes)
      when 'GoGrid'
        require 'fog/go_grid'
        Fog::GoGrid::Compute.new(attributes)
      when 'Linode'
        require 'fog/linode'
        Fog::Linode::Compute.new(attributes)
      when 'NewServers'
        require 'fog/new_servers'
        Fog::NewServers::Compute.new(attributes)
      when 'Rackspace'
        require 'fog/rackspace'
        Fog::Rackspace::Compute.new(attributes)
      when 'Slicehost'
        require 'fog/slicehost'
        Fog::Slicehost::Compute.new(attributes)
      else
        raise ArgumentError.new("#{provider} is not a recognized compute provider")
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
fog-0.3.31 lib/fog/core/compute.rb
fog-0.3.30 lib/fog/core/compute.rb
fog-0.3.29 lib/fog/core/compute.rb
fog-0.3.28 lib/fog/core/compute.rb
fog-0.3.27 lib/fog/core/compute.rb
fog-0.3.26 lib/fog/core/compute.rb
fog-0.3.25 lib/fog/core/compute.rb
fog-0.3.24 lib/fog/core/compute.rb
bbcloud-0.8.1 lib/bbcloud/vendor/fog-0.3.23/lib/fog/core/compute.rb
fog-0.3.23 lib/fog/core/compute.rb
fog-0.3.22 lib/fog/core/compute.rb
fog-0.3.21 lib/fog/core/compute.rb
fog-0.3.20 lib/fog/core/compute.rb
fog-0.3.19 lib/fog/core/compute.rb
fog-0.3.18 lib/fog/core/compute.rb