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:
parent
69407efdbb
commit
5dbd9d5e85
30 changed files with 6 additions and 31 deletions
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
def self.new(attributes)
|
||||
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
|
||||
require 'fog/cdn/aws'
|
||||
Fog::CDN::AWS.new(attributes)
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :aws_access_key_id, :aws_secret_access_key
|
||||
recognizes :host, :path, :port, :scheme, :version, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/cdn/models/aws'
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :rackspace_api_key, :rackspace_username
|
||||
recognizes :rackspace_auth_url, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/cdn/models/rackspace'
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
def self.new(attributes)
|
||||
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
|
||||
require 'fog/compute/aws'
|
||||
Fog::Compute::AWS.new(attributes)
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :aws_access_key_id, :aws_secret_access_key
|
||||
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/aws'
|
||||
model :address
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :bluebox_api_key, :bluebox_customer_id
|
||||
recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/bluebox'
|
||||
model :flavor
|
||||
|
|
|
@ -6,7 +6,6 @@ module Fog
|
|||
|
||||
requires :brightbox_client_id, :brightbox_secret
|
||||
recognizes :brightbox_auth_url, :brightbox_api_url
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/brightbox'
|
||||
model :account # Singular resource, no collection
|
||||
|
|
|
@ -830,7 +830,6 @@ module Fog
|
|||
|
||||
requires :ecloud_username, :ecloud_password, :ecloud_versions_uri
|
||||
recognizes :ecloud_version
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/ecloud'
|
||||
model :catalog_item
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :go_grid_api_key, :go_grid_shared_secret
|
||||
recognizes :host, :path, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/go_grid'
|
||||
model :image
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :linode_api_key
|
||||
recognizes :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/linode'
|
||||
model :flavor
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :new_servers_password, :new_servers_username
|
||||
recognizes :host, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/new_servers'
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ module Fog
|
|||
API_URL = "http://api.ninefold.com/compute/v1.0/"
|
||||
|
||||
requires :ninefold_compute_key, :ninefold_compute_secret
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/ninefold'
|
||||
model :server
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :rackspace_api_key, :rackspace_username
|
||||
recognizes :rackspace_auth_url, :rackspace_servicenet, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/rackspace'
|
||||
model :flavor
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :slicehost_password
|
||||
recognizes :host, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/slicehost'
|
||||
model :flavor
|
||||
|
|
|
@ -6,7 +6,6 @@ module Fog
|
|||
|
||||
requires :storm_on_demand_username, :storm_on_demand_password
|
||||
recognizes :storm_on_demand_auth_url
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/storm_on_demand'
|
||||
model :config
|
||||
|
|
|
@ -2,8 +2,6 @@ module Fog
|
|||
module Compute
|
||||
class VirtualBox < Fog::Service
|
||||
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/compute/models/virtual_box'
|
||||
model :medium
|
||||
collection :mediums
|
||||
|
|
|
@ -3,7 +3,7 @@ module Fog
|
|||
class Voxel < Fog::Service
|
||||
|
||||
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 :image
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
def self.new(attributes)
|
||||
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
|
||||
require 'fog/dns/aws'
|
||||
Fog::DNS::AWS.new(attributes)
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :aws_access_key_id, :aws_secret_access_key
|
||||
recognizes :host, :path, :port, :scheme, :version, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/aws'
|
||||
model :record
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
module Fog
|
||||
module DNS
|
||||
class Bluebox < Fog::Service
|
||||
|
||||
requires :bluebox_api_key, :bluebox_customer_id
|
||||
recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/bluebox'
|
||||
model :record
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :dnsimple_email, :dnsimple_password
|
||||
recognizes :dnsimple_url, :host, :path, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/dnsimple'
|
||||
model :record
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :dnsmadeeasy_api_key, :dnsmadeeasy_secret_key
|
||||
recognizes :host, :path, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/dnsmadeeasy'
|
||||
model :record
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :linode_api_key
|
||||
recognizes :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/linode'
|
||||
model :record
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :slicehost_password
|
||||
recognizes :host, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/slicehost'
|
||||
model :record
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :zerigo_email, :zerigo_token
|
||||
recognizes :timeout, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/dns/models/zerigo'
|
||||
model :record
|
||||
|
|
|
@ -7,7 +7,7 @@ module Fog
|
|||
|
||||
def self.new(attributes)
|
||||
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
|
||||
require 'fog/storage/aws'
|
||||
Fog::Storage::AWS.new(attributes)
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :aws_access_key_id, :aws_secret_access_key
|
||||
recognizes :endpoint, :region, :host, :path, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/storage/models/aws'
|
||||
collection :directories
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :google_storage_access_key_id, :google_storage_secret_access_key
|
||||
recognizes :host, :port, :scheme, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/storage/models/google'
|
||||
collection :directories
|
||||
|
|
|
@ -3,7 +3,6 @@ module Fog
|
|||
class Local < Fog::Service
|
||||
|
||||
requires :local_root
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/storage/models/local'
|
||||
collection :directories
|
||||
|
|
|
@ -4,7 +4,6 @@ module Fog
|
|||
|
||||
requires :rackspace_api_key, :rackspace_username
|
||||
recognizes :rackspace_auth_url, :rackspace_servicenet, :rackspace_cdn_ssl, :persistent
|
||||
recognizes :provider # remove post deprecation
|
||||
|
||||
model_path 'fog/storage/models/rackspace'
|
||||
model :directory
|
||||
|
|
Loading…
Reference in a new issue