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

Add request layer method for put_shared_container.

This commit is contained in:
Rupak Ganguly 2012-10-26 01:47:48 -04:00
parent 98413b3e87
commit 3274dc6b7c
2 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,40 @@
module Fog
module Storage
class HP
class Real
# Update a shared container
#
# ==== Parameters
# * shared_container_url<~String> - Shared url for the container
# * options<~Hash> - header options
#
def put_shared_container(shared_container_url, options = {})
# split up the shared container url
uri = URI.parse(shared_container_url)
path = uri.path
response = shared_request(
:expects => [201, 202],
:headers => options,
:method => 'PUT',
:path => path
)
response
end
end
class Mock # :nodoc:all
def put_shared_container(shared_container_url, options = {})
response = Excon::Response.new
response.status = 201
response.headers.merge!(options)
response
end
end
end
end
end

View file

@ -33,6 +33,7 @@ module Fog
request :head_shared_container
request :head_shared_object
request :put_container
request :put_shared_container
request :put_object
request :put_shared_object