def post_container(url, token, container, headers, http_conn=None, response_dict=None, service_token=None):
 if http_conn:
  (parsed, conn) = http_conn
 else:
  (parsed, conn) = http_connection(url)
 path = ('%s/%s' % (parsed.path, quote(container)))
 method = 'POST'
 headers['X-Auth-Token'] = token
 if service_token:
  headers['X-Service-Token'] = service_token
 if ('content-length' not in (k.lower() for k in headers)):
  headers['Content-Length'] = '0'
 conn.request(method, path, '', headers)
 resp = conn.getresponse()
 body = resp.read()
 http_log((('%s%s' % (url.replace(parsed.path, ''), path)), method), {'headers': headers}, resp, body)
 store_response(resp, response_dict)
 if ((resp.status < 200) or (resp.status >= 300)):
  raise ClientException.from_response(resp, 'Container POST failed', body)

def post_container ( url , token , container , headers , http_conn = None , response_dict = None , service_token = None ) : if http_conn : ( parsed , conn ) = http_conn else : ( parsed , conn ) = http_connection ( url ) path = ( '%s/%s' % ( parsed . path , quote ( container ) ) ) method = 'POST' headers [ 'X-Auth-Token' ] = token if service_token : headers [ 'X-Service-Token' ] = service_token if ( 'content-length' not in ( k . lower ( ) for k in headers ) ) : headers [ 'Content-Length' ] = '0' conn . request ( method , path , '' , headers ) resp = conn . getresponse ( ) body = resp . read ( ) http_log ( ( ( '%s%s' % ( url . replace ( parsed . path , '' ) , path ) ) , method ) , { 'headers' : headers } , resp , body ) store_response ( resp , response_dict ) if ( ( resp . status < 200 ) or ( resp . status >= 300 ) ) : raise ClientException . from_response ( resp , 'Container POST failed' , body )
update a containers metadata .