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

trying to move gce to google.

This commit is contained in:
Nat Welch 2012-12-04 12:01:36 -08:00
parent bca4826bfe
commit e7728551cb
44 changed files with 16 additions and 25 deletions

View file

@ -61,7 +61,7 @@ require 'fog/bin/atmos'
require 'fog/bin/aws'
require 'fog/bin/bluebox'
require 'fog/bin/brightbox'
require 'fog/bin/gce'
require 'fog/bin/google'
require 'fog/bin/cloudstack'
require 'fog/bin/clodo'
require 'fog/bin/dnsimple'

View file

@ -15,7 +15,7 @@ class GCE < Fog::Bin
hash[key] = case key
when :compute
Fog::Logger.warning("GCE[:compute] is not recommended, use
Compute[:gce] for portability")
Compute[:google] for portability")
Fog::Compute.new(:provider => 'GCE')
else
raise ArgumentError, "Unrecognized service: #{key.inspect}"

View file

@ -19,8 +19,8 @@ module Fog
when :brightbox
require 'fog/brightbox/compute'
Fog::Compute::Brightbox.new(attributes)
when :gce
require 'fog/gce/compute'
when :google
require 'fog/google/compute'
Fog::Compute::GCE.new(attributes)
when :cloudstack
require 'fog/cloudstack/compute'

View file

@ -40,7 +40,7 @@ An alternate file may be used by placing its path in the FOG_RC environment vari
:bluebox_customer_id:
:brightbox_client_id:
:brightbox_secret:
:gce_project:
:google_project:
:clodo_api_key:
:clodo_username:
:go_grid_api_key:

View file

@ -1,10 +0,0 @@
require 'fog/core'
module Fog
module GCE
extend Fog::Provider
service(:compute, 'gce/compute', 'Compute')
end
end

View file

@ -5,6 +5,7 @@ module Fog
extend Fog::Provider
service(:compute, 'google/compute', 'Compute')
service(:storage, 'google/storage', 'Storage')
class Mock

View file

@ -1,15 +1,15 @@
require 'fog/gce'
require 'fog/google'
require 'fog/compute'
require 'fog/gce/oauth/oauth_util'
require 'fog/google/oauth/oauth_util'
require 'google/api_client'
module Fog
module Compute
class GCE < Fog::Service
requires :gce_project
requires :google_project
request_path 'fog/gce/requests/compute'
request_path 'fog/google/requests/compute'
request :list_servers
request :list_disks
request :list_firewalls
@ -43,7 +43,7 @@ module Fog
request :insert_network
request :insert_server
model_path 'fog/gce/models/compute'
model_path 'fog/google/models/compute'
model :server
collection :servers
@ -70,7 +70,7 @@ module Fog
api_version = 'v1beta13'
api_scope_url = 'https://www.googleapis.com/auth/compute'
@project = options[:gce_project]
@project = options[:google_project]
@api_url = base_url + api_version + '/projects/'
@client = ::Google::APIClient.new
@compute = @client.discovered_api('compute', api_version)

View file

@ -1,5 +1,5 @@
require 'fog/core/collection'
require 'fog/gce/models/compute/flavor'
require 'fog/google/models/compute/flavor'
module Fog
module Compute

View file

@ -1,5 +1,5 @@
require 'fog/core/collection'
require 'fog/gce/models/compute/image'
require 'fog/google/models/compute/image'
module Fog
module Compute

View file

@ -1,5 +1,5 @@
require 'fog/core/collection'
require 'fog/gce/models/compute/server'
require 'fog/google/models/compute/server'
module Fog
module Compute

View file

@ -2,7 +2,7 @@ require 'fog/atmos'
require 'fog/aws'
require 'fog/bluebox'
require 'fog/brightbox'
require 'fog/gce'
require 'fog/google'
require 'fog/cloudstack'
require 'fog/clodo'
require 'fog/dnsimple'