/usr/lib/python2.6/site-packages/cinderclient
NameSizeModeActions
openstack/-0755rm
tests/-0755rm
v1/-0755rm
v2/-0755rm
auth_plugin.py45680644editdlrm
auth_plugin.pyc57410644editdlrm
base.py91040644editdlrm
base.pyc81320644editdlrm
client.py207000644editdlrm
client.pyc173680644editdlrm
exceptions.py50490644editdlrm
exceptions.pyc76630644editdlrm
extension.py14090644editdlrm
extension.pyc15300644editdlrm
service_catalog.py35020644editdlrm
service_catalog.pyc25820644editdlrm
shell.py373030644editdlrm
shell.pyc261080644editdlrm
utils.py82250644editdlrm
utils.pyc95060644editdlrm
version.py7260644editdlrm
version.pyc3310644editdlrm
__init__.py9360644editdlrm
__init__.pyc4260644editdlrm
Edit: /usr/lib/python2.6/site-packages/cinderclient/client.pyc (17368B)
Ñò =vVc1@s_dZddklZddkZddkZddklZddklZddkl Z ddkl Z ddk Z ddk l Z dd klZdd klZeid ƒZyddkZWn"ej oddkiZnXydd klZWn#ej odd klZnXyddkZWnej oddkZnXeed ƒ oddkZeie_nddgZx0ddfD]"Z e i!e ei"dƒdƒq Wd„Z#dei$fd„ƒYZ%de&fd„ƒYZ'e(e(e(e(e)e(e(e(e(dde(e(e(e(e)de(e(e(e(e(d„Z*d„Z+d„Z,dS(sC OpenStack Client interface. Handles the REST calls and responses. iÿÿÿÿ(tprint_functionN(taccess(tadapter(tbase(tdiscover(t exceptions(t importutils(tstrutilssosprofiler.web(tsleept parse_qsltv1tv2tvolumetvolumev2s /v[12]/\w+/?$t/c Cs€ti|ƒ\}}}}}|idƒ}x$tD]}||jo |dSq4Wd|ditƒf}ti|ƒ‚dS(NRis/Invalid client version '%s'. must be one of: %ss, (turlparseturlsplittsplitt_VALID_VERSIONStjoinRtUnsupportedVersion( turltschemetnetloctpathtquerytfragt componentstversiontmsg((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytget_volume_api_from_urlCs  t SessionClientcBsbeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd d„Z e d„ƒZ RS( cOs€|idtƒ|idtƒ}tt|ƒidt||Ž\}}|o&|idjoti ||ƒ‚n||fS(Nt authenticatedt raise_exci( t setdefaulttFalsetpoptTruetsuperRtrequestt status_codeRt from_response(tselftargstkwargsR!tresptbody((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR'RscKs#|idtƒ|i|||S(NR (R"R%R'(R*RtmethodR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt _cs_request_scKs|i|d|S(NtGET(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytgetdscKs|i|d|S(NtPOST(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytpostgscKs|i|d|S(NtPUT(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytputjscKs|i|d|S(NtDELETE(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytdeletemscCst|iƒƒS(N(Rt get_endpoint(R*((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt$get_volume_api_version_from_endpointpscCs|i|ƒ|i|ƒS(N(t invalidatet get_token(R*tauth((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt authenticatess cCsM|ip |ii}t|tiƒo|i|iƒiStdƒ‚dS(Ns9There is no service catalog for this type of auth plugin.(R=tsessiont isinstanceRtBaseIdentityPlugint get_accesstservice_catalogtAttributeError(R*R=((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyRCwsN( t__name__t __module__R'R0R2R4R6R8R:tNoneR>tpropertyRC(((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyRPs       t HTTPClientcBsæeZdZdedddddddddddedddd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zed „Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(spython-cinderclientt publicURLtkeystonecCs»||_||_||_||_|o(|djo| oti|ƒ‚n| o;|o4|djo'|iƒ}|ptiƒ‚q–n|o|idƒnd|_ d|_ | |_ | |_ | |_| |_||_|o|idƒn||_t|pdƒ|_||_|ipd|_d|_| |_||_||_|o t|_n|o ||_n t|_||_||_ti t!ƒ|_"dS(NRKRR i(#tusertpasswordt projectidt tenant_idRtAuthSystemNotFoundt get_auth_urltEndpointNotFoundtrstripRGtauth_urlRt region_namet endpoint_typet service_typet service_nametvolume_service_namet bypass_urltinttretriesthttp_log_debugtmanagement_urlt auth_tokent proxy_tokentproxy_tenant_idttimeoutR#t verify_certR%t auth_systemt auth_plugintloggingt getLoggerREt_logger(R*RLRMRNRTtinsecureRbRORaR`RURVRWRXRYRZR\R]tcacertRdRe((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt__init__‡sB                       cCs |ipdSdg}xA|D]9}|djo|id|ƒq|id|ƒqWx7|dD]+}d ||d|f}|i|ƒqgWd |joGd |d joti|d ƒ}n |d }|id |ƒn|iid di|ƒƒdS(Nscurl -iR1R3R7R5s -X %ss %stheaderss -H "%s: %s"tdataRMs -d '%s's REQ: %s t(sGETsPOSTsDELETEsPUT(R]tappendRt mask_passwordRhtdebugR(R*R+R,t string_partstelementtheaderRm((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt http_log_reqºs$      cCs5|ipdS|iid|i|i|iƒdS(NsRESP: [%s] %s RESP BODY: %s (R]RhRqR(Rlttext(R*R-((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt http_log_respÑs  cKs|id|idhƒƒ|i|ddR"RNR'Rt BadRequestR\t UnauthorizedRhRqRGtClientExceptiontcodeR€tConnectionErrortTimeoutR( R*RR/R,t auth_attemptstattemptstbackoffR-R.RƒR((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR0ýs\      !    cKs|i|d|S(NR1(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR2.scKs|i|d|S(NR3(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR41scKs|i|d|S(NR5(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR64scKs|i|d|S(NR7(R0(R*RR,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR87scCs t|iƒS(N(RR^(R*((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR::sc Cs7|idjoøyŽ||_tii||ƒ|_|ii|_|o|ii|_n|iid|i d|i d|i ƒ}|i dƒ|_ d SWq3tij otdƒ‚q3tj otiƒ‚q3tij otdƒ‚q3Xn,|idjo |d Sti||ƒ‚d S( sÇSee what the auth service told us and process the response. We may get redirected to another site, fail or actually get back a service catalog with a token and our endpoints. iÈRURVRWRsAFound more than one valid endpoint. Use a more restrictive filters5Could not find any suitable endpoint. Correct region?i1tlocationN(R(RTRt AccessInfotfactorytauth_refRCR_turl_forRURVRWRSR^RGRtAmbiguousEndpointstprinttKeyErrortAuthorizationFailureRRR)(R*RR-R.t extract_tokenR^((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt_extract_service_catalog=s0         cCs}di|dd|i|ifgƒ}|iid|ƒ|i|ddh|id6ƒ\}}|i|||dtƒS( sµWe have a token, but don't know the final endpoint for the region. We have to go back to the auth service and ask again. This request requires an admin-level token to work. The proxy token supplied could be from a low-level enduser. We can't get this from the keystone service endpoint, we have to use the admin endpoint. This will overwrite our admin token with the user token. Rttokenss%s?belongsTo=%ssUsing Endpoint URL: %sR1Rls X-Auth-TokenR–( RR`RaRhRqR'R_R—R#(R*RR-R.((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt_fetch_endpoints_from_authas cCs ||_dS(N(R^(R*R((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytset_management_urlvsc Cs*ti|iƒ}|\}}}}}|i}|djo d}n|idƒ}x@|D]8} t| ƒdjo| ddjo| |_Pq]q]W|id|dd ƒ} ti || |||fƒ} |i} |idjo•xI| oA|i p|i djo|i | ƒ} qí|i | ƒ} qíW|i o;|io|i|iƒn|i| ƒ|i |_qënmy"x| o|i| ƒ} q…WWnGtij o8| idƒdjo| d } n|i | ƒnX|io|i|iƒn|iptid ƒ‚ndS( NiPRitvs:%diŠsv2.0RKs/v2.0s Cinder Client(iŠ(RRRTtportRGRtlenRtreplacet urlunsplitRdt_v2_autht _plugin_authR`RZRšR™R_t_v1_authRR•tfindR^R…( R*t magic_tupleRRRRRRœt path_partstpartt new_netloct admin_urlRT((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR>ysL   $         cCs|iotiƒ‚nh|id6|id6}|io|i|d(R*RT((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyR¡ÇscCszhhh|id6|id6d6d6}|io|i|ddR¢R¡R R°(((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyRIƒs4  ,  # 1      $   7   RJRKc'KsÕ|oQ| oI|iddƒ|id| ƒtd|d|d| d| d||St||d |d |d |d |d |d|d|d|d| d| d| d| d| d|d|d|d|d|ƒSdS(Nt user_agentspython-cinderclientt interfaceR?R=RWRXRURNRTRiRbROR`RaRVRYRZR\R]RjRdRe(R"RRI(R¬RMt project_idRTRiRbRaR`RURVRWRXRYRZR\R]RdReRjROR?R=R,((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pyt_construct_http_clientås: cCsyhdd6dd6}y|t|ƒ}WnAttfj o/d|di|ƒf}ti|ƒ‚nXti|ƒS(Nscinderclient.v1.client.Clientt1scinderclient.v2.client.Clientt2s/Invalid client version '%s'. must be one of: %ss, (tstrR”R‚RRRRt import_class(Rt version_mapt client_pathR((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytget_client_classs cOst|ƒ}|||ŽS(N(R½(RR+R,t client_class((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytClient&s (-t__doc__t __future__RRftretkeystoneclientRRtkeystoneclient.auth.identityRRR€t cinderclientRtcinderclient.openstack.commonRRt try_importR{Rt ImportErrort urllib.parsetparseteventletRttimeR~t simplejsonthasattrtcgiR Rtsvctadd_catalog_discover_hacktcompileRtLegacyJsonAdapterRtobjectRIRGR#R¶R½R¿(((s@/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/client.pytsb        3ÿc   '