From 75ca192740dce6bf03c8e5accfb2341cc55b6f1b Mon Sep 17 00:00:00 2001 From: Suraj Shirvankar Date: Tue, 29 Dec 2015 23:19:13 +0400 Subject: [PATCH] Deperate delete_server for destroy_server --- lib/fog/digitalocean/compute_v2.rb | 2 +- .../compute_v2/{delete_server.rb => destroy_server.rb} | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) rename lib/fog/digitalocean/requests/compute_v2/{delete_server.rb => destroy_server.rb} (69%) diff --git a/lib/fog/digitalocean/compute_v2.rb b/lib/fog/digitalocean/compute_v2.rb index 84389cac3..612fa7782 100644 --- a/lib/fog/digitalocean/compute_v2.rb +++ b/lib/fog/digitalocean/compute_v2.rb @@ -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 diff --git a/lib/fog/digitalocean/requests/compute_v2/delete_server.rb b/lib/fog/digitalocean/requests/compute_v2/destroy_server.rb similarity index 69% rename from lib/fog/digitalocean/requests/compute_v2/delete_server.rb rename to lib/fog/digitalocean/requests/compute_v2/destroy_server.rb index 40153beed..22dc6c148 100644 --- a/lib/fog/digitalocean/requests/compute_v2/delete_server.rb +++ b/lib/fog/digitalocean/requests/compute_v2/destroy_server.rb @@ -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