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

Deperate delete_server for destroy_server

This commit is contained in:
Suraj Shirvankar 2015-12-29 23:19:13 +04:00
parent 32add3d9a4
commit 75ca192740
2 changed files with 9 additions and 2 deletions

View file

@ -21,7 +21,7 @@ module Fog
request :change_kernel
request :create_server
request :create_ssh_key
request :delete_server
request :destroy_server
request :delete_ssh_key
request :disable_backups
request :enable_ipv6

View file

@ -4,6 +4,10 @@ module Fog
# noinspection RubyStringKeysInHashInspection
class Real
def delete_server(server_id)
Fog::Logger.warning("delete_server method has been deprecated, use destroy_server instead")
destroy_server(server_id)
end
def destroy_server(server_id)
request(
:expects => [204],
:headers => {
@ -17,7 +21,10 @@ module Fog
# noinspection RubyStringKeysInHashInspection
class Mock
def delete_server(_)
def delete_server(server_id)
destroy_server(server_id)
end
def destroy_server(_)
response = Excon::Response.new
response.status = 204
response