Sha256: 324b6ccf57583da9cbc67bdaf5bafd8f3778fa0a7b1396e5d1e9160ee804e5bf

Contents?: true

Size: 885 Bytes

Versions: 5

Compression:

Stored size: 885 Bytes

Contents

module Fog
  module Storage
    class Dtdream
      class Real
        # Create a new container
        #
        # ==== Parameters
        # * name<~String> - Name for container, 绝对路径,结尾不能携带'/'
        #
        def put_container(name, options={})
          bucket = options[:bucket]
          bucket ||= @aliyun_oss_bucket
          location = get_bucket_location(bucket)
          endpoint = "http://"+location+".aliyuncs.com"

          path = name+'/'
          resource = bucket+'/'+name+'/'
          request(
              :expects  => [200, 203],
              :method   => 'PUT',
              :path     => path,
              :bucket   => bucket,
              :resource => resource,
              :endpoint => endpoint
          )
        end
      end
      
      class Mock
        def put_container(name, options={})

        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-dtdream-0.0.8 lib/fog/dtdream/requests/storage/put_container.rb
fog-dtdream-0.0.7 lib/fog/dtdream/requests/storage/put_container.rb
fog-dtdream-0.0.6 lib/fog/dtdream/requests/storage/put_container.rb
fog-dtdream-0.0.5 lib/fog/dtdream/requests/storage/put_container.rb
fog-dtdream-0.0.3 lib/fog/dtdream/requests/storage/put_container.rb