mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
get rid of gAPI warnings and Fog deprecation notices.
This commit is contained in:
parent
079f23379e
commit
884442d9d1
3 changed files with 7 additions and 4 deletions
|
@ -79,7 +79,10 @@ module Fog
|
|||
@api_url = base_url + api_version + '/projects/'
|
||||
key = ::Google::APIClient::KeyUtils.load_from_pkcs12(File.expand_path(options[:google_key_location]), 'notasecret')
|
||||
|
||||
@client = ::Google::APIClient.new
|
||||
@client = ::Google::APIClient.new(
|
||||
:application_name => "fog",
|
||||
:application_version => Fog::VERSION,
|
||||
)
|
||||
@client.authorization = Signet::OAuth2::Client.new(
|
||||
:audience => 'https://accounts.google.com/o/oauth2/token',
|
||||
:auth_provider_x509_cert_url => "https://www.googleapis.com/oauth2/v1/certs",
|
||||
|
|
|
@ -6,7 +6,7 @@ module Fog
|
|||
|
||||
class Server < Fog::Model
|
||||
|
||||
attribute :name, :aliases => 'identity'
|
||||
identity :name
|
||||
attribute :image_name, :aliases => 'image'
|
||||
attribute :network_interfaces, :aliases => 'networkInterfaces'
|
||||
attribute :state, :aliases => 'status'
|
||||
|
|
|
@ -15,7 +15,7 @@ module Fog
|
|||
end
|
||||
|
||||
def get(identity)
|
||||
data = connection.get_server(identity).body
|
||||
data = service.get_server(identity).body
|
||||
new(data)
|
||||
rescue Excon::Errors::NotFound
|
||||
nil
|
||||
|
@ -24,7 +24,7 @@ module Fog
|
|||
def bootstrap(new_attributes = {})
|
||||
|
||||
defaults = {
|
||||
:name => "fog_#{Time.now.to_i}",
|
||||
:name => "fog-#{Time.now.to_i}",
|
||||
:image_name => "",
|
||||
:machine_type => "",
|
||||
:zone_name => "",
|
||||
|
|
Loading…
Add table
Reference in a new issue