mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
added shutdown, reboot, boot
This commit is contained in:
parent
cb2b671c93
commit
10032ca389
2 changed files with 21 additions and 5 deletions
|
@ -34,7 +34,7 @@ module Fog
|
|||
request :linode_disk_list
|
||||
request :linode_disk_delete
|
||||
request :linode_disk_createfromdistribution
|
||||
request :linode_disk_createfromstackscript
|
||||
request :linode_disk_createfromstackscript
|
||||
request :linode_ip_list
|
||||
request :linode_ip_addprivate
|
||||
request :linode_config_list
|
||||
|
@ -42,11 +42,11 @@ module Fog
|
|||
request :linode_create
|
||||
request :linode_delete
|
||||
request :linode_list
|
||||
request :linode_boot
|
||||
request :linode_boot
|
||||
request :linode_reboot
|
||||
request :linode_shutdown
|
||||
request :linode_update
|
||||
request :stackscript_list
|
||||
request :stackscript_list
|
||||
# request :linode_resize
|
||||
|
||||
class Mock
|
||||
|
|
|
@ -10,17 +10,33 @@ module Fog
|
|||
attribute :status
|
||||
|
||||
def ips
|
||||
@ips = Fog::Linode::Compute::Ips.new :server => self, :connection => connection
|
||||
Fog::Linode::Compute::Ips.new :server => self, :connection => connection
|
||||
end
|
||||
|
||||
def disks
|
||||
@disks = Fog::Linode::Compute::Disks.new :server => self, :connection => connection
|
||||
Fog::Linode::Compute::Disks.new :server => self, :connection => connection
|
||||
end
|
||||
|
||||
def disks?
|
||||
not disks.empty?
|
||||
end
|
||||
|
||||
def config
|
||||
connection.linode_config_list(id).body['DATA'].first['ConfigID']
|
||||
end
|
||||
|
||||
def reboot
|
||||
connection.linode_reboot id
|
||||
end
|
||||
|
||||
def shutdown
|
||||
connection.linode_shutdown id
|
||||
end
|
||||
|
||||
def boot
|
||||
connection.linode_boot id, config
|
||||
end
|
||||
|
||||
def save
|
||||
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity
|
||||
@data_center, @flavor, @image, @type, @payment_terms, @stack_script, @name, @password, @callback =
|
||||
|
|
Loading…
Reference in a new issue