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

progress.

This commit is contained in:
Nat Welch 2013-04-29 17:09:51 -07:00
parent 4308d7d627
commit 0b2a865cfc
4 changed files with 8 additions and 3 deletions

View file

@ -45,6 +45,8 @@ module Fog
image_name, image_name,
zone_name, zone_name,
machine_type) machine_type)
p data
service.servers.merge_attributes() service.servers.merge_attributes()
end end

View file

@ -24,7 +24,12 @@ module Fog
else else
data = service.get_server(identity, zone).body data = service.get_server(identity, zone).body
end end
if data["code"] != 200
nil
else
new(data) new(data)
end
rescue Excon::Errors::NotFound rescue Excon::Errors::NotFound
nil nil
end end

View file

@ -24,7 +24,6 @@ module Fog
body_object = { body_object = {
'name' => server_name, 'name' => server_name,
'image' => @api_url + @project + "/global/images/#{image_name}", 'image' => @api_url + @project + "/global/images/#{image_name}",
'zone' => @api_url + @project + "/zones/#{zone_name}",
'machineType' => @api_url + @project + "/global/machineTypes/#{machine_name}", 'machineType' => @api_url + @project + "/global/machineTypes/#{machine_name}",
'networkInterfaces' => [{ 'networkInterfaces' => [{
'network' => @api_url + @project + "/global/networks/#{network_name}" 'network' => @api_url + @project + "/global/networks/#{network_name}"

View file

@ -10,6 +10,5 @@ Shindo.tests("Fog::Compute[:google] | server model", ['google']) do
test('#destroy') do test('#destroy') do
@instance.destroy @instance.destroy
end end
end end
end end