mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[brightbox] Removed reboot action and request due to API change
This commit is contained in:
parent
62ea7eddc2
commit
42d8ba33cd
5 changed files with 4 additions and 35 deletions
|
@ -50,7 +50,6 @@ module Fog
|
|||
request :rebuild_server
|
||||
request :reset_ftp_password_account
|
||||
request :resize_server
|
||||
request :restart_server
|
||||
request :shutdown_server
|
||||
request :snapshot_server
|
||||
request :start_server
|
||||
|
|
|
@ -34,10 +34,8 @@ module Fog
|
|||
connection.snapshot_server(identity)
|
||||
end
|
||||
|
||||
def reboot(type = "soft")
|
||||
requires :identity
|
||||
connection.restart_server(identity, :type => type)
|
||||
true
|
||||
def reboot
|
||||
false
|
||||
end
|
||||
|
||||
def start
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
module Fog
|
||||
module Brightbox
|
||||
class Compute
|
||||
class Real
|
||||
|
||||
def restart_server(identifier, options = {})
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
request(
|
||||
:expects => [202],
|
||||
:method => 'POST',
|
||||
:path => "/1.0/servers/#{identifier}/restart",
|
||||
:headers => {"Content-Type" => "application/json"},
|
||||
:body => options.to_json
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
|
||||
def restart_server(identifier, options = {})
|
||||
Fog::Mock.not_implemented
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@ describe 'Fog::Brightbox::Compute::Server' do
|
|||
end
|
||||
|
||||
subject {
|
||||
@image_id = "img-9vxqi" # Ubuntu Maverick 10.10 server
|
||||
@image_id = "img-t4p09" # Ubuntu Maverick 10.10 server
|
||||
@server = @servers.new(:image_id => @image_id)
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ describe 'Fog::Brightbox::Compute::Servers' do
|
|||
end
|
||||
|
||||
subject {
|
||||
@image_id = "img-9vxqi" # Ubuntu Maverick 10.10 server
|
||||
@image_id = "img-t4p09" # Ubuntu Maverick 10.10 server
|
||||
@server = @servers.new(:image_id => @image_id)
|
||||
@server
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue