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:
ó
8S
bc@s»dZddlZddlZddlZddlZddlmZddlZyddlZWne	k
rddl
ZnXddlmZdd	d„ƒYZ
d„Zd„ZdS(
sC
OpenStack Client interface. Handles the REST calls and responses.
iÿÿÿÿN(timportutils(t
exceptionst
HTTPClientcBs§eZdZd
d
d
ded
d
d
d
dd
d
d
ed
eeedd
d
d
d
d„Zd„Zd
d„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„ZRS(t
contegoclienttdefaultt	publicURLtkeystonecCs–||_||_||_||_d|_|rX|dkrX|rXtj|ƒ‚n|r•|r•|dkr•|jƒ}|s•tj	ƒ‚q•n|rª|j
dƒn||_d|_d|_
||_|
|_||_||_|
|_||_||_|r|j
dƒn||_|p,||_||_|rSt|ƒ|_n	d|_g|_|jpqd|_||_|	|_||_d|_t |_!|r¶t |_"n|p¿t#|_"||_$||_%d|_&d|_'t(j)t*ƒ|_+|jr€|j+j,r€t(j-ƒ}|j+j.|ƒt |j+_/t0t1dƒr€t1j(j)t1j*ƒ}|j.|ƒ|j2t(j3ƒq€nd|_4i|_5dS(NRt/sv1.1itlogging(6tusertuser_idtpasswordt
project_idtNonet
password_funcRtAuthSystemNotFoundtget_auth_urltEndpointNotFoundtrstriptauth_urltversiontauth_versiontdomain_nametregion_namet
endpoint_typetservice_typetservice_nametvolume_service_namettimingst
bypass_urltos_cachethttp_log_debugtfloatttimeoutttimestmanagement_urlt
auth_tokentproxy_tokentproxy_tenant_idt
keyring_savertFalset
keyring_savedtverify_certtTruetauth_systemtauth_plugint_sessiont_current_urlRt	getLoggert__name__t_loggerthandlerst
StreamHandlert
addHandlert	propagatethasattrtrequeststsetLeveltWARNINGtservice_catalogtservices_url(tselfR	RRRRtinsecureR!R&R%RRRRRRRRtno_cacheRR,R-R$tcacertR
tchtrql((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyt__init__sh																										
	cCs
||_dS(N(R#(R=turl((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pytset_management_urlhscCs¯t|ƒr|jƒ}ndSx1|D])}y||}Wq&tk
rNdSXq&W||kr«|rr|||<q«||jdƒ}tj|ƒ}d|jƒ||<ndS(srReplace the value of a key in `target`.

        The key can be at the top level by specifying a list with a single
        key as the path. Nested dictionaries are also supported by passing a
        list of keys to be navigated to find the one that should be replaced.
        In this case the last one is the one that will be replaced.

        :param dict target: the dictionary that may have a key to be redacted;
                            modified in place
        :param list path: a list representing the nested structure in `target`
                          that should be redacted; modified in place
        :param string text: optional text to use as a replacement for the
                            redacted key. if text is not specified, the
                            default text will be sha1 hash of the value being
                            redacted
        Nsutf-8s{SHA1}%s(tlentpoptKeyErrortencodethashlibtsha1t	hexdigest(R=ttargettpathttexttkeytptvaluetsha1sum((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyt_redactks

	
cCsJ|js
dSdg}|jdtƒs8|jdƒn|jd|ƒ|jd|ƒtj|jdƒƒ}|j|dgƒt|jƒƒ}x5|D]-}||}d||f}	|j|	ƒqžWd	|kr)t	j
|jd	ƒƒ}
|j|
d
ddgƒ|jd
t	j|
ƒƒn|jj
ddj|ƒƒdS(Ns
curl -g -itverifys --insecures '%s's -X %stheaderssX-Auth-Tokens -H "%s: %s"tdatatauthtpasswordCredentialsRs -d '%s'sREQ: %st(RtgetR+tappendtcopytdeepcopyRTtsortedtkeystjsontloadstdumpsR2tdebugtjoin(R=tmethodRDtkwargststring_partsRVR`tnameRRtheaderRW((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pythttp_log_req‘s&		

cCs²|js
dS|jrq|jdkrqy/tj|jƒ}|j|dddgƒWqwtk
rmd}qwXnd}|jj	di|jd6|j
d6tj|ƒd6ƒdS(	Nitaccessttokentids3RESP: [%(status)s] %(headers)s
RESP BODY: %(text)s
tstatusRVRO(RROtstatus_codeRaRbRTt
ValueErrorR
R2RdRVRc(R=tresptbody((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyt
http_log_resp¬s	



cKs¤|jd|jdiƒƒ|j|dd<d|dd<d|krvd|dd<tj|dƒ|d<|d=n|jr•|jd|jƒn|j|d	<|j|||ƒtj	|||}|j
|ƒ|jrj|jd
kr%d|jks
d|jkr%t
j|jƒ‚q%nytj|jƒ}Wqptk
rf}d}|jj|ƒqpXnd}|jd
kršt
j||||ƒ‚n||fS(
NRVs
User-Agentsapplication/jsontAcceptRssContent-TypeRWR!RUisConnection refusedsactively refused(t
setdefaultR[t
USER_AGENTRaRcR!R*RkR8trequestRtRORpRtConnectionRefusedRbRqR
R2terrort
from_response(R=RDRfRgRrRsterr((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyRx¾s6
	

	cKsZtjƒ}|j|||\}}|jjd||f|tjƒfƒ||fS(Ns%s %s(ttimeRxR"R\(R=RDRfRgt
start_timeRrRs((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyt
_time_requestàs
cKs|j|}y_|j|jdiƒd<|jrF|j|dd<n|j|||\}}||fSWntjk
rŠ}|‚nXdS(NRVsX-Auth-TokensX-Auth-Project-Id(R#R$RvRRRtUnauthorized(R=RDRfRgRrRste((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyt_cs_requestçs
	cKs|j|d|S(NtGET(R‚(R=RDRg((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyR[òsN(R1t
__module__RwR
R(R+RCRERTRkRtRxRR‚R[(((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyRs(		G	&			"		cCs*idd6}|t|ƒ}tj|ƒS(Ns:contego_python_novaclient_ext.contegoclient.client2.Clientt2(tstrRtimport_class(Rtversion_maptclient_path((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pytget_client_classös
cOst|ƒ}|||ŽS(N(RŠ(RtargsRgtclient_class((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pytClientÿs((t__doc__R]RJRR}t
oslo_utilsRR8RatImportErrort
simplejsont
novaclientRRRŠR(((sV/usr/lib/python2.7/site-packages/contego_python_novaclient_ext/contegoclient/client.pyt<module>s
â