Sha256: cd014e193e8c8cded5bf851e3fd250523aab0d36bfee6f46af1a8cdfc717bf0e

Contents?: true

Size: 699 Bytes

Versions: 20

Compression:

Stored size: 699 Bytes

Contents

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

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
fog-openstack-1.1.3 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.1.2 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-fork-99 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.1.0 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.1.0.pre lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-apibank-1.0.102 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.11 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-apibank-1.0.101 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.10 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.9 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.8 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.7 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.6 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.5 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.4 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.3 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.2 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.1 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-1.0.0 lib/fog/openstack/storage/requests/put_container.rb
fog-openstack-0.3.1 lib/fog/openstack/storage/requests/put_container.rb