From a23d615ad54471af54807cd80dcc64bda325f0a6 Mon Sep 17 00:00:00 2001 From: Nat Welch Date: Tue, 9 Jul 2013 10:24:35 -0700 Subject: [PATCH] [google|compute] Fix some bugs with using create without bootstrap. --- lib/fog/google/models/compute/server.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/fog/google/models/compute/server.rb b/lib/fog/google/models/compute/server.rb index 950ca7449..c99638575 100644 --- a/lib/fog/google/models/compute/server.rb +++ b/lib/fog/google/models/compute/server.rb @@ -64,20 +64,20 @@ module Fog requires :machine_type requires :zone_name - if metadata.nil? - metadata = {} + if self.metadata.nil? + self.metadata = {} end - metadata.merge!({ + self.metadata.merge!({ "sshKeys" => "#{username}:#{File.read(public_key_path).strip}" }) if :public_key_path data = service.insert_server( - name, - image_name, - zone_name, - machine_type, - metadata) + self.name, + self.image_name, + self.zone_name, + self.machine_type, + self.metadata) end end