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-openstack-0.1.10 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.5 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.4 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.3 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.2 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.1 lib/fog/openstack/requests/storage/put_container.rb
fog-openstack-0.1.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.37.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.36.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.35.0 lib/fog/openstack/requests/storage/put_container.rb
fog-2.0.0.pre.0 lib/fog/openstack/requests/storage/put_container.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/openstack/requests/storage/put_container.rb
fog-1.34.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.33.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.32.0 lib/fog/openstack/requests/storage/put_container.rb
fog-1.31.0 lib/fog/openstack/requests/storage/put_container.rb