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

add reboot commands to instance/server models

This commit is contained in:
Wesley Beary 2009-11-21 10:42:20 -08:00
parent c8ef903519
commit ce2ae970e9
2 changed files with 10 additions and 0 deletions

View file

@ -64,6 +64,11 @@ module Fog
end
end
def reboot
connection.reboot_instances(@instance_id)
true
end
def save
options = {}
if @availability_zone

View file

@ -26,6 +26,11 @@ module Fog
connection.images(:server => self)
end
def reboot(type = 'SOFT')
connection.reboot_server(@id, type)
true
end
def save
options = { 'metadata' => @metadata, 'personality' => @personality }
options = options.reject {|key, value| value.nil?}