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

[terremark] cleanup for server model

This commit is contained in:
geemus (Wesley Beary) 2010-04-19 21:05:10 -07:00
parent d590ad434c
commit 6227fda58a

View file

@ -12,8 +12,7 @@ module Fog
def destroy
requires :id
data = connection.power_off(@id).body
task = connection.tasks.new(data)
task = connection.tasks.new(connection.power_off(@id).body)
task.wait_for { ready? }
connection.delete_vapp(@id)
true
@ -34,10 +33,10 @@ module Fog
requires :name
data = connection.instantiate_vapp(@name)
merge_attributes(data.body)
task = connection.deploy_vapp(@id)
task.wait_for { ready? }
task = connection.power_on(@id)
task.wait_for { ready? }
deploy_task = connection.tasks.new(connection.deploy_vapp(@id).body)
deploy_task.wait_for { ready? }
power_on_task = connection.tasks.new(connection.power_on(@id).body)
power_on_task.wait_for { ready? }
true
end