/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/shell.pyc (26108B)
=vVc@s2dZddklZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk Z ddk Z ddk lZddk lZddk lZddkZ ddkZ ddklZddklZdd klZdd klZdd klZdd klZdd kl Z dd k!l"Z#ddk!l$Z%ddk&l'Z'ddk(i)i*i+Z,ei-dZ.dZ/dZ0dZ1ei2ei3e4Z5dei6fdYZ7de8fdYZ9dei:fdYZ;dZ<e4djo e<ndS(s5 Command-line interface to the OpenStack Cinder API. i(tprint_functionN(tclient(t exceptions(tutils(t importutils(tstrutils(t_(tshell(tdiscover(tsession(tv2(tv3(tDiscoveryFailuresosprofiler.profilert2t publicURLtvolumetCinderClientArgumentParsercBs#eZdZdZdZRS(cOstt|i||dS(N(tsuperRt__init__(tselftargstkwargs((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRAscCsj|itid}|iid}|iddh|i|dd6|dd6|dd6d S( sverror(message: string) Prints a usage message incorporating the message to stderr and exits. s (choose fromt isFerror: %(errmsg)s Try '%(mainp)s help %(subp)s' for more information. iterrmsgtmainptsubpN(t print_usagetsyststderrtprogt partitiontexittsplit(Rtmessaget choose_fromt progparts((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyterrorDs  cCstt|i|}t|djo]g}|D](}|ditijo ||q6q6~}t|djo |}qn|S(sAvoid ambiguity in argument abbreviation. The idea of this method is to override the default behaviour to avoid ambiguity in the abbreviation feature of argparse. In the case that the ambiguity is generated by 2 or more parameters and only one is visible in the help and the others are with help=argparse.SUPPRESS, the ambiguity is solved by taking the visible one. The use case is for parameters that are left hidden for backward compatibility. ii(RRt_get_option_tuplestlenthelptargparsetSUPPRESS(Rt option_stringtresultt_[1]txtaux((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyR%Ts  <(t__name__t __module__RR$R%(((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyR?s  tOpenStackCinderShellcBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zeid dddddddZdZdZdZdZRS(c Cs,tdddtidddtdt}|idd d d d ti|id d ddti |iddd d dt i ddtd d|iddddt i dd d|idd ti|idddd d|idd ti|iddddt i d d d!|id"d ti|id#dd$dt i d%d d&|id'd ti|id(dd)d*d+dt i d,dt d d-|id.d*d+d ti|id/dd0dt i d1dt i d,dt d d2t d3|id4d ti|id5dd6dt i d7ddd d8|id9d ti|id:dd;d*d<dt i d=d d>|id?d ti|id@ddAdBtddCd dDto|idEddFd dGn|i|tiitii||S(HNRtcindert descriptiontepilogs6Run "cinder help SUBCOMMAND" for help on a subcommand.tadd_helptformatter_classs-hs--helptactiont store_trueR's --versiontversions-ds--debugtdefaulttCINDERCLIENT_DEBUGsShows debugging output.s--os-auth-systemtmetavars tOS_AUTH_SYSTEMs Defaults to env[OS_AUTH_SYSTEM].s--os_auth_systems--service-typess2Service type. For most actions, default is volume.s--service_types--service-namestCINDER_SERVICE_NAMEs/Service name. Default=env[CINDER_SERVICE_NAME].s--service_names--volume-service-namestCINDER_VOLUME_SERVICE_NAMEs=Volume service name. Default=env[CINDER_VOLUME_SERVICE_NAME].s--volume_service_names--endpoint-typestdesttos_endpoint_typetCINDER_ENDPOINT_TYPEs#DEPRECATED! Use --os-endpoint-type.s--endpoint_types--os-endpoint-typestOS_ENDPOINT_TYPEsuEndpoint type, which is publicURL or internalURL. Default=env[OS_ENDPOINT_TYPE] or nova env[CINDER_ENDPOINT_TYPE] or t.s--os_endpoint_types--os-volume-api-versionstOS_VOLUME_API_VERSIONsWBlock Storage API version. Valid values are 1 or 2. Default=env[OS_VOLUME_API_VERSION].s--os_volume_api_versions --bypass-urls t bypass_urltCINDERCLIENT_BYPASS_URLs^Use this API endpoint instead of the Service Catalog. Defaults to env[CINDERCLIENT_BYPASS_URL]s --bypass_urls --retriess ttypeisNumber of retries.s --profiletHMAC_KEYsHMAC key to use for encrypting context data for performance profiling of operation. This key needs to match the one configured on the cinder api server. Without key the profiling will not be triggered even if osprofiler is enabled on server side.(Rt__doc__tstriptFalsetOpenStackHelpFormattert add_argumentR(R)t cinderclientt __version__RtenvtDEFAULT_CINDER_ENDPOINT_TYPEtNonetinttosprofiler_profilert_append_global_identity_argst auth_plugintdiscover_auth_systemstload_auth_system_opts(Rtparser((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pytget_base_parserns                                           c Cs|iddddtiddddtd|id dti|id dd dtid d dd|iddti|iddddtidddd|iddti|iddddtidddd|iddti|iddddtidddd |id!dti|id"dd#dtid$d%dd&|id'dti|id(dd)dtid*dtd+|id,dti|id-dd.dtid/dd0|id1dti|id2dd3dtid4dd5|id6dti|id7dd8dtid9dd:|id;dti|id<dd=dtid>dd?|id@dti|idAddBdtidCddD|idEddFdtidGddH|idIddJdtidKdLddM|idNdti|idOddPdtidQdtdR|idSdti|idTddUdtidVdtdW|idXdtitii||i dYtidZdt dS([Ns--os-auth-strategyR<sR:tOS_AUTH_STRATEGYtkeystoneR's{Authentication strategy (Env: OS_AUTH_STRATEGY, default keystone). For now, any other value will disable the authentications--os_auth_strategys --os-usernamest OS_USERNAMEtCINDER_USERNAMEs.OpenStack user name. Default=env[OS_USERNAME].s --os_usernames --os-passwordst OS_PASSWORDtCINDER_PASSWORDs6Password for OpenStack user. Default=env[OS_PASSWORD].s --os_passwords--os-tenant-namestOS_TENANT_NAMEtCINDER_PROJECT_IDs)Tenant name. Default=env[OS_TENANT_NAME].s--os_tenant_names--os-tenant-idst OS_TENANT_IDtCINDER_TENANT_IDs-ID for the tenant. Default=env[OS_TENANT_ID].s--os_tenant_ids --os-auth-urls t OS_AUTH_URLt CINDER_URLs=URL for the authentication service. Default=env[OS_AUTH_URL].s --os_auth_urls --os-user-idst OS_USER_IDs(Authentication user ID (Env: OS_USER_ID)s --os_user_ids--os-user-domain-idstOS_USER_DOMAIN_IDs=OpenStack user domain ID. Defaults to env[OS_USER_DOMAIN_ID].s--os_user_domain_ids--os-user-domain-namestOS_USER_DOMAIN_NAMEsAOpenStack user domain name. Defaults to env[OS_USER_DOMAIN_NAME].s--os_user_domain_names--os-project-idst OS_PROJECT_IDsyAnother way to specify tenant ID. This option is mutually exclusive with --os-tenant-id. Defaults to env[OS_PROJECT_ID].s--os_project_ids--os-project-namestOS_PROJECT_NAMEsAnother way to specify tenant name. This option is mutually exclusive with --os-tenant-name. Defaults to env[OS_PROJECT_NAME].s--os_project_names--os-project-domain-idstOS_PROJECT_DOMAIN_IDs&Defaults to env[OS_PROJECT_DOMAIN_ID].s--os-project-domain-namestOS_PROJECT_DOMAIN_NAMEs(Defaults to env[OS_PROJECT_DOMAIN_NAME].s--os-region-names tOS_REGION_NAMEtCINDER_REGION_NAMEs)Region name. Default=env[OS_REGION_NAME].s--os_region_names --os-tokenstOS_TOKENsDefaults to env[OS_TOKEN]s --os_tokens--os-urlstOS_URLsDefaults to env[OS_URL]s--os_urltinsecuretCINDERCLIENT_INSECURE( RNRRQRR(R)R tSessiontregister_cli_optionst set_defaultsRL(RRZ((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRVs                                              cCs|i}h|_|idd}yhtd6td6|}Wntj o t}nX|i|||i||x$|iD]}|i||iqW|i ||S(NR<s s1.1R ( R[t subcommandstadd_subparserstshell_v1tshell_v2tKeyErrort _find_actionst extensionstmodulet_add_bash_completion_subparser(RR9RZt subparserstactions_modulet extension((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pytget_subcommand_parsers"      cCsag}xTti|i||i|D].\}}tii||}|i|q+W|S(N(t itertoolstchaint_discover_via_python_patht_discover_via_contrib_pathRORt Extensiontappend(RR9R~tnameRR((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyt_discover_extensionss   ccsuxntiD]`\}}}|idoAt|dp|i|}n|i|}||fVq q WdS(Ntpython_cinderclient_extt load_module(tpkgutilt iter_modulestendswiththasattrt find_moduleR(RR9t module_loaderRtispkgR((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRs ccstiitiit}d|idd}tii||d}tii|d}x^ti|D]M}tii |d }|djoqqnt i ||}||fVqqWdS(Nsv%sRDRtcontribs*.pyiR( tostpathtdirnametabspatht__file__treplacetjointglobtiglobtbasenametimpt load_source(RR9t module_patht version_strtext_pathtext_globRR((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRs cCs?|iddtdt}||id<|id|idS(Ntbash_completionR5R6tfunc(t add_parserRLRMRxRwtdo_bash_completion(RRt subparser((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRs   c Csxdt|DD]}|didd}t||}|ipd}|iidd}t|dg}|i|d |d |d td t} | i d ddd d t i | |i |s iRt-ts it argumentsR'R3R5R6s-hs--helpR7R(tdirRtgetattrRJRKR RRLRMRNR(R)RxRw( RRRtattrtcommandtcallbacktdescR'RRRR((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyR}s*    cCs|pdSti}d}|iti|tititi|tit i }ti}|iti |i|t t do t iit i i|ntid}|iti dS(Ns1%(levelname)s (%(module)s:%(lineno)d) %(message)stloggingtkeystoneclient(Rt StreamHandlert setFormattert FormattertloggertsetLeveltWARNINGt addHandlert getLoggerRR/tDEBUGRtrequests(Rtdebugt streamhandlert streamformatt client_loggertcht ks_logger((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pytsetup_debuggings     cCsd}g}t}||jox{|D]s}||jo t}nJ|oB|ido t}qd|jo|idt}qn|i|q&W|S|SdS(s@This function adds -- separator at the appropriate spot s --metadatas--t=u--N(RLtTrueRR(Rtargvtwordttmptmetadata_optionstarg((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyt_delimit_metadata_argss"      c%Cs|i}|i|\}}|i|it}||_|ipt|_t}n|i |i|_ |i d|i |i}||_ |ip| o|idS|i|}|i|}|i d||i|ijo|i|dS|i|ijo|i|dS|i|i|i|i|i|i|i|i|i|i|i|i |i!f \ }}} } } } } }}}}}}|o#|djot"i#i$|}nd}|p#t&}t'i(|ip|}n|iip>|iip1|ii)o|ii*p|ii+p |ii,}t'i-|ip+|o|i.|n| p |i/ o|pt0i1dqn|pnt2t3i4do=t3i4i5o-yt6i6d}Wqt7j oqXn|pt0i1dq&n|pt0i1t8d n| p(|o|djo|i9} qun| pt0i1d qn|pt0i1t8d n| pt0i1d nd}|p|i:}nt;i<|i||| | d | d | d | d|i d|d|d|d|d|i=d|id|d|d|d||_>y(t'i-|ip|i>i?nWnIt0i@j ot0i1dn&t0iAj ot0i1dnXd}yI|i>iB}||ijo&d|i|f}t0iC|nWnLt0iDj o=|i}|otEiFd|qztEiFd|nXtGo|iH}|otGiI|iHn|i|i>||o2tGiJiK}tLd|tLd|ndS( Nt__pre_parse_args__it__post_parse_args__R]sGYou must provide a user name through --os-username or env[OS_USERNAME].tisattys OS Password: sZYou must provide a password through --os-password, env[OS_PASSWORD] or, prompted response.sYou must provide a tenant_name, tenant_id, project_id or project_name (with project_domain_name or project_domain_id) via --os-tenant-name (env[OS_TENANT_NAME]), --os-tenant-id (env[OS_TENANT_ID]), --os-project-id (env[OS_PROJECT_ID]) --os-project-name (env[OS_PROJECT_NAME]), --os-project-domain-id (env[OS_PROJECT_DOMAIN_ID]) --os-project-domain-name (env[OS_PROJECT_DOMAIN_NAME])sQYou must provide an authentication URL through --os-auth-url or env[OS_AUTH_URL].t region_namet tenant_idt endpoint_typeR~t service_typet service_nametvolume_service_nameRFtretriesthttp_log_debugtcacertt auth_systemRWR s$OpenStack credentials are not valid.sUnable to authorize user.sOpenStack Block Storage API version is set to %s but you are accessing a %s endpoint. Change its value through --os-volume-api-version or env[OS_VOLUME_API_VERSION].sfCannot determine the API version from the endpoint URL. Falling back to the user-specified version: %ssqCannot determine the API version from the endpoint URL or user input. Falling back to the default API version: %ss Trace ID: %ssCTo display trace use next command: osprofiler trace show --html %s (MR[tparse_known_argsRRRtoptionstos_volume_api_versiontDEFAULT_OS_VOLUME_API_VERSIONRLRR~t_run_extension_hooksRRZR't print_helpRt parse_argsRtdo_helpRt os_usernamet os_passwordtos_tenant_namet os_auth_urltos_region_namet os_tenant_idRARRRRFt os_cacerttos_auth_systemRORWt load_pluginRStDEFAULT_CINDER_SERVICE_TYPERtget_service_typetos_project_nametos_project_domain_nametos_project_domain_idt os_project_idtisunauthenticatedt parse_optstoptstexct CommandErrorRRtstdinRtgetpasstEOFErrorRt get_auth_urlt_get_keystone_sessionRtClientRtcst authenticatet UnauthorizedtAuthorizationFailuret$get_volume_api_version_from_endpointtInvalidAPIVersiontUnsupportedVersionRtwarningRUtprofiletinittgett get_base_idtprint(RRRZRRtapi_version_inputtsubcommand_parserRRRRRRRRRRRFRRRWtproject_info_providedt auth_sessiontendpoint_api_versiontmsgR ttrace_id((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pytmains                3      #                 cOs+x$|iD]}|i|||q WdS(s)Runs hooks for all registered extensions.N(R~t run_hooks(Rt hook_typeRRR((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRs cCst}t}xTt|iiD]=\}}|i|x!|iiD]}|i|qNWq(W|id|idtdi ||BdS(sPrints arguments for bash_completion. Prints all commands and options to stdout so that the cinder.bash_completion script does not have to hard code them. sbash-completionRRN( tsettlistRxtitemstaddt _optionalst_option_string_actionstremoveRR(RRtcommandsRtsc_strtsctoption((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRs       RR<s tnargst?R'sShows help for .cCs`|ioE|i|ijo|i|iiq\tid|in|iidS(sJ Shows help about this program or one of its subcommands. s'%s' is not a valid subcommandN(RRxRRRRZ(RR((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRs   c CsU|ii}|ii}|ii}|ii}ti|d|d|d|d|S(NtusernametpasswordRt tenant_name(RRRRRtv2_authtPassword(Rt v2_auth_urlR'R(RR)((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyt get_v2_auths    c Cs|ii}|ii}|ii}|ii}|ii}|iip |ii}|iip |ii }|ii } |ii } t i |d|d|d|d|d|d|d|d| d |  S( NR'R(tuser_idtuser_domain_nametuser_domain_idt project_idt project_nametproject_domain_nametproject_domain_id(RRt os_user_idtos_user_domain_nametos_user_domain_idRRRRRRRtv3_authR+( Rt v3_auth_urlR'R.R/R0R(R1R2R3R4((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyt get_v3_auths*         c Csd}d}y:tid|d|}|id}|id}Wntj o ntj o}ti|}|\}}} } } } | i} | ido |}q| ido |}qt i dnX||fS(NR tauth_urls2.0s3.0s/v3s/v2sWUnable to determine the Keystone version to authenticate with using the given auth_url.( RSRtDiscoverturl_forR t ExceptionturlparsetlowerRRR( RR R;R,R9t ks_discovert url_partstschemetnetlocRtparamstquerytfragment((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyt_discover_auth_versions0s$   c Kso|iipd}|iipd}|iipt}|o t}n|pt}tid|d|}|i d|d|ii \}}|ii pd} |ii pd} |ii pd} d} |oF|o?| o4| p| o|i|} q|i|} qbnD|o|i|} n*|o|i|} ntid| |_|S(NtverifytcertR R;sWUnable to determine the Keystone version to authenticate with using the given auth_url.(RRRStos_certRsRLRR RuRHRRR6R7R:R-RRtauth( RRRRJRsRIt ks_sessionR,R9R'R/R0RL((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRNs4    (R/R0R[RVRRRRRR}RRRRRRRRR-R:RHR(((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyR1ls& z          RMcBseZdZRS(cCs8d|di|df}tt|i|dS(Ns%s%sii(tupperRRMt start_section(Rtheading((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyROs(R/R0RO(((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRMscCsyRtid jotitidn$tittitidWntj o't ddti ti dnYt j oL}t i|ddt dtii|dti ti dnXdS( Niiis... terminating cinder clienttfileitexc_infos ERROR: %s(ii(Rt version_infoR1RRtmapRt safe_decodetKeyboardInterruptRRRR>RRtsixt text_type(te((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pyRs#t__main__(=RJt __future__RR(RRRRRRRRRRORRRRtcinderclient.auth_plugintcinderclient.extensiontcinderclient.openstack.commonRRt*cinderclient.openstack.common.gettextutilsRtcinderclient.v1RRztcinderclient.v2R{RRR tkeystoneclient.auth.identityR R*R R8tkeystoneclient.exceptionsR tsix.moves.urllib.parsetmovesturllibtparseR?t try_importRURRRRt basicConfigRR/RtArgumentParserRtobjectR1t HelpFormatterRMR(((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/shell.pytsT             -