def set_metadata(metadatahash)
headers = metadatahash.inject({}){|res, (k,v)| ((k.to_s.match /^X-Container-Meta-/i) ? res[k.to_s]=v : res["X-Container-Meta-#{k}"]=v ) ; res}
headers.merge!({'content-type'=>'application/json'})
begin
response = @swift.connection.req("POST", URI.encode("/#{@name.to_s}"), {:headers=>headers} )
true
rescue OpenStack::Exception::ItemNotFound => not_found
msg = "Cannot set metadata - container: \"#{@name}\" does not exist!. #{not_found.message}"
raise OpenStack::Exception::ItemNotFound.new(msg, not_found.response_code, not_found.response_body)
end
end