Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
~˜EYc@sqdZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
ZmZddlmZmZddlmZmZddlZdd	lmZdd
lmZddlmZmZmZmZde_dTZ dUZ!dVZ"e#d„dWDƒƒZ$yddlm%Z%Wn*e&k
rmdej'fd„ƒYZ%nXeej(ƒedƒkr´ddl)m*Z*d„Z+e+ej,j-_.nej/d ƒZ0e0j1e%ƒƒie2d!6d"d#6Z3d$d%d&d'd(d)d*d+d,g	Z4d-„Z5d.„Z6d/„Z7d0„Z8d1d2„Z
d3„Z9d4„Z:d5e;fd6„ƒYZ<d7e<fd8„ƒYZ=d9e;fd:„ƒYZ>d;„Z?d<„Z@d=„ZAd>„ZBd?„ZCd@„ZDdA„ZEdB„ZFdddddeHdddC„ZIddddD„ZJddddddE„ZKdddddddeHddddF„ZLddddG„ZMddddddH„ZNddddI„ZOddddddJ„ZPdddddddK„ZQddddL„ZRdddddddddddddddM„ZSddddN„ZTdddddddO„ZUddddddddddP„	ZVdQ„ZWdRe;fdS„ƒYZXdS(Xs0
OpenStack Swift client library used internally
iÿÿÿÿN(t
StrictVersion(tRequestExceptiontSSLError(thttp_client(tquotetunquote(turlparset
urlunparse(tsleepttime(tversion(tClientException(titer_wrappert
LengthWrappertReadableToIterabletparse_api_responseis1.0t1is2.0t2is3.0t3iccs|]}d|VqdS(s
x-%s-meta-N((t.0ttype_((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pys	<genexpr>+st	containertaccounttobject(tNullHandlerRcBs#eZd„Zd„Zd„ZRS(cCsdS(N((tselftrecord((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pythandle3scCsdS(N((RR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytemit6scCs
d|_dS(N(tNonetlock(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt
createLock9s(t__name__t
__module__RRR(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR2s		s2.0.0(tCaseInsensitiveDictcCs(|rt|ƒ|_ntƒ|_dS(N(R"theaders(RR#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytprepare_unicode_headersAstswiftclienttredact_sensitive_headersitreveal_sensitive_prefixsx-auth-tokens
x-auth-keysx-service-tokensx-storage-tokensx-account-meta-temp-url-keysx-account-meta-temp-url-key-2sx-container-meta-temp-url-keysx-container-meta-temp-url-key-2s
set-cookiecCsm|jƒtkritjddƒ}tt|t|ƒddt|ƒdƒƒ}|d|!}|dS|S(sÈ
    Only show up to logger_settings['reveal_sensitive_prefix'] characters
    from a sensitive header.

    :param name: Header name
    :param value: Header value
    :return: Safe header value
    R'iii is...(tlowertLOGGER_SENSITIVE_HEADERStlogger_settingstgettinttmintlen(tnametvaluet
prefix_lengthtredacted_value((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt
safe_valuecs	-
cCsžt|tƒr|jƒ}ng|D]$\}}t|ƒt|ƒf^q%}tjdtƒskt|ƒStjddƒdkrdtd<nd„|DƒS(s÷
    Redact header values that can contain sensitive information that
    should not be logged.

    :param headers: Either a dict or an iterable of two-element tuples
    :return: Safe dictionary of headers with sensitive information removed
    R&R'iicSs(i|]\}}t||ƒ|“qS((R3(Rtkeytval((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pys
<dictcomp>ˆs	(t
isinstancetdicttitemstparse_header_stringR*R+tTrue(R#R4R5((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt
scrub_headersvs.

c	CsQtjtjƒsdSdg}x[|D]S}|dkrH|jdƒq&|dkrh|jd|ƒq&|jd|ƒq&Wd	|krÎt|d	ƒ}x2|D]'}d
|||f}|j|ƒq Wn|jdkrétj}n	tj}|dd
j	|ƒƒ|d|j|j
ƒ|dt|jƒƒƒ|rM|d|ƒndS(Nscurl -itHEADs -ItGETtPOSTtPUTs -X %ss %sR#s -H "%s: %s"i,sREQ: %stsRESP STATUS: %s %ssRESP HEADERS: %ss
RESP BODY: %s(sGETsPOSTsPUT(tloggertisEnabledFortloggingtINFOtappendR;tstatustdebugtinfotjointreasont
getheaders(	targstkwargstresptbodytstring_partstelementR#theadert
log_method((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pythttp_log‹s,	

	cCs3t|tjtjfƒs*t|ƒ}ntjr¼t|tjƒrW|jdƒ}nyt|ƒjdƒ}Wq/t	k
r¸y|jdƒSWq¹t	k
r´t
|ƒjdƒSXq/Xnst|tjƒry|jdƒ}Wqt	k
rt
|ƒ}qXnyt|ddƒ}Wnt	k
r.|SX|S(Ntutf8tasciiterrorststrict(R6tsixt	text_typetbinary_typetstrtPY2tencodeRtdecodetUnicodeDecodeErrorR(tdatatunquoted((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR9«s,	



t/cCs,tjrt|d|ƒStt|ƒ|ƒS(sˆ
    Patched version of urllib.quote that encodes utf8 strings before quoting.
    On Python 3, call directly urllib.parse.quote().
    tsafe(RYtPY3t_quotetencode_utf8(R0Rd((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRËs	cCsVt|ƒtjttfkr.t|ƒ}nt|tjƒrR|jdƒ}n|S(NRU(	ttypeRYt
integer_typestfloattboolR\R6RZR^(R0((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRgÕs
cCsyi}xl|jƒD]^\}}t|ƒ}|jƒ}t|tjƒrg|jtƒrgt|ƒ}n|||<qW|S(s!Only encode metadata headers keys(R8RgR(R6RYtstring_typest
startswithtUSER_METADATA_TYPE(R#tretRRR0((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytencode_meta_headersâst_ObjectBodycBs>eZdZd„Zdd„Zd„Zd„Zd„ZRS(s=
    Readable and iterable object body response wrapper.
    cCs||_||_dS(s§
        Wrap the underlying response

        :param resp: the response to wrap
        :param chunk_size: number of bytes to return each iteration/next call
        N(RNt
chunk_size(RRNRr((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt__init__ös	cCs|jj|ƒS(N(RNtread(Rtlength((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRtscCs|S(N((R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt__iter__scCs(|j|jƒ}|s$tƒ‚n|S(N(RtRrt
StopIteration(Rtbuf((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytnextscCs
|jƒS(N(Ry(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt__next__sN(	R R!t__doc__RsRRtRvRyRz(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRqñs	
		t
_RetryBodycBs/eZdZddddd„Zdd„ZRS(sœ
    Wrapper for object body response which triggers a retry
    (from offset) if the connection is dropped after partially
    downloading the object.
    c		Cs‰tt|ƒj||ƒt|jjdƒƒ|_||_||_||_	||_
||_|dk	rs|ni|_
d|_dS(sª
        Wrap the underlying response

        :param resp: the response to wrap
        :param connection: Connection class instance
        :param container: the name of the container the object is in
        :param obj: the name of object we are downloading
        :param resp_chunk_size: if defined, chunk size of data to read
        :param query_string: if set will be appended with '?' to generated path
        :param response_dict: an optional dictionary into which to place
                         the response - status, reason and headers
        :param headers: an optional dictionary with additional headers to
                         include in the request
        sContent-LengthiN(tsuperR|RsR,RNt	getheadertexpected_lengthtconnRtobjtquery_stringt
response_dictRR#t
bytes_read(	RRNt
connectionRRtresp_chunk_sizeR‚RƒR#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRss					cCsd}y+|jj|ƒ}|jt|ƒ7_Wn8tjtfk
rk|jj	|jj
krl‚qlnX|r|j|jkr|jj	|jj
krd|j|jd<|jj
dƒ|jd<|jjdt|j|jd|jd|jd|jd|jd	|jj	ƒ\}}d
|j|jd|jf}d|kr³tjd
|j|jƒ|j}x€|dkr¯|jjt||jƒƒ}|t|ƒ8}qrWn?|d|kròd||j|j|df}t|ƒ‚n|j|_|j|ƒ}n|S(Ns	bytes=%d-tRangetETagsIf-MatchR†R‚RƒR#tattemptssbytes %d-%d/%dis
content-ranges-Received 200 while retrying %s/%s; seeking...is5Expected range "%s" while retrying %s/%s but got "%s"(RRNRtR„R.tsocketterrorRR€R‰tretriesRR#R~t_retryt
get_objectRRRrR‚RƒRAtwarningR-R(RRuRxthdrsROtexpected_rangetto_readtmsg((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRt1sJ
				

			N(R R!R{RRsRt(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR|s	tHTTPConnectionc	Bs_eZddeddeddd„Zd„Zdddd„Zdddd„Zd„ZRS(c
Csˆ||_t|ƒ|_|jj|_|jj|_i|_tjƒ|_	d|j	_|jjd
kr‹t
d|jj|fƒ‚n||jd<|r¶|r¶||jd<n|rè|rØ||f|jd<qè||jd<n|r<t|ƒ}
|
jst
dƒ‚nid|
j|
jf|
j6|jd<nt|jd	<|dkred
tj}n||_|	r„|	|jd<ndS(s
        Make an HTTPConnection or HTTPSConnection

        :param url: url to connect to
        :param proxy: proxy to connect through, if any; None by default; str
                      of the format 'http://127.0.0.1:8888' to set one
        :param cacert: A CA bundle file to use in verifying a TLS server
                       certificate.
        :param insecure: Allow to access servers without checking SSL certs.
                         The server's certificate will not be verified.
        :param cert: Client certificate file to connect on SSL server
                            requiring SSL client certificate.
        :param cert_key: Client certificate private key file.
        :param ssl_compression: SSL compression should be disabled by default
                                and this setting is not usable as of now. The
                                parameter is kept for backward compatibility.
        :param default_user_agent: Set the User-Agent header on every request.
                                   If set to None (default), the user agent
                                   will be "python-swiftclient-<version>". This
                                   may be overridden on a per-request basis by
                                   explicitly setting the user-agent header on
                                   a call to request().
        :param timeout: socket read timeout value, passed directly to
                        the requests library.
        :raises ClientException: Unable to handle protocol scheme
        thttpthttpss#Unsupported scheme "%s" in url "%s"tverifytcertsProxy's missing schemes%s://%stproxieststreamspython-swiftclient-%sttimeoutN(shttpshttps(turlRt
parsed_urltnetlocthosttportt
requests_argstrequeststSessiontrequest_sessionRR#tschemeRR:tswiftclient_versiontversion_stringtdefault_user_agent(RRœtproxytcacerttinsecureR˜tcert_keytssl_compressionR¨R›tproxy_parsed((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRs[s<		
	$
	cOs|jj||ŽS(s:Final wrapper before requests call, to be patched in tests(R¤trequest(Rtargtkwarg((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt_request¡sc
Cs|dkri}nt|ƒ}d|kr=|j|d<nd|jj|jj|f}|j||d|d|d||j|_|jS(s1Encode url and header, then call requests.requests
user-agents	%s://%s%sR#RatfilesN(	RRpR¨RR¥RžR²R¡RN(Rtmethodt	full_pathRaR#R³Rœ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR¯¥s			
cCs|jd||||ƒS(s¥
        Use python-requests files upload

        :param data: Use data generator for chunked-transfer
        :param files: Use files for default transfer
        R?(R¯(RRµRaR#R³((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt
putrequest·scs|ˆjjˆj_ˆjjj‰‡fd†}d‡fd†}‡fd†}|ˆj_|ˆj_|ˆj_ˆjS(s,Adapt requests response to httplib interfacecsˆjjjƒS(N(RNR#R8((R(sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRKÅscsˆ|jƒ|ƒS(N(R((tktv(t
old_getheader(sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR~Èscs2ˆjjj||Ž}|s.ˆjjƒn|S(N(RNtrawRttclose(RLRMtchunk(R(sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytreleasing_readËsN(RNtstatus_codeRFRºR~RRKRt(RRKR~R½((R¹RsG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytgetresponseÀsN(	R R!RtFalseRsR²R¯R¶R¿(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR”Zs		D		cOst||Ž}|j|fS(s2:returns: tuple of (parsed url, connection object)(R”R(R°R±R€((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pythttp_connectionÝscKs˜|jddƒ}|jdtƒ}|jdƒ}|jdƒ}|jddƒ}	t|d|d|d|d|d|	ƒ\}
}d}i|d6|d6}
|j||
jd	|
ƒ|jƒ}|jƒ}t||f|
||ƒ|j	d
ƒ}|j
dks"|j
dks"|r:|r:tj|d
|ƒ‚n|ryt
t|ƒƒ}
|
d}d||
d<t|
ƒ}n||j	d|j	dƒƒfS(NRªR«R˜R¬R›R=sX-Auth-Users
X-Auth-KeyR@s
x-storage-urliÈi,sAuth GET failedissnet-sx-storage-tokensx-auth-token(R+RRÀRÁR¯tpathR¿RtRTR~RFRt
from_responsetlistRR(RœtuserR4tsnetRMRªR«R˜R¬R›tparsedR€R´R#RNRORž((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytget_auth_1_0ãs0+
cKs*|jidd6ƒt|||||S(Ns2.0tauth_version(tupdatetget_auth_keystone(tauth_urlRÅR4t
os_optionsRM((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytget_keystoneclient_2_0scCsŠyf|tkr"ddlm}nddlm}ddlm}tjdƒjt	ƒƒ||fSWnt
k
r…tdƒ‚nXdS(Niÿÿÿÿ(tclient(t
exceptionstkeystoneclientsÈ
Auth versions 2.0 and 3 require python-keystoneclient, install it or use Auth
version 1.0 which requires ST_AUTH, ST_USER, and ST_KEY environment
variables to be set or overridden with -A, -U, or -K.(tAUTH_VERSIONS_V3tkeystoneclient.v3RÏtkeystoneclient.v2_0RÑRÐRCt	getLoggert
addHandlerRtImportErrorR(RÉtksclientRÐ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt_import_keystone_client
s
c'Ksd|jdtƒ}|jdd$ƒ}|jddƒ}tjtjƒ}t|ƒ\}	}
y÷|	jd|d|d|jdƒd	|jd	ƒd
|jd
ƒd|jdƒd|jdƒd
|jd
ƒd|jdƒd|jdƒd|jdƒd|jdƒd|d|jdƒd|jdƒd|jdƒd|d|d|ƒ}Wn`|
j	k
rŽd}|t
krd}nt|ƒ‚n&|
jk
r³}
td|
ƒ‚nX|jdƒpÆd}|jdƒpÛd}yRi}|jdƒrd |d!<|d|d"<n|j
jd|d||}Wn$|
jk
rVtd#|ƒ‚nX||jfS(%sr
    Authenticate against a keystone server.

    We are using the keystoneclient library for authentication.
    R«R›RÉs2.0tusernametpasswordttokent
auth_tokenttenant_namet	tenant_idtuser_idtuser_domain_nametuser_domain_idtproject_namet
project_idtproject_domain_nametproject_domain_idRGRªR˜R4R¬RÌs:Unauthorized. Check username, password and tenant name/id.sYUnauthorized. Check username/id, password, tenant name/id and user/tenant domain name/id.sAuthorization Failure. %stservice_typesobject-storet
endpoint_typet	publicURLtregion_nametregiontattrtfilter_values8Endpoint for %s not found - have you specified a region?N(R+RÀRRARBRCtDEBUGRÙtClienttUnauthorizedRÒRtAuthorizationFailuretservice_catalogturl_fortEndpointNotFoundRÝ(RÌRÅR4RÍRMR«R›RÉRGRØRÐt	_ksclientR“terrRçRèt
filter_kwargstendpoint((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRËs\		

cKs}|jddƒ}|jddƒ}|jdiƒ}|jddƒ}|jdtƒ}|jdƒ}	|jdƒ}
|jd	dƒ}|rÛ|jd
dƒ}|jdd
ƒ}
|jd
|d|
ƒ}|jƒ}nw|tkr,t||||jdƒd|d|d|	d|
d	|ƒ\}}n&|ttkrB|rz|jdƒrzd|krz|j	dƒ\|d<}n|jdƒrš|d|d<n|jdƒpÓ|jdƒpÓ|jdƒpÓ|jdƒs|tkrñt
dƒ‚nt
dƒ‚nt||||d|d|d|	d|
d	|d|ƒ\}}nt
d|ƒ‚|jdƒro|d|fS||fSdS(s
    Get authentication/authorization credentials.

    :kwarg auth_version: the api version of the supplied auth params
    :kwarg os_options: a dict, the openstack identity service options

    :returns: a tuple, (storage_url, token)

    N.B. if the optional os_options parameter includes a non-empty
    'object_storage_url' key it will override the default storage url returned
    by the auth service.

    The snet parameter is used for Rackspace's ServiceNet internal network
    implementation. In this function, it simply adds *snet-* to the beginning
    of the host name for the returned storage URL. With Rackspace Cloud Files,
    use of this network path causes no bandwidth charges but requires the
    client to be running on Rackspace's ServiceNet network.
    tsessionRÉRRÍRªR«R˜R¬R›Rçsobject-storeRètpublict	interfaceRÆRÞt:RßRãRäsNo tenant specifieds(No project name or project id specified.s7Unknown auth_version %s specified and no session found.tobject_storage_urlN(R+RRÀtget_endpointt	get_tokentAUTH_VERSIONS_V1RÈtAUTH_VERSIONS_V2RÒtsplitRRË(RÌRÅR4RMRùRÉRÍRªR«R˜R¬R›RçRûtstorage_urlRÜ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytget_authWs`	"		
cCsIi}x<|jƒD].\}}t|ƒjƒ}t|ƒ||<qW|S(N(RKR9R((RNtresp_headersRRR0((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytresp_header_dict©s
cCs=|dk	r9|j|d<|j|d<t|ƒ|d<ndS(s
    store information about an operation into a dict

    :param resp: an http response object containing the response
                 headers
    :param response_dict: a dict into which are placed the
       status, reason and a dict of lower-cased headers
    RFRJR#N(RRFRJR(RNRƒ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytstore_response±s	

c

CsFi|d6dd6}
|r'||
d<n|	r=|
j|	ƒn|sRt|ƒ}n|rçt|||||||d|
ƒ}|d}xZ|râ|dd}t|||||||d|
ƒd}|r‰|dj|ƒq‰q‰W|S|\}
}d	}|r|d
t|ƒ7}n|r-|d|7}n|rJ|dt|ƒ7}n|rg|d
t|ƒ7}nd|
j|f}d}|j||d|
ƒ|jƒ}|jƒ}t	d||f|fi|
d6||ƒt
|ƒ}|jdks|jdkrtj
|d|ƒ‚n|jdkr3|gfS|t||ƒfS(s2
    Get a listing of containers for the account.

    :param url: storage URL
    :param token: auth token
    :param marker: marker query
    :param limit: limit query
    :param prefix: prefix query
    :param end_marker: end_marker query
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param full_listing: if True, return a full listing, else returns a max
                         of 10000 listings
    :param service_token: service auth token
    :param headers: additional headers to include in the request
    :returns: a tuple of (response headers, a list of containers) The response
              headers will be a dict and all header names will be lowercase.
    :raises ClientException: HTTP GET request failed
    sX-Auth-TokentgzipsAccept-EncodingsX-Service-TokenR#iiÿÿÿÿR/sformat=jsons
&marker=%ss	&limit=%ds
&prefix=%ss&end_marker=%ss%s?%sR=R@iÈi,sAccount GET failediÌ(RÊRÁtget_accounttextendRRÂR¯R¿RtRTRRFRRÃR(RœRÜtmarkertlimittprefixt
end_markert	http_conntfull_listingt
service_tokenR#treq_headerstrvtlistingRÇR€tqsRµR´RNROR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR	ÀsT

		
 

cCsú|r|\}}nt|ƒ\}}d}i|d6}|rM||d<n|rc|j|ƒn|j||jd|ƒ|jƒ}	|	jƒ}
t||fi|d6|	|
ƒ|	jdksÒ|	jdkrêtj	|	d|
ƒ‚nt
|	ƒ}|S(	sê
    Get account stats.

    :param url: storage URL
    :param token: auth token
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param headers: additional headers to include in the request
    :param service_token: service auth token
    :returns: a dict containing the response's headers (all header names will
              be lowercase)
    :raises ClientException: HTTP HEAD request failed
    R<sX-Auth-TokensX-Service-TokenR@R#iÈi,sAccount HEAD failed(RÁRÊR¯RÂR¿RtRTRFRRÃR(RœRÜRR#RRÇR€R´RRNROR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pythead_accounts"

 cCs8|r|\}}	nt|ƒ\}}	d}
|j}|rM|d|7}n||d<|rj||d<n|	j|
|||ƒ|	jƒ}|jƒ}
t||
fi|d6||
ƒt||ƒ|jdksã|jdkrûtj	|d|
ƒ‚ni}x*|j
ƒD]\}}|||jƒ<qW||
fS(	s¶
    Update an account's metadata.

    :param url: storage URL
    :param token: auth token
    :param headers: additional headers to include in the request
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :param query_string: if set will be appended with '?' to generated path
    :param data: an optional message body for the request
    :raises ClientException: HTTP POST request failed
    :returns: resp_headers, body
    R>t?sX-Auth-TokensX-Service-TokenR#iÈi,sAccount POST failed(RÁRÂR¯R¿RtRTRRFRRÃRKR((RœRÜR#RRƒRR‚RaRÇR€R´RÂRNRORRRR0((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytpost_account(s*	

 
cCs|	st|ƒ}	n|r*t|ƒ}ni}||d<d|d<|
r#t||||||||||	d|d|ƒ
}|d}x•|r|s§|dd}n#|djd|djd	ƒƒ}t||||||||||	d|d|ƒ
d}|rŠ|dj|ƒqŠqŠW|S|	\}}d
|jt|ƒf}d}|rk|dt|ƒ7}n|r‚|d
|7}n|rŸ|dt|ƒ7}n|r¼|dt|ƒ7}n|rÙ|dt|ƒ7}n|rö|dt|ƒ7}n|
r|d|
jdƒ7}n|r)||d<nd}|j|d||fd|ƒ|j	ƒ}|j
ƒ}tdi|j|jdƒd6|d6|d6|fi|d6||ƒ|j
dksÍ|j
dkråtj|d|ƒ‚nt|ƒ}|j
dkr
|gfS|t||ƒfS( s2
    Get a listing of objects for the container.

    :param url: storage URL
    :param token: auth token
    :param container: container name to get a listing for
    :param marker: marker query
    :param limit: limit query
    :param prefix: prefix query
    :param delimiter: string to delimit the queries on
    :param end_marker: marker query
    :param path: path query (equivalent: "delimiter=/" and "prefix=path/")
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param full_listing: if True, return a full listing, else returns a max
                         of 10000 listings
    :param service_token: service auth token
    :param headers: additional headers to include in the request
    :param query_string: if set will be appended with '?' to generated path
    :returns: a tuple of (response headers, a list of objects) The response
              headers will be a dict and all header names will be lowercase.
    :raises ClientException: HTTP GET request failed
    sX-Auth-TokenRsAccept-EncodingRR#iiÿÿÿÿR/tsubdirs%s/%ssformat=jsons
&marker=%ss	&limit=%ds
&prefix=%ss
&delimiter=%ss&end_marker=%ss&path=%ss&%sRsX-Service-TokenR=s%s?%sR@s%(url)s%(cont_path)s?%(qs)sRœt	cont_pathRiÈi,sContainer GET failediÌ(RÁR7t
get_containerR+R
RÂRtlstripR¯R¿RtRTtreplaceRFRRÃRR(RœRÜRRRR
t	delimiterRRÂRRRR#R‚RRRÇR€RRR´RNROR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRTsr


	#

 
cCs)|r|\}}nt|ƒ\}}d|jt|ƒf}d}	i|d6}
|rf||
d<n|r||
j|ƒn|j|	|d|
ƒ|jƒ}|jƒ}td|j|jdƒ|f|	fi|
d6||ƒ|j	dks|j	d	krt
j|d
|ƒ‚nt|ƒ}
|
S(s"
    Get container stats.

    :param url: storage URL
    :param token: auth token
    :param container: container name to get stats for
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param headers: additional headers to include in the request
    :param service_token: service auth token
    :returns: a dict containing the response's headers (all header names will
              be lowercase)
    :raises ClientException: HTTP HEAD request failed
    s%s/%sR<sX-Auth-TokensX-Service-TokenR@s%s%sR#iÈi,sContainer HEAD failed(
RÁRÂRRÊR¯R¿RtRTRRFRRÃR(RœRÜRRR#RRÇR€RÂR´RRNROR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pythead_container®s(

%cCsc|r|\}}	nt|ƒ\}}	d|jt|ƒf}
d}|sUi}n||d<|rr||d<ndd„|Dƒkr•d|d<n|rµ|
d	|jd	ƒ7}
n|	j||
d
|ƒ|	jƒ}|jƒ}
t||ƒtd|j	|jd
ƒ|
f|fi|d6||
ƒ|j
d
ksG|j
dkr_tj|d|
ƒ‚ndS(s~
    Create a container

    :param url: storage URL
    :param token: auth token
    :param container: container name to create
    :param headers: additional headers to include in the request
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :param query_string: if set will be appended with '?' to generated path
    :raises ClientException: HTTP PUT request failed
    s%s/%sR?sX-Auth-TokensX-Service-Tokenscontent-lengthcss|]}|jƒVqdS(N(R((RR·((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pys	<genexpr>òst0sContent-LengthRR@s%s%sR#iÈi,sContainer PUT failedN(
RÁRÂRRR¯R¿RtRRTRRFRRÃ(RœRÜRR#RRƒRR‚RÇR€RÂR´RNRO((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt
put_containerÖs,	



%c
Cs4|r|\}}nt|ƒ\}}d|jt|ƒf}	d}
||d<|rc||d<ndd„|Dƒkr†d|d<n|j|
|	d	|ƒ|jƒ}|jƒ}td
|j|jd	ƒ|	f|
fi|d6||ƒt||ƒ|j	dks|j	d
kr0t
j|d|ƒ‚ndS(s?
    Update a container's metadata.

    :param url: storage URL
    :param token: auth token
    :param container: container name to update
    :param headers: additional headers to include in the request
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :raises ClientException: HTTP POST request failed
    s%s/%sR>sX-Auth-TokensX-Service-Tokenscontent-lengthcss|]}|jƒVqdS(N(R((RR·((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pys	<genexpr>sR sContent-LengthR@s%s%sR#iÈi,sContainer POST failedN(RÁRÂRR¯R¿RtRTRRRFRRÃ(
RœRÜRR#RRƒRRÇR€RÂR´RNRO((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytpost_containers&


%
cCsL|r|\}}	nt|ƒ\}}	d|jt|ƒf}
|rUt|ƒ}ni}||d<|rx||d<n|r˜|
d|jdƒ7}
nd}|	j||
d|ƒ|	jƒ}|jƒ}
td|j	|jdƒ|
f|fi|d6||
ƒt
||ƒ|jd	ks0|jd
krHtj
|d|
ƒ‚ndS(
s
    Delete a container

    :param url: storage URL
    :param token: auth token
    :param container: container name to delete
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :param query_string: if set will be appended with '?' to generated path
    :param headers: additional headers to include in the request
    :raises ClientException: HTTP DELETE request failed
    s%s/%ssX-Auth-TokensX-Service-TokenRtDELETER@s%s%sR#iÈi,sContainer DELETE failedN(RÁRÂRR7RR¯R¿RtRTRRRFRRÃ(RœRÜRRRƒRR‚R#RÇR€RÂR´RNRO((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytdelete_container*s,

%
c
CsÒ|r|\}
}nt|ƒ\}
}d|
jt|ƒt|ƒf}|r`|d|7}nd}
|rx|jƒni}||d<|	r›|	|d<n|j|
|d|ƒ|jƒ}i}t||ƒ|dk	rì|j|ƒn|j	dks
|j	dkrg|j
ƒ}td	|j|
jdƒ|f|
fi|d
6||ƒt
j|d|ƒ‚n|rt||ƒ}n|j
ƒ}td	|j|
jdƒ|f|
fi|d
6|dƒ|d
|fS(
s~
    Get an object

    :param url: storage URL
    :param token: auth token
    :param container: container name that the object is in
    :param name: object name to get
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param resp_chunk_size: if defined, chunk size of data to read. NOTE: If
                            you specify a resp_chunk_size you must fully read
                            the object's contents before making another
                            request.
    :param query_string: if set will be appended with '?' to generated path
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param headers: an optional dictionary with additional headers to include
                    in the request
    :param service_token: service auth token
    :returns: a tuple of (response headers, the object's contents) The response
              headers will be a dict and all header names will be lowercase.
    :raises ClientException: HTTP GET request failed
    s%s/%s/%sRR=sX-Auth-TokensX-Service-TokenR@iÈi,s%s%sR#sObject GET failedN(RÁRÂRtcopyR¯R¿RRRÊRFRtRTRRRÃRq(RœRÜRR/RR†R‚RƒR#RRÇR€RÂR´RNtparsed_responseROtobject_body((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRŽYs8"


%%cCs4|r|\}}nt|ƒ\}}d|jt|ƒt|ƒf}	|r^t|ƒ}ni}||d<d}
|r‡||d<n|j|
|	d|ƒ|jƒ}|jƒ}td|j|jdƒ|	f|
fi|d6||ƒ|j	dks|j	d	kr$t
j|d
|ƒ‚nt|ƒ}
|
S(sO
    Get object info

    :param url: storage URL
    :param token: auth token
    :param container: container name that the object is in
    :param name: object name to get info for
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param service_token: service auth token
    :param headers: additional headers to include in the request
    :returns: a dict containing the response's headers (all header names will
              be lowercase)
    :raises ClientException: HTTP HEAD request failed
    s%s/%s/%ssX-Auth-TokenR<sX-Service-TokenR@s%s%sR#iÈi,sObject HEAD failed(
RÁRÂRR7R¯R¿RtRTRRFRRÃR(RœRÜRR/RRR#RÇR€RÂR´RNROR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pythead_object–s("

%cCs‡|
r|
\}}nt|d|ƒ\}}|j}|r^d|jdƒt|ƒf}n|r†d|jdƒt|ƒf}n|r|d|7}n|	r²t|	ƒ}	ni}	|rË||	d<n|rÞ||	d<n|rú|jdƒ|	d<n|dk	rt|ƒ|	d	<n>x;|	jƒD]-\}}|j	ƒd
kr&t
|ƒ}q&q&W|dk	rp||	d<nd|	kr‰d|	d<n|sœd
|	d	<nt|tt
fƒrÍ|j|d|	d|ƒnt|dƒrF|dkrñd}n|dkrt||dtƒ}nt
||dtƒ}|j|d|	d|ƒnŽ|dk	r{dt|ƒj}tj|ddƒnt|dƒr¾t|tjtjtttfƒr¾t|ƒ}n|jd|||	ƒ|jƒ}|jƒ}td|j|jdƒ|fdfi|	d6||ƒt ||
ƒ|j!dksP|j!dkrht"j#|d|ƒ‚n|j$ddƒjdƒ}|S(sý
    Put an object

    :param url: storage URL
    :param token: auth token; if None, no token will be sent
    :param container: container name that the object is in; if None, the
                      container name is expected to be part of the url
    :param name: object name to put; if None, the object name is expected to be
                 part of the url
    :param contents: a string, a file-like object or an iterable
                     to read object data from;
                     if None, a zero-byte put will be done
    :param content_length: value to send as content-length header; also limits
                           the amount read from contents; if None, it will be
                           computed via the contents or chunked transfer
                           encoding will be used
    :param etag: etag of contents; if None, no etag will be sent
    :param chunk_size: chunk size of data to write; it defaults to 65536;
                       used only if the contents object has a 'read'
                       method, e.g. file-like objects, ignored otherwise

    :param content_type: value to send as content-type header, overriding any
                       value included in the headers param; if None and no
                       value is found in the headers param, an empty string
                       value will be sent
    :param headers: additional headers to include in the request, if any
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param proxy: proxy to connect through, if any; None by default; str of the
                  format 'http://127.0.0.1:8888' to set one
    :param query_string: if set will be appended with '?' to generated path
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :returns: etag
    :raises ClientException: HTTP PUT request failed
    R©s%s/%sRcRsX-Auth-TokensX-Service-Tokent"RˆsContent-Lengthscontent-lengthsContent-TypeR@R R#RaRtitmd5s3%s object has no "read" method, ignoring chunk_sizet
stackleveliRvR?s%s%siÈi,sObject PUT failedtetagN(%RÁRÂtrstripRR7tstripRR\R8R(R,R6RR
R¶thasattrRÀRhR twarningstwarnRYRZR[RÄttupleRR¯R¿RtRTRRRFRRÃR~(RœRÜRR/tcontentstcontent_lengthR,Rrtcontent_typeR#RR©R‚RƒRRÇR€RÂtnR¸Ratwarn_msgRNRO((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt
put_object¿sp)	""




	%
c
Cs|r|\}}	nt|ƒ\}}	d|jt|ƒt|ƒf}
||d<|rf||d<n|	jd|
d|ƒ|	jƒ}|jƒ}td|j|jdƒ|
fdfi|d6||ƒt||ƒ|j	dksø|j	d	krt
j|d
|ƒ‚ndS(sq
    Update object metadata

    :param url: storage URL
    :param token: auth token
    :param container: container name that the object is in
    :param name: name of the object to update
    :param headers: additional headers to include in the request
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :raises ClientException: HTTP POST request failed
    s%s/%s/%ssX-Auth-TokensX-Service-TokenR>R@s%s%sR#iÈi,sObject POST failedN(RÁRÂRR¯R¿RtRTRRRFRRÃ(
RœRÜRR/R#RRƒRRÇR€RÂRNRO((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytpost_object0s"

%
c
Cs|r|\}
}nt|ƒ\}
}|
j}t|ƒ}t|ƒ}d|jdƒ||f}|rvt|ƒni}|dk	r›t|ƒ|d<n#|r¾|r¾d||f|d<n|dk	r×||d<n|	dk	rð|	|d<n|dk	r^xFg|jƒD]}
|
jƒdkr|
^qD]}|j|ƒq.W|rQdnd	|d
<n|j	d|d|ƒ|j
ƒ}|jƒ}td
|j
|
jdƒ|fdfi|d6||ƒt||ƒ|jdksð|jdkrtj|d|ƒ‚ndS(sÄ
    Copy object

    :param url: storage URL
    :param token: auth token; if None, no token will be sent
    :param container: container name that the source object is in
    :param name: source object name
    :param destination: The container and object name of the destination object
                        in the form of /container/object; if None, the copy
                        will use the source as the destination.
    :param headers: additional headers to include in the request
    :param fresh_metadata: Enables object creation that omits existing user
                           metadata, default None
    :param http_conn: HTTP connection object (If None, it will create the
                      conn object)
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :raises ClientException: HTTP COPY request failed
    s%s/%s/%sRctDestinations/%s/%ssX-Auth-TokensX-Service-Tokensx-fresh-metadatattruetfalsesX-Fresh-MetadatatCOPYR@s%s%sR#iÈi,sObject COPY failedN(RÁRÂRR-R7RtkeysR(tpopR¯R¿RtRTRRRFRRÃ(RœRÜRR/tdestinationR#tfresh_metadataRRƒRRÇR€RÂthdrt	fresh_hdrRNRO((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytcopy_objectUs:	

"%
c
CsŒ|r|\}
}nt|d|ƒ\}
}|
j}|r^d|jdƒt|ƒf}n|r†d|jdƒt|ƒf}n|r|d|7}n|r²t|ƒ}ni}|rË||d<n|	rÞ|	|d<n|jd|d|ƒ|jƒ}
|
jƒ}td	|j	|
jdƒ|fdfi|d
6|
|ƒt
|
|ƒ|
jdksp|
jdkrˆtj
|
d
|ƒ‚ndS(sý
    Delete object

    :param url: storage URL
    :param token: auth token; if None, no token will be sent
    :param container: container name that the object is in; if None, the
                      container name is expected to be part of the url
    :param name: object name to delete; if None, the object name is expected to
                 be part of the url
    :param http_conn: a tuple of (parsed url, HTTPConnection object),
                      (If None, it will create the conn object)
    :param headers: additional headers to include in the request
    :param proxy: proxy to connect through, if any; None by default; str of the
                  format 'http://127.0.0.1:8888' to set one
    :param query_string: if set will be appended with '?' to generated path
    :param response_dict: an optional dictionary into which to place
                     the response - status, reason and headers
    :param service_token: service auth token
    :raises ClientException: HTTP DELETE request failed
    R©s%s/%sRcRsX-Auth-TokensX-Service-TokenR#R@s%s%sR#iÈi,sObject DELETE failedN(RÁRÂR-RR7R¯R¿RtRTRRRFRRÃ(RœRÜRR/RR#R©R‚RƒRRÇR€RÂRNRO((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt
delete_object•s2	""

%
cCs¿|\}}idd6}|jd|jd|ƒ|jƒ}|jƒ}t|jƒdfi|d6||ƒ|jdksŽ|jdkr¦tj|d|ƒ‚nt	|ƒ}t
||ƒS(	sà
    Get cluster capability infos.

    :param http_conn: a tuple of (parsed url, HTTPConnection object)
    :returns: a dict containing the cluster capabilities
    :raises ClientException: HTTP Capabilities GET failed
    RsAccept-EncodingR=R@R#iÈi,sCapabilities GET failed(R¯RÂR¿RtRTtgeturlRFRRÃRR(RRÇR€R#RNROR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytget_capabilitiesËs
&t
ConnectioncBs£eZdZddddddeddddddeddeeddd„Zd„Zd„Zd„Z	dd	„Z
d
„Zd„Zdd„Z
ddddedd
„Zdddd„Zdd„Zddddddeddd„	Zdddd„Zdd„Zddid„Zdd„Zddddd„Zdddddddd„Zdd„Zddddd„Zdddd„Zdd„ZRS(s{
    Convenience class to make requests that will also retry the request

    Requests will have an X-Auth-Token header whose value is either
    the preauthtoken or a token obtained from the auth service using
    the user credentials provided as args to the constructor. If
    os_options includes a service_username then requests will also have
    an X-Service-Token header whose value is a token obtained from the
    auth service using the service credentials. In this case the request
    url will be set to the storage_url obtained from the auth service
    for the service user, unless this is overridden by a preauthurl.
    iii@RcCsY||_||_||_||_||_d|_d|_||_||_	|	|_
||_t|poiƒ|_
|
rŽ|
|j
d<n|r¤||j
d<n|p¹|j
jdƒ|_|pÔ|j
jdƒ|_|j
jddƒrût|_n	t|_d|_|
|_||_||_||_||_d|_||_||_dS(sI	
        :param authurl: authentication URL
        :param user: user name to authenticate as
        :param key: key/password to authenticate with
        :param retries: Number of times to retry the request before failing
        :param preauthurl: storage URL (if you have already authenticated)
        :param preauthtoken: authentication token (if you have already
                             authenticated) note authurl/user/key/tenant_name
                             are not required when specifying preauthtoken
        :param snet: use SERVICENET internal network default is False
        :param starting_backoff: initial delay between retries (seconds)
        :param max_backoff: maximum delay between retries (seconds)
        :param auth_version: OpenStack auth version, default is 1.0
        :param tenant_name: The tenant/account name, required when connecting
                            to an auth 2.0 system.
        :param os_options: The OpenStack options which can have tenant_id,
                           auth_token, service_type, endpoint_type,
                           tenant_name, object_storage_url, region_name,
                           service_username, service_project_name, service_key
        :param insecure: Allow to access servers without checking SSL certs.
                         The server's certificate will not be verified.
        :param cert: Client certificate file to connect on SSL server
                            requiring SSL client certificate.
        :param cert_key: Client certificate private key file.
        :param ssl_compression: Whether to enable compression at the SSL layer.
                                If set to 'False' and the pyOpenSSL library is
                                present an attempt to disable SSL compression
                                will be made. This may provide a performance
                                increase for https upload/download operations.
        :param retry_on_ratelimit: by default, a ratelimited connection will
                                   raise an exception to the caller. Setting
                                   this parameter to True will cause a retry
                                   after a backoff.
        :param timeout: The connect timeout for the HTTP connection.
        :param session: A keystoneauth session object.
        iRÞRýRÝtservice_usernameN(RùtauthurlRÅR4RŒRRR‰RÆtstarting_backofftmax_backoffRÉR7RÍR+RœRÜR:tservice_authRÀRRªR«R˜R¬R­t
auth_end_timetretry_on_ratelimitR›(RRJRÅR4RŒt
preauthurltpreauthtokenRÆRKRLRÞRÍRÉRªR«R˜R¬R­ROR›Rù((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRsïs<+																				cCsx|jrtt|jtƒrtt|jƒdkrt|jd}t|dƒrtt|jƒrt|jƒd|_qtndS(NiR»(RR6R2R.R/tcallableR»R(RR€((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR»:s

cCsˆt|j|j|jd|jd|jd|jd|jd|jd|j	d|j
d|jd	|jƒ	\|_
|_|j
|jfS(
NRùRÆRÉRÍRªR«R˜R¬R›(RRJRÅR4RùRÆRÉRÍRªR«R˜R¬R›RœRÜ(R((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRDs						cCsÄ|j}i}|jddƒ|d<|jddƒ|d<|jddƒ|d<|jddƒ}|jddƒ}t|j||d|jd|jd	|jd
|d|jd|j	d
|j
ƒS(Ntservice_project_nameRÞRêRýRItservice_keyRùRÆRÉRÍRªR«R›(RÍR+RRRJRùRÆRÉRªR«R›(Rtoptstservice_optionstservice_userRT((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pytget_service_authPs 		
					cCsOt|r|n|jd|jd|jd|jd|jd|jd|jƒS(NRªR«R˜R¬R­R›(RÁRœRªR«R˜R¬R­R›(RRœ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRÁbs					cCsc|dk	r_d|kr_|d}d|krB|dj|ƒn
|g|d<|j|ƒndS(NRƒtresponse_dicts(RRERÊ(Rttarget_dictRMRƒ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt_add_response_dictks

c
Ost}|j}|jddƒ}|jddƒ|_xÜ|j|jksQ|r|jd7_yø|jsw|jr›|jƒ\|_|_d|_	n|j
rÒ|jrÒ|jƒ\|_|_d|_	nt
ƒ|_|j	sù|jƒ|_	n|j	|d<|dk	ri|d<n||j|jd|j||Ž}|j||ƒ|SWn}tk
rn‚njtjtfk
r¸|j||ƒ|j|jkr¬‚nd|_	n tk
r×}	|j||ƒ|	jdkrR|jr|jjƒ}
nt|j|j|jfƒ}
d|_|_|_|sC|
rI‚nt}qØ|j|jkss|	jdkry‚qØ|	jdkr”d|_	qØd	|	jko®d
knr¶qØ|jrÑ|	jdkrÑqØ‚nXt|ƒt |d|j!ƒ}|r9||||Žq9q9WdS(
NRƒR‰iiRRi‘i˜iôiWiòi("RÀRKR?RR‰RŒRœRÜRRRMRRXR	RNRÁR[RRŠR‹RRthttp_statusRùt
invalidatetallRJRÅR4R:RORR-RL(Rt
reset_functfuncRLRMtretried_authtbackofftcaller_response_dictRRötshould_retry((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRtsj		


	
	!
cCs|jdtd|ƒS(s Wrapper for :func:`head_account`R#N(RRR(RR#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR°scCs4|jdtd|d|d|d|d|d|ƒS(sWrapper for :func:`get_account`RRR
RRR#N(RRR	(RRRR
RRR#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR	´sc
Cs%|jdt|d|d|d|ƒS(s Wrapper for :func:`post_account`R‚RaRƒN(RRR(RR#RƒR‚Ra((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR¾scCs|jdt|d|ƒS(s"Wrapper for :func:`head_container`R#N(RRR(RRR#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRÅscCsI|jd
t|d|d|d|d|d|d|d|d|	d	|
ƒ	S(s!Wrapper for :func:`get_container`RRR
RRRÂRR#R‚N(RRR(RRRRR
RRRÂRR#R‚((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRÉs
c
Cs%|jdt|d|d|d|ƒS(s!Wrapper for :func:`put_container`R#RƒR‚N(RRR!(RRR#RƒR‚((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR!ÖscCs|jdt||d|ƒS(s"Wrapper for :func:`post_container`RƒN(RRR"(RRR#Rƒ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR"Ýsc
Cs%|jdt|d|d|d|ƒS(s$Wrapper for :func:`delete_container`RƒR‚R#N(RRR$(RRRƒR‚R#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR$âscCs|jdt||d|ƒS(sWrapper for :func:`head_object`R#N(RRR((RRRR#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR(êscCsÉ|jdt||d|d|d|d|ƒ\}}|pPdd„|Dƒk}	|	oƒ|oƒ|j|jkoƒ|jdƒdk}
|
r¿t|j|||d|d|d|d|ƒ}n||fS(	sWrapper for :func:`get_object`R†R‚RƒR#trangecss|]}|jƒVqdS(N(R((RR·((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pys	<genexpr>÷sstransfer-encodingN(RRRŽR‰RŒR+R|RN(RRRR†R‚RƒR#trheadersROtis_not_range_requesttretry_is_possible((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRŽîs csû‡‡fd†}t|tƒs(|r1d}n‡|}|jdkr¸t|ddƒ}
t|ddƒ‰t|ddƒ}|
r¦ˆr¦|
ƒ‰‡‡fd†}q¸|r¸|}q¸n|j|tˆˆ|d|d|d	|d
|d|d|	d
|
ƒS(sWrapper for :func:`put_object`cstdˆˆfƒ‚dS(NsNput_object(%r, %r, ...) failure and no ability to reset contents for reupload.(R(RLRM(RR(sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt_default_reset	sittelltseektresetcs
ˆˆƒS(N((taR·(torig_posRk(sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt<lambda>sR4R,RrR5R#R‚RƒN(R6R\RRŒtgetattrRR8(RRRR3R4R,RrR5R#R‚RƒRiR_RjRl((RRRnRksG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR8s$		cCs|jdt|||d|ƒS(sWrapper for :func:`post_object`RƒN(RRR9(RRRR#Rƒ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyR9"sc
Cs%|jdt|||||d|ƒS(sWrapper for :func:`copy_object`RƒN(RRRD(RRRR@R#RARƒ((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRD's	cCs(|jdt||d|d|d|ƒS(s!Wrapper for :func:`delete_object`R‚RƒR#N(RRRE(RRRR‚RƒR#((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRE.scCss|p|j}|s*|jƒ\}}nt|ƒj}t|ƒj}|d|d}|j|ƒ}t|ƒS(Ns://s/info(RœRRR¥RžRÁRG(RRœt_R¥RžR((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRG6sN(R R!R{RRÀR:RsR»RRXRÁR[RRR	RRRR!R"R$R(RŽR8R9RDRERG(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyRHàsP
				E	
						<					(s1.0Ri(s2.0Ri(s3.0Ri(s	containerRsobject(YR{RŠR¢RCR0tdistutils.versionRtrequests.exceptionsRRt	six.movesRtsix.moves.urllib.parseRRfRRRR	RRYR%R
R¦tswiftclient.exceptionsRtswiftclient.utilsRR
RRt_MAXHEADERSRRRÒR2RnRR×tHandlert__version__trequests.structuresR"R$tmodelstPreparedRequesttprepare_headersRÕRARÖR:R*R)R3R;RTR9RgRpRRqR|R”RÁRÈRÎRÙRËRRRRRÀR	RRRRR!R"R$RŽR(R8R9RDRERGRH(((sG/home/tvault/.virtenv/lib/python2.7/site-packages/swiftclient/client.pyt<module>s¾"		

	
				 	 
	
	Jƒ		 			:	R				B#+		V'+'-;(	n$	>	4