Sha256: 415e6966d873013262bc6e9290243aeb617691a9ca41a0198456a58e522a77a2

Contents?: true

Size: 699 Bytes

Versions: 39

Compression:

Stored size: 699 Bytes

Contents

module Fog
  module Storage
    class OpenStack
      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

Version data entries

39 entries across 37 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.10 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.30 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.29 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.9 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.28 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.8 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.7 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.6 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.5 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.4 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.3 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.2 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.3.0 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.2.4 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.2.3 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.2.2 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.2.1 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.2.0 lib/fog/storage/openstack/requests/put_container.rb
fog-zj-0.1.28 lib/fog/storage/openstack/requests/put_container.rb