mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[core] preparing for service based reorg
This commit is contained in:
parent
62eaa621b7
commit
c49539b2b2
12 changed files with 28 additions and 42 deletions
|
@ -8,16 +8,15 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/aws'
|
||||
service 'cdn'
|
||||
service 'compute'
|
||||
service 'dns'
|
||||
service 'ec2'
|
||||
service 'elb'
|
||||
service 'iam'
|
||||
service 's3'
|
||||
service 'simpledb'
|
||||
service 'storage'
|
||||
service(:cdn, 'aws/cdn')
|
||||
service(:compute, 'aws/compute')
|
||||
service(:dns, 'aws/dns')
|
||||
service(:ec2, 'aws/ec2')
|
||||
service(:elb, 'aws/elb')
|
||||
service(:iam, 'aws/iam')
|
||||
service(:s3, 'aws/s3')
|
||||
service(:simpledb, 'aws/simpledb')
|
||||
service(:storage, 'aws/storage')
|
||||
|
||||
def self.indexed_param(key, values)
|
||||
params = {}
|
||||
|
|
|
@ -5,8 +5,7 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/bluebox'
|
||||
service :compute
|
||||
service(:compute, 'bluebox/compute')
|
||||
|
||||
def self.new(attributes = {})
|
||||
location = caller.first
|
||||
|
|
|
@ -3,7 +3,7 @@ require File.join(File.dirname(__FILE__), 'core')
|
|||
module Fog
|
||||
module Brightbox
|
||||
extend Fog::Provider
|
||||
service_path 'fog/brightbox'
|
||||
service 'compute'
|
||||
|
||||
service(:compute, 'brightbox/compute')
|
||||
end
|
||||
end
|
|
@ -1,13 +1,9 @@
|
|||
module Fog
|
||||
module Provider
|
||||
|
||||
def service_path(new_path)
|
||||
@service_path = new_path
|
||||
end
|
||||
|
||||
def service(new_service)
|
||||
def service(new_service, path)
|
||||
services << new_service
|
||||
require File.join(@service_path, new_service.to_s)
|
||||
require File.join('fog', path)
|
||||
end
|
||||
|
||||
def services
|
||||
|
|
|
@ -5,8 +5,7 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/go_grid'
|
||||
service 'compute'
|
||||
service(:compute, 'go_grid/compute')
|
||||
|
||||
def self.new(attributes = {})
|
||||
location = caller.first
|
||||
|
|
|
@ -8,8 +8,7 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/google'
|
||||
service 'storage'
|
||||
service(:storage, 'google/storage')
|
||||
|
||||
class Mock
|
||||
|
||||
|
|
|
@ -5,9 +5,8 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/linode'
|
||||
service 'compute'
|
||||
service 'dns'
|
||||
service(:compute, 'linode/compute')
|
||||
service(:dns, 'linode/dns')
|
||||
|
||||
def self.new(attributes = {})
|
||||
location = caller.first
|
||||
|
|
|
@ -5,8 +5,7 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/local'
|
||||
service 'storage'
|
||||
service(:storage, 'local/storage')
|
||||
|
||||
def self.new(attributes = {})
|
||||
location = caller.first
|
||||
|
|
|
@ -8,8 +8,7 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/new_servers'
|
||||
service 'compute'
|
||||
service(:compute, 'new_servers/compute')
|
||||
|
||||
def self.new(attributes = {})
|
||||
location = caller.first
|
||||
|
|
|
@ -5,12 +5,11 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/rackspace'
|
||||
service 'cdn'
|
||||
service 'compute'
|
||||
service 'files'
|
||||
service 'servers'
|
||||
service 'storage'
|
||||
service(:cdn, 'rackspace/cdn')
|
||||
service(:compute, 'rackspace/compute')
|
||||
service(:files, 'rackspace/files')
|
||||
service(:servers, 'rackspace/servers')
|
||||
service(:storage, 'rackspace/storage')
|
||||
|
||||
def self.authenticate(options)
|
||||
rackspace_auth_url = options[:rackspace_auth_url] || "auth.api.rackspacecloud.com"
|
||||
|
|
|
@ -8,9 +8,8 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/slicehost'
|
||||
service :compute
|
||||
service :dns
|
||||
service(:compute, 'slicehost/compute')
|
||||
service(:dns, 'slicehost/dns')
|
||||
|
||||
def self.new(attributes = {})
|
||||
location = caller.first
|
||||
|
|
|
@ -8,8 +8,7 @@ module Fog
|
|||
|
||||
extend Fog::Provider
|
||||
|
||||
service_path 'fog/zerigo'
|
||||
service :dns
|
||||
service(:dns, 'zerigo/dns')
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue