def delete_container(url, token, container, http_conn=None, response_dict=None, service_token=None, query_string=None, headers=None):
 if http_conn:
  (parsed, conn) = http_conn
 else:
  (parsed, conn) = http_connection(url)
 path = ('%s/%s' % (parsed.path, quote(container)))
 if headers:
  headers = dict(headers)
 else:
  headers = {}
 headers['X-Auth-Token'] = token
 if service_token:
  headers['X-Service-Token'] = service_token
 if query_string:
  path += ('?' + query_string.lstrip('?'))
 method = 'DELETE'
 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 DELETE failed', body)

def delete_container ( url , token , container , http_conn = None , response_dict = None , service_token = None , query_string = None , headers = None ) : if http_conn : ( parsed , conn ) = http_conn else : ( parsed , conn ) = http_connection ( url ) path = ( '%s/%s' % ( parsed . path , quote ( container ) ) ) if headers : headers = dict ( headers ) else : headers = { } headers [ 'X-Auth-Token' ] = token if service_token : headers [ 'X-Service-Token' ] = service_token if query_string : path += ( '?' + query_string . lstrip ( '?' ) ) method = 'DELETE' 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 DELETE failed' , body )
delete a container .