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:
parent
c8ef903519
commit
ce2ae970e9
2 changed files with 10 additions and 0 deletions
|
@ -64,6 +64,11 @@ module Fog
|
|||
end
|
||||
end
|
||||
|
||||
def reboot
|
||||
connection.reboot_instances(@instance_id)
|
||||
true
|
||||
end
|
||||
|
||||
def save
|
||||
options = {}
|
||||
if @availability_zone
|
||||
|
|
|
@ -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?}
|
||||
|
|
Loading…
Add table
Reference in a new issue