Sha256: 605c2b83a482131fa77e76e18fb85bf1c6839e018f618873c49bac84bf0b2800
Contents?: true
Size: 1.07 KB
Versions: 60
Compression:
Stored size: 1.07 KB
Contents
module Fog module Storage class Softlayer class Mock def delete_container(name) response = Excon::Response.new if @containers[name].nil? # Container doesn't exist. response.body = '<html><h1>Not Found</h1><p>The resource could not be found.</p></html>' response.status = 404 elsif @containers[name].length > 0 # Container not empty response.body = '<html><h1>Conflict</h1><p>There was a conflict when trying to complete your request.</p></html>' response.status = 409 else # Success response.body = '' response.status = 204 end response end end class Real # Delete an existing container # # ==== Parameters # * name<~String> - Name of container to delete # def delete_container(name) request( :expects => 204, :method => 'DELETE', :path => Fog::Softlayer.escape(name) ) end end end end end
Version data entries
60 entries across 58 versions & 3 rubygems