/usr/lib/python2.6/site-packages/glanceclient
NameSizeModeActions
common/-0755rm
openstack/-0755rm
tests/-0755rm
v1/-0755rm
v2/-0755rm
client.py23610644editdlrm
client.pyc16170644editdlrm
exc.py47580644editdlrm
exc.pyc92320644editdlrm
shell.py325140644editdlrm
shell.pyc217930644editdlrm
_i18n.py11200644editdlrm
_i18n.pyc4420644editdlrm
__init__.py11330644editdlrm
__init__.pyc6480644editdlrm
Edit: /usr/lib/python2.6/site-packages/glanceclient/shell.pyc (21793B)
|id?dti|id@dtidAddB|idCdti|idDdtidEddF|idGdti|idHdtidIddJ|idKdti|idLdtidMddN|idOdti|idPdtidQddR|idSdtidS(TNs-ks --insecuretdefaulttactiont store_truethelpsExplicitly allow glanceclient to perform "insecure SSL" (https) requests. The server's certificate will not be verified against any certificate authorities. This option should be used with caution.s --os-certsnPath of certificate file to use in SSL connection. This file can optionally be prepended with the private key.s --cert-filetdesttos_certsDEPRECATED! Use --os-cert.s--os-keysuPath of client key to use in SSL connection. This option is not necessary if your key is prepended to your cert file.s --key-filetos_keysDEPRECATED! Use --os-key.s --os-cacerttmetavarst os_cacertt OS_CACERTsPath of CA TLS certificate(s) used to verify the remote server's certificate. Without this option glance looks for the default system CA certificates.s --ca-filesDEPRECATED! Use --os-cacert.s --os-usernamet OS_USERNAMEsDefaults to env[OS_USERNAME].s --os_usernames --os-user-idt OS_USER_IDsDefaults to env[OS_USER_ID].s--os-user-domain-idtOS_USER_DOMAIN_IDs#Defaults to env[OS_USER_DOMAIN_ID].s--os-user-domain-nametOS_USER_DOMAIN_NAMEs%Defaults to env[OS_USER_DOMAIN_NAME].s--os-project-idt 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-nametOS_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-domain-idtOS_PROJECT_DOMAIN_IDs&Defaults to env[OS_PROJECT_DOMAIN_ID].s--os-project-domain-nametOS_PROJECT_DOMAIN_NAMEs(Defaults to env[OS_PROJECT_DOMAIN_NAME].s --os-passwordt OS_PASSWORDsDefaults to env[OS_PASSWORD].s --os_passwords--os-tenant-idt OS_TENANT_IDsDefaults to env[OS_TENANT_ID].s--os_tenant_ids--os-tenant-nametOS_TENANT_NAMEs Defaults to env[OS_TENANT_NAME].s--os_tenant_names --os-auth-urlt OS_AUTH_URLsDefaults to env[OS_AUTH_URL].s --os_auth_urls--os-region-nametOS_REGION_NAMEs Defaults to env[OS_REGION_NAME].s--os_region_names--os-auth-tokent OS_AUTH_TOKENsDefaults to env[OS_AUTH_TOKEN].s--os_auth_tokens--os-service-typetOS_SERVICE_TYPEs!Defaults to env[OS_SERVICE_TYPE].s--os_service_types--os-endpoint-typetOS_ENDPOINT_TYPEs"Defaults to env[OS_ENDPOINT_TYPE].s--os_endpoint_type(t add_argumenttFalseRtenvtargparsetSUPPRESS(tselftparser((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_append_global_identity_args7s                                        c Cstidddtidddtdt}|idd d d d ti|id d ddti |idddt t i dd d d d|idddtd d d d|iddtd d ddd d|idddd d|iddddt d d d d!|id"d#dd$dtd d d d%|id&dt i d'd d(|id)d ti|id*dt i d+ddd d,|id-d tito|id.d/d0d d1n|i||S(2Ntprogtglancet descriptiontepilogs9See "glance help COMMAND" for help on a specific command.tadd_helptformatter_classs-hs--helpR RRs --versiontversions-ds--debugR tGLANCECLIENT_DEBUGs$Defaults to env[GLANCECLIENT_DEBUG].s-vs --verbosesPrint more verbose outputs --get-schemaRt get_schemasxIgnores cached copy and forces retrieval of schema that generates portions of the help text. Ignored with API version 1.s --timeoutiXs(Number of seconds to wait for a responses--no-ssl-compressiontssl_compressiont store_falsesDEPRECATED! This option is deprecated and not used anymore. SSL compression should be disabled by default by the system SSL library.s-fs--forcetforces9Prevent select actions from requesting user confirmation.s--os-image-urlt OS_IMAGE_URLsDefaults to env[OS_IMAGE_URL]. If the provided image url contains a version number and `--os-image-api-version` is omitted the version of the URL will be picked as the image api version to use.s--os_image_urls--os-image-api-versiontOS_IMAGE_API_VERSIONs+Defaults to env[OS_IMAGE_API_VERSION] or 2.s--os_image_api_versions --profileRtHMAC_KEYsvHMAC key to use for encrypting context data for performance profiling of operation. This key should be the value of HMAC key configured in osprofiler middleware in glance, it is specified in paste configuration file at /etc/glance/api-paste.ini and /etc/glance/registry-paste.ini. Without key the profiling will not be triggered even if osprofiler is enabled on server side.(R)tArgumentParsert__doc__tstripR't HelpFormatterR&R*t glanceclientt __version__tboolRR(tTruetNonetosprofiler_profilerR-(R+R,((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pytget_base_parsersf                       cCsj|i}h|_|idd}ti|d}|i|||i|||i||S(NRs tshell(RGt subcommandstadd_subparsersRtimport_versioned_modulet _find_actionst_add_bash_completion_subparser(R+R4R,t subparserst submodule((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pytget_subcommand_parser&s   c Csxdt|DD]}|didd}t||}|ipd}|iidd}t|dg}|i|d |d |d td t} | i d ddd d t i | |i |5s it_t-ts it argumentsRR0R2R3s-hs--helpR tfunc(tdirtreplacetgetattrR>R?tsplitt add_parserR'R@R&R)R*RIt set_defaults( R+RNtactions_moduletattrtcommandtcallbacktdescRRXt subparsertargstkwargs((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyRL4s(     cCs?|iddtdt}||id<|id|idS(Ntbash_completionR2R3RY(R^R'R@RIR_tdo_bash_completion(R+RNRe((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyRMLs    cCs|io|iSdSdS(sTranslate the available url-related options into a single string. Return the endpoint that should be used to talk to Glance if a clear decision can be made. Otherwise, return None. N(t os_image_urlRE(R+Rf((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_get_image_urlSs cCsd}d}y:tid|d|}|id}|id}Wntij o}ti|}|\}} } } } } | i} | ido |}q| ido |}qd|}t i |nX||fS(NR tauth_urls2.0s3.0s/v3s/v2sUnable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. error=%s( RERtDiscoverturl_fortks_exctClientExceptionturlparsetlowerRRRt CommandError(R+R Rlt v2_auth_urlt v3_auth_urlt ks_discovertet url_partstschemetnetloctpathtparamstquerytfragmenttmsg((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_discover_auth_versions^s$   cKstii|}|idd}|id|d|\}}|idd}|idd}|idd}|idd} |idd} |iddp|id d} |id dp|id d} |id d} |id d}d}| p| p | p|}|o |p| }|o| }|oIti|d|d|d|d| d| d| d | d | d | }n:|o%ti|||d | d | }nt i d||_ |S(NRlR tuser_idtusernametpasswordtuser_domain_nametuser_domain_idt project_idt tenant_idt project_namet tenant_nametproject_domain_idtproject_domain_namesCredential and auth_url mismatch. The given auth_url is using Keystone V2 endpoint, which may not able to handle Keystone V3 credentials. Please provide a correct Keystone V3 auth_url.( R tSessiont constructtpopRERtv3_authtPasswordtv2_authRRstauth(R+Rgt ks_sessionRlRtRuRRRRRRRRRRt use_domaintuse_v3tuse_v2((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_get_keystone_session|sZ     c Cs|i|}|i}|o| p t|doti|i}|p|}|i}n<|iptit dn|i pztt i do@t i i o0ytid|_ Wqtj oqXn|i ptit dq n|ip/|ip%|io|ip|ip|i}|ptit dn|iptit dnh|id6|id 6|id 6|id 6|id 6|i d 6|id6|id6|id6|id6|id6|id6|id6|id6|id6|id6}|i|} |ip | i}|i pd} |i!pd} |i"p| i#d| d| d|i$}||fS(NRYsHYou must provide a username via either --os-username or env[OS_USERNAME]tisattys OS Password: s\You must provide a password via either --os-password, env[OS_PASSWORD], or prompted responsesYou must provide a project_id or project_name (with project_domain_name or project_domain_id) via --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])sMYou must provide an auth url via either --os-auth-url or via env[OS_AUTH_URL]RlRRRRRRRRRRRtinsecuretcacerttcerttkeytpublictimaget service_typet interfacet region_name(%Rkt os_auth_tokenthasattrRtis_authentication_requiredRYt os_usernameRRsRUt os_passwordtsyststdinRtgetpasstEOFErrortos_tenant_namet os_tenant_idtos_project_nametos_project_domain_nametos_project_domain_idt os_project_idt os_auth_urlt os_user_idtos_user_domain_idtos_user_domain_nameRRRRRt get_tokentos_endpoint_typetos_service_typeRjt get_endpointtos_region_name( R+Rft image_urlt auth_tokent auth_reqdtendpointttokent project_infoRgRt endpoint_typeR((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_get_endpoint_and_tokensr    #                        cCsw|i|\}}h|d6|id6|id6|id6|id6|id6|id6}ti|||}|S(NRRttimeoutRRRR7( RRRRRRR7RAtClient(R+t api_versionRfRRRgtclient((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_get_versioned_clients      s~/.glanceclientcCstii|}|}|io:ti|iid}tii||i}ntii |pSyti |Wqt j o/}d|}t t i|dtiqXndddg} g} dddgD] } | tii|| d q~ } d } xt| | D]\}}tii | p |ioy^|ii|}t|d ii}z)|~}|iti|iWdQXWqtj o| d 7} qXq$q$W| t| jS( Nsutf-8s%stfileRsmetadefs/namespacesmetadefs/resource_typet namespacet resource_types _schema.jsonitwi(tosR{t expanduserRthashlibtsha1tencodetjoint hexdigesttexiststmakedirstOSErrortprintRt safe_decodeRtstderrtzipR6tschemastgettopent__exit__t __enter__twritetjsontdumpstrawt Exceptiontlen(R+toptionsRthome_dirthomedirt path_prefixt hash_hostRwRt resourcest_[1]txtschema_file_pathstfailed_download_schematresourcetschema_file_pathtschemat_[2]tf((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_cache_schemas,s4  %6 &&  csfd}ti|}i}|i|\}y(i}ti|\}}Wntj o d}nXy8t i p |pd}|t jo tnWn-tj o!dt } ti d| nXi p| oid|dS||} | i|}|iijoi|d| dS|iijoi|dSi o|djot} id} | iid\} }x=|d D]1}|d id oi| } PqqW| otd d tid}q3n||} | i|}|i oioi|_ntid}|iti|i |i!o ti"nti#t$oi%}|ot$i&i%ni||} zmy|i| |WnRt'i(j ot'i)dn/t*j o"|i!ot+i,nnXWd|o2t$ii-}td|td|nXdS(Ncsyi|SWnztj oA}iotint|ptdnn/tj o"iotinnXdS(Ns;Unable to import module. Re-run with --debug for more info.(RPt ImportErrortdebugt tracebackt print_exctstrR(RRw(R+R(s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyt_get_subparserQs   is6Invalid API version parameter. Supported values are %sRR,it2s /versionstversionstidRs~WARNING: The client is falling back to v1 because the accessing to v2 failed. This behavior will be removed in future versionsRiRAs'Invalid OpenStack Identity credentials.sProfiling trace ID: %ssCTo display trace use next command: osprofiler trace show --html %s (.tcopytdeepcopyRGtparse_known_argsRkRt strip_versiont ValueErrorREtinttos_image_api_versiontSUPPORTED_VERSIONStexitRtdo_helpt parse_argsRYRiRDRt http_clientRRRRRRRRtloggingt getLoggert addHandlert StreamHandlertsetLevelRtDEBUGtINFORFtprofiletinitRt UnauthorizedRsRRRt get_base_id(R+targvRt base_argvR,RfRt url_versionRRt sub_parsertswitch_versionRtresptbodyR4tLOGRttrace_id((R+Rs?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pytmainOs          $  RbRs tnargst?RsDisplay help for .cCst|dd}|oO|i|ijo|i|iintid|id|}n |i|i p|idjottd|ndS(s:Display help about this program or one of its subcommands.RbRWs'%s' is not a valid subcommandt Rs8Run `glance --os-image-api-version 1 help%s` for v1 helpN(R\RbRIt print_helpRRsRR(R+RfR,Rb((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyRs   cCst}t}xT|iiD]C\}}|i|x'|iiiD]}|i|qNWq"W|id|idtdi ||BdS(sPrints arguments for bash_completion. Prints all of the commands and options to stdout so that the glance.bash_completion script doesn't have to hard code them. Rhsbash-completionR N( tsetRItitemstaddt _optionalst_option_string_actionstkeystremoveRR(R+t_argstcommandsRtsc_strtsctoption((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyRis      (t__name__t __module__R-RGRPRLRMRkRRRRRRRtargRRi(((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyR 5s ]     A `  # }R@cBseZdZRS(cCs8d|di|df}tt|i|dS(Ns%s%sii(tuppertsuperR@t start_section(R+theading((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyR3s(R.R/R3(((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyR@scCs~y'tittitidWnPtj oti dddn,t j o}ti ti |nXdS(Nis... terminating glance clientt exit_codei( R RtmapRRRRtKeyboardInterruptRRRtexception_to_str(Rw((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyRs '(,R>t __future__RR)RRRRR RRRt oslo_utilsRRtsix.moves.urllib.parsetmovesturllibtparseRqRARtglanceclient.commonRRtkeystoneclient.auth.identityRRRRtkeystoneclientRt)keystoneclient.openstack.common.apiclientR RoR t try_importRFRURtobjectR R@R(((s?/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/shell.pyts<