Sha256: 15e15daf0889b347e69f5e71034f3e5b321dac033bbeca4fb1da85425d1e2f04

Contents?: true

Size: 701 Bytes

Versions: 27

Compression:

Stored size: 701 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

27 entries across 27 versions & 4 rubygems

Version Path
fog-1.30.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.29.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.28.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.27.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.26.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.25.0 lib/fog/openstack/requests/storage/put_container.rb
nsidc-fog-1.24.1 lib/fog/openstack/requests/storage/put_container.rb