Sha256: 2493f063ebb9031aeed28926d02929c9689c34d6901b1a604e1d63160e4842d1

Contents?: true

Size: 952 Bytes

Versions: 37

Compression:

Stored size: 952 Bytes

Contents

module Fog
  module Storage
    class HP
      class Real

        # Create or update metadata for an existing container
        #
        # ==== Parameters
        # * container<~String> - Name for existing container, should be < 256 bytes and must not contain '/'
        # * headers<~Hash> - Hash of metadata name/value pairs
        def post_container(container, headers = {})
          response = request(
            :expects  => 204,
            :headers  => headers,
            :method   => 'POST',
            :path     => Fog::HP.escape(container)
          )
          response
        end

      end

      class Mock # :nodoc:all

        def post_container(container_name, headers = {})
          if self.data[:containers][container_name].nil?
            raise Fog::Storage::HP::NotFound
          end
          response = Excon::Response.new
          response.status = 204
          response
        end

      end

    end
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
fog-1.22.0 lib/fog/hp/requests/storage/post_container.rb
fog-1.21.0 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/hp/requests/storage/post_container.rb
fog-1.20.0 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/hp/requests/storage/post_container.rb
fog-1.19.0 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/hp/requests/storage/post_container.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/hp/requests/storage/post_container.rb