mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[Brightbox] Rename old destroy requests to delete
To standardised with the Delete in CRUD we decided to update the API documentation but had used the old names in the Fog requests. This replaces them with deprecation to the old methods so they continue to work as before.
This commit is contained in:
parent
2ef483c89e
commit
c3e4d7eddf
10 changed files with 90 additions and 27 deletions
|
@ -71,15 +71,15 @@ module Fog
|
|||
request :create_load_balancer
|
||||
request :create_server
|
||||
request :create_server_group
|
||||
request :destroy_api_client
|
||||
request :destroy_application
|
||||
request :destroy_cloud_ip
|
||||
request :destroy_firewall_policy
|
||||
request :destroy_firewall_rule
|
||||
request :destroy_image
|
||||
request :destroy_load_balancer
|
||||
request :destroy_server
|
||||
request :destroy_server_group
|
||||
request :delete_api_client
|
||||
request :delete_application
|
||||
request :delete_cloud_ip
|
||||
request :delete_firewall_policy
|
||||
request :delete_firewall_rule
|
||||
request :delete_image
|
||||
request :delete_load_balancer
|
||||
request :delete_server
|
||||
request :delete_server_group
|
||||
request :get_account
|
||||
request :get_api_client
|
||||
request :get_application
|
||||
|
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#api_client_destroy_api_client
|
||||
# @see https://api.gb1.brightbox.com/1.0/#api_client_delete_api_client
|
||||
#
|
||||
def destroy_api_client(identifier)
|
||||
def delete_api_client(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/api_clients/#{identifier}", [200])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_api_client+ instead
|
||||
#
|
||||
def destroy_api_client(identifier)
|
||||
delete_api_client(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#application_destroy_application
|
||||
# @see https://api.gb1.brightbox.com/1.0/#application_delete_application
|
||||
#
|
||||
def destroy_application(identifier)
|
||||
def delete_application(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/applications/#{identifier}", [200])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_application+ instead
|
||||
#
|
||||
def destroy_application(identifier)
|
||||
delete_application(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#cloud_ip_destroy_cloud_ip
|
||||
# @see https://api.gb1.brightbox.com/1.0/#cloud_ip_delete_cloud_ip
|
||||
#
|
||||
def destroy_cloud_ip(identifier)
|
||||
def delete_cloud_ip(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/cloud_ips/#{identifier}", [200])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_cloud_ip+ instead
|
||||
#
|
||||
def destroy_cloud_ip(identifier)
|
||||
delete_cloud_ip(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#firewall_policy_destroy_firewall_policy
|
||||
# @see https://api.gb1.brightbox.com/1.0/#firewall_policy_delete_firewall_policy
|
||||
#
|
||||
def destroy_firewall_policy(identifier)
|
||||
def delete_firewall_policy(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/firewall_policies/#{identifier}", [202])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_firewall_policy+ instead
|
||||
#
|
||||
def destroy_firewall_policy(identifier)
|
||||
delete_firewall_policy(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#firewall_rule_destroy_firewall_rule
|
||||
# @see https://api.gb1.brightbox.com/1.0/#firewall_rule_delete_firewall_rule
|
||||
#
|
||||
def destroy_firewall_rule(identifier)
|
||||
def delete_firewall_rule(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/firewall_rules/#{identifier}", [202])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_firewall_rule+ instead
|
||||
#
|
||||
def destroy_firewall_rule(identifier)
|
||||
delete_firewall_rule(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#image_destroy_image
|
||||
# @see https://api.gb1.brightbox.com/1.0/#image_delete_image
|
||||
#
|
||||
def destroy_image(identifier)
|
||||
def delete_image(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/images/#{identifier}", [202])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_image+ instead
|
||||
#
|
||||
def destroy_image(identifier)
|
||||
delete_image(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#load_balancer_destroy_load_balancer
|
||||
# @see https://api.gb1.brightbox.com/1.0/#load_balancer_delete_load_balancer
|
||||
#
|
||||
def destroy_load_balancer(identifier)
|
||||
def delete_load_balancer(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/load_balancers/#{identifier}", [202])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_load_balancer+ instead
|
||||
#
|
||||
def destroy_load_balancer(identifier)
|
||||
delete_load_balancer(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#server_destroy_server
|
||||
# @see https://api.gb1.brightbox.com/1.0/#server_delete_server
|
||||
#
|
||||
def destroy_server(identifier)
|
||||
def delete_server(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/servers/#{identifier}", [202])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_server+ instead
|
||||
#
|
||||
def destroy_server(identifier)
|
||||
delete_server(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -8,13 +8,20 @@ module Fog
|
|||
#
|
||||
# @return [Hash] The JSON response parsed to a Hash
|
||||
#
|
||||
# @see https://api.gb1.brightbox.com/1.0/#server_group_destroy_server_group
|
||||
# @see https://api.gb1.brightbox.com/1.0/#server_group_delete_server_group
|
||||
#
|
||||
def destroy_server_group(identifier)
|
||||
def delete_server_group(identifier)
|
||||
return nil if identifier.nil? || identifier == ""
|
||||
wrapped_request("delete", "/1.0/server_groups/#{identifier}", [202])
|
||||
end
|
||||
|
||||
# Old format of the delete request.
|
||||
#
|
||||
# @deprecated Use +#delete_server_group+ instead
|
||||
#
|
||||
def destroy_server_group(identifier)
|
||||
delete_server_group(identifier)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue