1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
module Fog
module OpenStack
class Storage
class Real
# Create a new container
#
# ==== Parameters
# * name<~String> - Name for container, should be < 256 bytes and must not contain '/'
#
def put_container(name, options = {})
headers = options[:headers] || {}
headers['X-Container-Read'] = '.r:*' if options[:public]
headers['X-Remove-Container-Read'] = 'x' if options[:public] == false
request(
:expects => [201, 202],
:method => 'PUT',
:path => Fog::OpenStack.escape(name),
:headers => headers
)
end
end
end
end
end
|