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

[digitalocean|compute] added power_off_server mock code

This commit is contained in:
Sergio Rubio 2013-03-18 12:52:10 +01:00
parent 92593dd8bf
commit 79f240f373

View file

@ -16,7 +16,15 @@ module Fog
class Mock
def power_off_server( id )
Fog::Mock.not_implemented
response = Excon::Response.new
response.status = 200
server = self.data[:servers].find { |s| s['id'] }
server['status'] = 'off' if server
response.body = {
"event_id" => Fog::Mock.random_numbers(1).to_i,
"status" => "OK"
}
response
end
end