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.27 lib/fog/storage/openstack/requests/put_container.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-openstack-0.1.26/lib/fog/storage/openstack/requests/put_container.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.26/lib/fog/storage/openstack/requests/put_container.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-openstack-0.1.26/lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.26 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.25 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.24 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.23 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.22 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.21 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.20 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.19 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.18 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.17 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.15 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.14 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.13 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.12 lib/fog/storage/openstack/requests/put_container.rb
fog-openstack-0.1.11 lib/fog/storage/openstack/requests/put_container.rb