diff --git a/lib/fog/bin.rb b/lib/fog/bin.rb index 58e5be1e1..0174dbe78 100644 --- a/lib/fog/bin.rb +++ b/lib/fog/bin.rb @@ -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' diff --git a/lib/fog/bin/gce.rb b/lib/fog/bin/gce.rb index 0020bf8b8..c5736c015 100644 --- a/lib/fog/bin/gce.rb +++ b/lib/fog/bin/gce.rb @@ -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}" diff --git a/lib/fog/compute.rb b/lib/fog/compute.rb index d821d9219..426d00f4f 100644 --- a/lib/fog/compute.rb +++ b/lib/fog/compute.rb @@ -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' diff --git a/lib/fog/core/errors.rb b/lib/fog/core/errors.rb index 3728f3bf9..9fd8b4f27 100644 --- a/lib/fog/core/errors.rb +++ b/lib/fog/core/errors.rb @@ -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: diff --git a/lib/fog/gce.rb b/lib/fog/gce.rb deleted file mode 100644 index 81d14b3d9..000000000 --- a/lib/fog/gce.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'fog/core' - -module Fog - module GCE - extend Fog::Provider - - service(:compute, 'gce/compute', 'Compute') - - end -end diff --git a/lib/fog/google.rb b/lib/fog/google.rb index 7b07a7cc6..301245e9e 100644 --- a/lib/fog/google.rb +++ b/lib/fog/google.rb @@ -5,6 +5,7 @@ module Fog extend Fog::Provider + service(:compute, 'google/compute', 'Compute') service(:storage, 'google/storage', 'Storage') class Mock diff --git a/lib/fog/gce/compute.rb b/lib/fog/google/compute.rb similarity index 91% rename from lib/fog/gce/compute.rb rename to lib/fog/google/compute.rb index fc5d2aefe..3d51ba39a 100644 --- a/lib/fog/gce/compute.rb +++ b/lib/fog/google/compute.rb @@ -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) diff --git a/lib/fog/gce/models/compute/flavor.rb b/lib/fog/google/models/compute/flavor.rb similarity index 100% rename from lib/fog/gce/models/compute/flavor.rb rename to lib/fog/google/models/compute/flavor.rb diff --git a/lib/fog/gce/models/compute/flavors.rb b/lib/fog/google/models/compute/flavors.rb similarity index 91% rename from lib/fog/gce/models/compute/flavors.rb rename to lib/fog/google/models/compute/flavors.rb index 3baea2e82..945dd56c9 100644 --- a/lib/fog/gce/models/compute/flavors.rb +++ b/lib/fog/google/models/compute/flavors.rb @@ -1,5 +1,5 @@ require 'fog/core/collection' -require 'fog/gce/models/compute/flavor' +require 'fog/google/models/compute/flavor' module Fog module Compute diff --git a/lib/fog/gce/models/compute/image.rb b/lib/fog/google/models/compute/image.rb similarity index 100% rename from lib/fog/gce/models/compute/image.rb rename to lib/fog/google/models/compute/image.rb diff --git a/lib/fog/gce/models/compute/images.rb b/lib/fog/google/models/compute/images.rb similarity index 91% rename from lib/fog/gce/models/compute/images.rb rename to lib/fog/google/models/compute/images.rb index 7b6f3307d..ee81481ed 100644 --- a/lib/fog/gce/models/compute/images.rb +++ b/lib/fog/google/models/compute/images.rb @@ -1,5 +1,5 @@ require 'fog/core/collection' -require 'fog/gce/models/compute/image' +require 'fog/google/models/compute/image' module Fog module Compute diff --git a/lib/fog/gce/models/compute/server.rb b/lib/fog/google/models/compute/server.rb similarity index 100% rename from lib/fog/gce/models/compute/server.rb rename to lib/fog/google/models/compute/server.rb diff --git a/lib/fog/gce/models/compute/servers.rb b/lib/fog/google/models/compute/servers.rb similarity index 91% rename from lib/fog/gce/models/compute/servers.rb rename to lib/fog/google/models/compute/servers.rb index 562738dea..ce6f7f6dd 100644 --- a/lib/fog/gce/models/compute/servers.rb +++ b/lib/fog/google/models/compute/servers.rb @@ -1,5 +1,5 @@ require 'fog/core/collection' -require 'fog/gce/models/compute/server' +require 'fog/google/models/compute/server' module Fog module Compute diff --git a/lib/fog/gce/oauth/oauth_util.rb b/lib/fog/google/oauth/oauth_util.rb similarity index 100% rename from lib/fog/gce/oauth/oauth_util.rb rename to lib/fog/google/oauth/oauth_util.rb diff --git a/lib/fog/gce/requests/compute/delete_disk.rb b/lib/fog/google/requests/compute/delete_disk.rb similarity index 100% rename from lib/fog/gce/requests/compute/delete_disk.rb rename to lib/fog/google/requests/compute/delete_disk.rb diff --git a/lib/fog/gce/requests/compute/delete_firewall.rb b/lib/fog/google/requests/compute/delete_firewall.rb similarity index 100% rename from lib/fog/gce/requests/compute/delete_firewall.rb rename to lib/fog/google/requests/compute/delete_firewall.rb diff --git a/lib/fog/gce/requests/compute/delete_image.rb b/lib/fog/google/requests/compute/delete_image.rb similarity index 100% rename from lib/fog/gce/requests/compute/delete_image.rb rename to lib/fog/google/requests/compute/delete_image.rb diff --git a/lib/fog/gce/requests/compute/delete_network.rb b/lib/fog/google/requests/compute/delete_network.rb similarity index 100% rename from lib/fog/gce/requests/compute/delete_network.rb rename to lib/fog/google/requests/compute/delete_network.rb diff --git a/lib/fog/gce/requests/compute/delete_operation.rb b/lib/fog/google/requests/compute/delete_operation.rb similarity index 100% rename from lib/fog/gce/requests/compute/delete_operation.rb rename to lib/fog/google/requests/compute/delete_operation.rb diff --git a/lib/fog/gce/requests/compute/delete_server.rb b/lib/fog/google/requests/compute/delete_server.rb similarity index 100% rename from lib/fog/gce/requests/compute/delete_server.rb rename to lib/fog/google/requests/compute/delete_server.rb diff --git a/lib/fog/gce/requests/compute/get_disk.rb b/lib/fog/google/requests/compute/get_disk.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_disk.rb rename to lib/fog/google/requests/compute/get_disk.rb diff --git a/lib/fog/gce/requests/compute/get_firewall.rb b/lib/fog/google/requests/compute/get_firewall.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_firewall.rb rename to lib/fog/google/requests/compute/get_firewall.rb diff --git a/lib/fog/gce/requests/compute/get_image.rb b/lib/fog/google/requests/compute/get_image.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_image.rb rename to lib/fog/google/requests/compute/get_image.rb diff --git a/lib/fog/gce/requests/compute/get_kernel.rb b/lib/fog/google/requests/compute/get_kernel.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_kernel.rb rename to lib/fog/google/requests/compute/get_kernel.rb diff --git a/lib/fog/gce/requests/compute/get_machine_type.rb b/lib/fog/google/requests/compute/get_machine_type.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_machine_type.rb rename to lib/fog/google/requests/compute/get_machine_type.rb diff --git a/lib/fog/gce/requests/compute/get_network.rb b/lib/fog/google/requests/compute/get_network.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_network.rb rename to lib/fog/google/requests/compute/get_network.rb diff --git a/lib/fog/gce/requests/compute/get_operation.rb b/lib/fog/google/requests/compute/get_operation.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_operation.rb rename to lib/fog/google/requests/compute/get_operation.rb diff --git a/lib/fog/gce/requests/compute/get_server.rb b/lib/fog/google/requests/compute/get_server.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_server.rb rename to lib/fog/google/requests/compute/get_server.rb diff --git a/lib/fog/gce/requests/compute/get_zone.rb b/lib/fog/google/requests/compute/get_zone.rb similarity index 100% rename from lib/fog/gce/requests/compute/get_zone.rb rename to lib/fog/google/requests/compute/get_zone.rb diff --git a/lib/fog/gce/requests/compute/insert_disk.rb b/lib/fog/google/requests/compute/insert_disk.rb similarity index 100% rename from lib/fog/gce/requests/compute/insert_disk.rb rename to lib/fog/google/requests/compute/insert_disk.rb diff --git a/lib/fog/gce/requests/compute/insert_firewall.rb b/lib/fog/google/requests/compute/insert_firewall.rb similarity index 100% rename from lib/fog/gce/requests/compute/insert_firewall.rb rename to lib/fog/google/requests/compute/insert_firewall.rb diff --git a/lib/fog/gce/requests/compute/insert_image.rb b/lib/fog/google/requests/compute/insert_image.rb similarity index 100% rename from lib/fog/gce/requests/compute/insert_image.rb rename to lib/fog/google/requests/compute/insert_image.rb diff --git a/lib/fog/gce/requests/compute/insert_network.rb b/lib/fog/google/requests/compute/insert_network.rb similarity index 100% rename from lib/fog/gce/requests/compute/insert_network.rb rename to lib/fog/google/requests/compute/insert_network.rb diff --git a/lib/fog/gce/requests/compute/insert_server.rb b/lib/fog/google/requests/compute/insert_server.rb similarity index 100% rename from lib/fog/gce/requests/compute/insert_server.rb rename to lib/fog/google/requests/compute/insert_server.rb diff --git a/lib/fog/gce/requests/compute/list_disks.rb b/lib/fog/google/requests/compute/list_disks.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_disks.rb rename to lib/fog/google/requests/compute/list_disks.rb diff --git a/lib/fog/gce/requests/compute/list_firewalls.rb b/lib/fog/google/requests/compute/list_firewalls.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_firewalls.rb rename to lib/fog/google/requests/compute/list_firewalls.rb diff --git a/lib/fog/gce/requests/compute/list_images.rb b/lib/fog/google/requests/compute/list_images.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_images.rb rename to lib/fog/google/requests/compute/list_images.rb diff --git a/lib/fog/gce/requests/compute/list_kernels.rb b/lib/fog/google/requests/compute/list_kernels.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_kernels.rb rename to lib/fog/google/requests/compute/list_kernels.rb diff --git a/lib/fog/gce/requests/compute/list_machine_types.rb b/lib/fog/google/requests/compute/list_machine_types.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_machine_types.rb rename to lib/fog/google/requests/compute/list_machine_types.rb diff --git a/lib/fog/gce/requests/compute/list_networks.rb b/lib/fog/google/requests/compute/list_networks.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_networks.rb rename to lib/fog/google/requests/compute/list_networks.rb diff --git a/lib/fog/gce/requests/compute/list_operations.rb b/lib/fog/google/requests/compute/list_operations.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_operations.rb rename to lib/fog/google/requests/compute/list_operations.rb diff --git a/lib/fog/gce/requests/compute/list_servers.rb b/lib/fog/google/requests/compute/list_servers.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_servers.rb rename to lib/fog/google/requests/compute/list_servers.rb diff --git a/lib/fog/gce/requests/compute/list_zones.rb b/lib/fog/google/requests/compute/list_zones.rb similarity index 100% rename from lib/fog/gce/requests/compute/list_zones.rb rename to lib/fog/google/requests/compute/list_zones.rb diff --git a/lib/fog/providers.rb b/lib/fog/providers.rb index d06e40a05..871470e68 100644 --- a/lib/fog/providers.rb +++ b/lib/fog/providers.rb @@ -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'