1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/openstack/requests/orchestration/delete_stack.rb
Dan Prince d49b10b1dc Fix orchestration request status codes.
Make the OpenStack Orchestration return codes match what
actually gets returned from Heat.
2013-10-02 09:46:50 -04:00

37 lines
894 B
Ruby

module Fog
module Orchestration
class OpenStack
class Real
# Delete a stack.
#
# @param stack_name [String] Name of the stack to delete.
# @param stack_id [String] ID of the stack to delete.
#
# @return [Excon::Response]
#
# @see http://docs.amazonwebservices.com/AWSCloudFormation/latest/APIReference/API_DeleteStack.html
def delete_stack(stack_name, stack_id)
request(
:expects => 204,
:path => "stacks/#{stack_name}/#{stack_id}",
:method => 'DELETE'
)
end
end
class Mock
def delete_stack(stack_name, stack_id)
self.data[:stacks].delete(stack_id)
response = Excon::Response.new
response.status = 204
response.body = {}
response
end
end
end
end
end