mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
progress.
This commit is contained in:
parent
4308d7d627
commit
0b2a865cfc
4 changed files with 8 additions and 3 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,12 @@ module Fog
|
||||||
else
|
else
|
||||||
data = service.get_server(identity, zone).body
|
data = service.get_server(identity, zone).body
|
||||||
end
|
end
|
||||||
new(data)
|
|
||||||
|
if data["code"] != 200
|
||||||
|
nil
|
||||||
|
else
|
||||||
|
new(data)
|
||||||
|
end
|
||||||
rescue Excon::Errors::NotFound
|
rescue Excon::Errors::NotFound
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -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}"
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue