lib/redrax/containers.rb
# Creates a container in Cloud Files.
# @param name [String] Name of the container to create
# @param args [Hash] Optional arguments
#   * metadata: a Hash of key values to store as metadata on the new container
Creates a container in Cloud Files.
Creates a container in Cloud Files .
def create(name, metadata = {})
      validate_path_elements(name)
      client.request(
        method:   :put,
        path:     name,
        expected: [201, 202],
        headers:  MetadataMarshaller.new.call(
          metadata,
          "X-Container-Meta-",
          wrong: "X-Remove-Container-Meta-"
        )
      )
    end
def create ( name , metadata = { } ) validate_path_elements ( name ) client . request ( method : :put , path : name , expected : [ 201 , 202 ] , headers : MetadataMarshaller . new . call ( metadata , "X-Container-Meta-" , wrong : "X-Remove-Container-Meta-" ) ) end
Creates a container in Cloud Files.
Creates a container in Cloud Files .
name
Name of the container to create
Name of the container to create
metadata
args
Optional arguments * metadata: a Hash of key values to store as metadata on the new container
Optional arguments * metadata : a Hash of key values to store as metadata on the new container