mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
add missing files :(
This commit is contained in:
parent
1b71cd953a
commit
13d0495e77
2 changed files with 57 additions and 0 deletions
33
lib/fog/core/compute.rb
Normal file
33
lib/fog/core/compute.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
module Fog
|
||||
class Storage
|
||||
|
||||
def self.new(attributes)
|
||||
case attributes.delete(:provider)
|
||||
when 'AWS'
|
||||
require 'fog/aws'
|
||||
Fog::AWS::Compute.new(attributes)
|
||||
when 'Bluebox'
|
||||
require 'fog/bluebox'
|
||||
Fog::Bluebox::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 storage provider")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
24
lib/fog/core/storage.rb
Normal file
24
lib/fog/core/storage.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
module Fog
|
||||
class Storage
|
||||
|
||||
def self.new(attributes)
|
||||
case provider = attributes.delete(:provider)
|
||||
when 'AWS'
|
||||
require 'fog/aws'
|
||||
Fog::AWS::Storage.new(attributes)
|
||||
when 'Google'
|
||||
require 'fog/google'
|
||||
Fog::Google::Storage.new(attributes)
|
||||
when 'Local'
|
||||
require 'fog/local'
|
||||
Fog::Local::Storage.new(attributes)
|
||||
when 'Rackspace'
|
||||
require 'fog/rackspace'
|
||||
Fog::Rackspace::Storage.new(attributes)
|
||||
else
|
||||
raise ArgumentError.new("#{provider} is not a recognized storage provider")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue