1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

remove provider attribute from shared services

This commit is contained in:
geemus 2011-06-16 16:39:51 -07:00
parent 69407efdbb
commit 5dbd9d5e85
30 changed files with 6 additions and 31 deletions

View file

@ -7,7 +7,7 @@ module Fog
def self.new(attributes) def self.new(attributes)
attributes = attributes.dup # prevent delete from having side effects attributes = attributes.dup # prevent delete from having side effects
case provider = attributes[:provider].to_s.downcase.to_sym case provider = attributes.delete(:provider).to_s.downcase.to_sym
when :aws when :aws
require 'fog/cdn/aws' require 'fog/cdn/aws'
Fog::CDN::AWS.new(attributes) Fog::CDN::AWS.new(attributes)

View file

@ -4,7 +4,6 @@ module Fog
requires :aws_access_key_id, :aws_secret_access_key requires :aws_access_key_id, :aws_secret_access_key
recognizes :host, :path, :port, :scheme, :version, :persistent recognizes :host, :path, :port, :scheme, :version, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/cdn/models/aws' model_path 'fog/cdn/models/aws'

View file

@ -4,7 +4,6 @@ module Fog
requires :rackspace_api_key, :rackspace_username requires :rackspace_api_key, :rackspace_username
recognizes :rackspace_auth_url, :persistent recognizes :rackspace_auth_url, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/cdn/models/rackspace' model_path 'fog/cdn/models/rackspace'

View file

@ -7,7 +7,7 @@ module Fog
def self.new(attributes) def self.new(attributes)
attributes = attributes.dup # prevent delete from having side effects attributes = attributes.dup # prevent delete from having side effects
case provider = attributes[:provider].to_s.downcase.to_sym case provider = attributes.delete(:provider).to_s.downcase.to_sym
when :aws when :aws
require 'fog/compute/aws' require 'fog/compute/aws'
Fog::Compute::AWS.new(attributes) Fog::Compute::AWS.new(attributes)

View file

@ -4,7 +4,6 @@ module Fog
requires :aws_access_key_id, :aws_secret_access_key requires :aws_access_key_id, :aws_secret_access_key
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/aws' model_path 'fog/compute/models/aws'
model :address model :address

View file

@ -4,7 +4,6 @@ module Fog
requires :bluebox_api_key, :bluebox_customer_id requires :bluebox_api_key, :bluebox_customer_id
recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/bluebox' model_path 'fog/compute/models/bluebox'
model :flavor model :flavor

View file

@ -6,7 +6,6 @@ module Fog
requires :brightbox_client_id, :brightbox_secret requires :brightbox_client_id, :brightbox_secret
recognizes :brightbox_auth_url, :brightbox_api_url recognizes :brightbox_auth_url, :brightbox_api_url
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/brightbox' model_path 'fog/compute/models/brightbox'
model :account # Singular resource, no collection model :account # Singular resource, no collection

View file

@ -830,7 +830,6 @@ module Fog
requires :ecloud_username, :ecloud_password, :ecloud_versions_uri requires :ecloud_username, :ecloud_password, :ecloud_versions_uri
recognizes :ecloud_version recognizes :ecloud_version
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/ecloud' model_path 'fog/compute/models/ecloud'
model :catalog_item model :catalog_item

View file

@ -4,7 +4,6 @@ module Fog
requires :go_grid_api_key, :go_grid_shared_secret requires :go_grid_api_key, :go_grid_shared_secret
recognizes :host, :path, :port, :scheme, :persistent recognizes :host, :path, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/go_grid' model_path 'fog/compute/models/go_grid'
model :image model :image

View file

@ -4,7 +4,6 @@ module Fog
requires :linode_api_key requires :linode_api_key
recognizes :port, :scheme, :persistent recognizes :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/linode' model_path 'fog/compute/models/linode'
model :flavor model :flavor

View file

@ -4,7 +4,6 @@ module Fog
requires :new_servers_password, :new_servers_username requires :new_servers_password, :new_servers_username
recognizes :host, :port, :scheme, :persistent recognizes :host, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/new_servers' model_path 'fog/compute/models/new_servers'

View file

@ -5,7 +5,6 @@ module Fog
API_URL = "http://api.ninefold.com/compute/v1.0/" API_URL = "http://api.ninefold.com/compute/v1.0/"
requires :ninefold_compute_key, :ninefold_compute_secret requires :ninefold_compute_key, :ninefold_compute_secret
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/ninefold' model_path 'fog/compute/models/ninefold'
model :server model :server

View file

@ -4,7 +4,6 @@ module Fog
requires :rackspace_api_key, :rackspace_username requires :rackspace_api_key, :rackspace_username
recognizes :rackspace_auth_url, :rackspace_servicenet, :persistent recognizes :rackspace_auth_url, :rackspace_servicenet, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/rackspace' model_path 'fog/compute/models/rackspace'
model :flavor model :flavor

View file

@ -4,7 +4,6 @@ module Fog
requires :slicehost_password requires :slicehost_password
recognizes :host, :port, :scheme, :persistent recognizes :host, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/slicehost' model_path 'fog/compute/models/slicehost'
model :flavor model :flavor

View file

@ -6,7 +6,6 @@ module Fog
requires :storm_on_demand_username, :storm_on_demand_password requires :storm_on_demand_username, :storm_on_demand_password
recognizes :storm_on_demand_auth_url recognizes :storm_on_demand_auth_url
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/storm_on_demand' model_path 'fog/compute/models/storm_on_demand'
model :config model :config

View file

@ -2,8 +2,6 @@ module Fog
module Compute module Compute
class VirtualBox < Fog::Service class VirtualBox < Fog::Service
recognizes :provider # remove post deprecation
model_path 'fog/compute/models/virtual_box' model_path 'fog/compute/models/virtual_box'
model :medium model :medium
collection :mediums collection :mediums

View file

@ -3,7 +3,7 @@ module Fog
class Voxel < Fog::Service class Voxel < Fog::Service
requires :voxel_api_key, :voxel_api_secret requires :voxel_api_key, :voxel_api_secret
recognizes :provider, :host, :port, :scheme, :persistent recognizes :host, :port, :scheme, :persistent
model_path 'fog/compute/models/voxel' model_path 'fog/compute/models/voxel'
model :image model :image

View file

@ -7,7 +7,7 @@ module Fog
def self.new(attributes) def self.new(attributes)
attributes = attributes.dup # prevent delete from having side effects attributes = attributes.dup # prevent delete from having side effects
case provider = attributes[:provider].to_s.downcase.to_sym case provider = attributes.delete(:provider).to_s.downcase.to_sym
when :aws when :aws
require 'fog/dns/aws' require 'fog/dns/aws'
Fog::DNS::AWS.new(attributes) Fog::DNS::AWS.new(attributes)

View file

@ -4,7 +4,6 @@ module Fog
requires :aws_access_key_id, :aws_secret_access_key requires :aws_access_key_id, :aws_secret_access_key
recognizes :host, :path, :port, :scheme, :version, :persistent recognizes :host, :path, :port, :scheme, :version, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/dns/models/aws' model_path 'fog/dns/models/aws'
model :record model :record

View file

@ -1,9 +1,9 @@
module Fog module Fog
module DNS module DNS
class Bluebox < Fog::Service class Bluebox < Fog::Service
requires :bluebox_api_key, :bluebox_customer_id requires :bluebox_api_key, :bluebox_customer_id
recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/dns/models/bluebox' model_path 'fog/dns/models/bluebox'
model :record model :record

View file

@ -4,7 +4,6 @@ module Fog
requires :dnsimple_email, :dnsimple_password requires :dnsimple_email, :dnsimple_password
recognizes :dnsimple_url, :host, :path, :port, :scheme, :persistent recognizes :dnsimple_url, :host, :path, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/dns/models/dnsimple' model_path 'fog/dns/models/dnsimple'
model :record model :record

View file

@ -4,7 +4,6 @@ module Fog
requires :dnsmadeeasy_api_key, :dnsmadeeasy_secret_key requires :dnsmadeeasy_api_key, :dnsmadeeasy_secret_key
recognizes :host, :path, :port, :scheme, :persistent recognizes :host, :path, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/dns/models/dnsmadeeasy' model_path 'fog/dns/models/dnsmadeeasy'
model :record model :record

View file

@ -4,7 +4,6 @@ module Fog
requires :linode_api_key requires :linode_api_key
recognizes :port, :scheme, :persistent recognizes :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/dns/models/linode' model_path 'fog/dns/models/linode'
model :record model :record

View file

@ -4,7 +4,6 @@ module Fog
requires :slicehost_password requires :slicehost_password
recognizes :host, :port, :scheme, :persistent recognizes :host, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/dns/models/slicehost' model_path 'fog/dns/models/slicehost'
model :record model :record

View file

@ -4,7 +4,6 @@ module Fog
requires :zerigo_email, :zerigo_token requires :zerigo_email, :zerigo_token
recognizes :timeout, :persistent recognizes :timeout, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/dns/models/zerigo' model_path 'fog/dns/models/zerigo'
model :record model :record

View file

@ -7,7 +7,7 @@ module Fog
def self.new(attributes) def self.new(attributes)
attributes = attributes.dup # prevent delete from having side effects attributes = attributes.dup # prevent delete from having side effects
case provider = attributes[:provider].to_s.downcase.to_sym case provider = attributes.delete(:provider).to_s.downcase.to_sym
when :aws when :aws
require 'fog/storage/aws' require 'fog/storage/aws'
Fog::Storage::AWS.new(attributes) Fog::Storage::AWS.new(attributes)

View file

@ -4,7 +4,6 @@ module Fog
requires :aws_access_key_id, :aws_secret_access_key requires :aws_access_key_id, :aws_secret_access_key
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/storage/models/aws' model_path 'fog/storage/models/aws'
collection :directories collection :directories

View file

@ -4,7 +4,6 @@ module Fog
requires :google_storage_access_key_id, :google_storage_secret_access_key requires :google_storage_access_key_id, :google_storage_secret_access_key
recognizes :host, :port, :scheme, :persistent recognizes :host, :port, :scheme, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/storage/models/google' model_path 'fog/storage/models/google'
collection :directories collection :directories

View file

@ -3,7 +3,6 @@ module Fog
class Local < Fog::Service class Local < Fog::Service
requires :local_root requires :local_root
recognizes :provider # remove post deprecation
model_path 'fog/storage/models/local' model_path 'fog/storage/models/local'
collection :directories collection :directories

View file

@ -4,7 +4,6 @@ module Fog
requires :rackspace_api_key, :rackspace_username requires :rackspace_api_key, :rackspace_username
recognizes :rackspace_auth_url, :rackspace_servicenet, :rackspace_cdn_ssl, :persistent recognizes :rackspace_auth_url, :rackspace_servicenet, :rackspace_cdn_ssl, :persistent
recognizes :provider # remove post deprecation
model_path 'fog/storage/models/rackspace' model_path 'fog/storage/models/rackspace'
model :directory model :directory