/usr/lib/python2.6/site-packages/novaclient
NameSizeModeActions
openstack/-0755rm
tests/-0755rm
v1_1/-0755rm
v2/-0755rm
api_versions.py135520644editdlrm
api_versions.pyc137060644editdlrm
auth_plugin.py49460644editdlrm
auth_plugin.pyc57840644editdlrm
base.py108690644editdlrm
base.pyc99830644editdlrm
client.py315860644editdlrm
client.pyc259010644editdlrm
crypto.py12930644editdlrm
crypto.pyc11230644editdlrm
exceptions.py72270644editdlrm
exceptions.pyc118160644editdlrm
extension.py14710644editdlrm
extension.pyc15690644editdlrm
i18n.py11440644editdlrm
i18n.pyc5610644editdlrm
service_catalog.py35210644editdlrm
service_catalog.pyc26970644editdlrm
shell.py360070644editdlrm
shell.pyc259140644editdlrm
utils.py122050644editdlrm
utils.pyc125050644editdlrm
__init__.py8390644editdlrm
__init__.pyc4670644editdlrm
Edit: /usr/lib/python2.6/site-packages/novaclient/shell.pyc (25914B)
=vVc@s%dZddklZddkZddkZddkZddkZddklZddkl Z ddk l Z ddk lZddklZdd klZdd klZeZeZyddkZeZWnej onXddkZdd klZddkZdd klZdd klZ ddk!Zddk"l#Z#ddk$l%Z%ddkl&Z&dZ'dZ(dZ)dZ*ei+e,Z-dZ.de/fdYZ0dei1fdYZ2de/fdYZ3dei4fdYZ5dZ6e,djo e6ndS( s3 Command-line interface to the OpenStack Nova API. i(tprint_functionN(tpassword(ttoken(tv3(tsession(t encodeutils(t importutils(tstrutils(t api_versions(tclient(t exceptions(t_(tcliutils(tutilss2.0s2.latestt publicURLtcomputecCs|djodSyt|}Wn2tj o&td|}ti|nX|djo#td|}ti|n|S(Ns%s must be a floatis%s must be greater than 0(tNonetfloatt ValueErrorR targparsetArgumentTypeError(ttexttvaluetmsg((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pytpositive_non_zero_float=s  t SecretsHelpercBsteZdZdZdZedZdZedZ edZ edZ edZ RS( cCs(||_||_d|_d|_dS(N(targsR Rtkeyt _password(tselfRR ((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyt__init__Ls   cCs)|djpt|djotStS(Ni(RtlentFalsetTrue(RR((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyt_validate_stringRs cCs|idj o|iS|ii|ii|ii|ii|ii|ii|ii |ii g}xIt |D];\}}|djod||i( R@RRARREt get_passwordR2tsplitt all_errors(RRCtblockt_tokent _tenant_id((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRCs#cCs}t p|ii odSd}yBtid|i}|o|idd\}}}nWntj onX|S(NR?R>i( R@RRARRERQR2RRRS(RRRTt_management_urlRV((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRBs#cCs}t p|ii odSd}yBtid|i}|o|idd\}}}nWntj onX|S(NR?R>i( R@RRARRERQR2RRRS(RRGRTRURW((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRGs#( t__name__t __module__RR"R2R!R=RHtpropertyRRCRBRG(((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRKs      tNovaClientArgumentParsercBs#eZdZdZdZRS(cOstt|i||dS(N(tsuperR[R(RRtkwargs((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRscCsp|itid}|iid}|idtdh|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_usageR5tstderrtprogt partitiontexitR RR(Rtmessaget choose_fromt progparts((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyterrors cCstt|i|}t|djo\g}|D]"\}}}||iddq6~}tt|djo |d Sn|S(shreturns (action, option, value) candidates for an option prefix Returns [first candidate] if all candidates refers to current and deprecated forms of the same options: "nova boot ... --key KEY" parsing succeed because --key could only match --key-name, --key_name which are current/deprecated forms of the same option. iR t-(R\R[t_get_option_tuplesRtreplacetset(Rt option_stringt option_tuplest_[1]tactiontoptionRt normalizeds((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRls / (RXRYRRjRl(((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyR[s  tOpenStackComputeShellcBseZgZdZdZedZdZdZdZ dZ dZ dZ d Z d Zeid d d dddddZRS(cCstii||idtiddttii ||idtidd|idtidd |id tid d dS( NtinsecuretNOVACLIENT_INSECURERJt os_usernamet OS_USERNAMEt NOVA_USERNAMERKt OS_PASSWORDt NOVA_PASSWORDt os_auth_urlt OS_AUTH_URLtNOVA_URL( tksessiontSessiontregister_cli_optionst set_defaultsR RMR tidentitytPasswordtregister_argparse_arguments(Rtparser((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyt_append_global_identity_argss   cCs#tdddtidddtdt}|idd d d d ti|id d ddti |iddtd d d t d|iddt i t iddttd d d t d|iddtd d d t d|iddt idd d|idd ti|idd ti|iddddt idd d t d!|id"d ti|id#dd$dt id%d t d&|id'd ti|id(dd)dt id*d+d t d,|id-d ti|id.dd/dt id0d d1|id2d ti|id3dd4d t d5|id6d ti|id7dd8dt id9d t d:|id;d ti|id<dd=dt id>d t d?|id@d ti|idAddBdCdDdt idEdt idFdtd t dGtdH|idId ti|idJddKdt idLdtd t dM|idNd ti|idOddPdCdQdt idRd dS|idTd titii||i||S(UNRdtnovat descriptiontepilogs7See "nova help COMMAND" for help on a specific command.tadd_helptformatter_classs-hs--helpRrt store_truethelps --versiontversions--debugRJsPrint debugging output.s --os-cachetOS_CACHEsHUse the auth token cache. Defaults to False if env[OS_CACHE] is not set.s --timingssPrint call timing info.s--os-auth-tokent OS_AUTH_TOKENsDefaults to env[OS_AUTH_TOKEN].s --os_usernames --os_passwords--os-tenant-nametmetavarstOS_TENANT_NAMEtNOVA_PROJECT_IDs Defaults to env[OS_TENANT_NAME].s--os_tenant_names--os-tenant-idst OS_TENANT_IDsDefaults to env[OS_TENANT_ID].s --os_auth_urls--os-region-names tOS_REGION_NAMEtNOVA_REGION_NAMEs Defaults to env[OS_REGION_NAME].s--os_region_names--os-auth-systems tOS_AUTH_SYSTEMs Defaults to env[OS_AUTH_SYSTEM].s--os_auth_systems--service-typess%Defaults to compute for most actions.s--service_types--service-namestNOVA_SERVICE_NAMEs#Defaults to env[NOVA_SERVICE_NAME].s--service_names--volume-service-namestNOVA_VOLUME_SERVICE_NAMEs*Defaults to env[NOVA_VOLUME_SERVICE_NAME].s--volume_service_names--os-endpoint-typestdestR)tNOVA_ENDPOINT_TYPEtOS_ENDPOINT_TYPEs>Defaults to env[NOVA_ENDPOINT_TYPE], env[OS_ENDPOINT_TYPE] or t.s--endpoint-types--os-compute-api-versionstOS_COMPUTE_API_VERSIONsmAccepts X, X.Y (where X is major and Y is minor part) or "X.latest", defaults to env[OS_COMPUTE_API_VERSION].s--os_compute_api_versions --bypass-urls t bypass_urltNOVACLIENT_BYPASS_URLs]Use this API endpoint instead of the Service Catalog. Defaults to env[NOVACLIENT_BYPASS_URL].s --bypass_url(R[t__doc__tstripR tOpenStackHelpFormattert add_argumentRtSUPPRESSt novaclientt __version__R RRLR RMR!tDEFAULT_NOVA_ENDPOINT_TYPEtDEFAULT_OS_COMPUTE_API_VERSIONt auth_plugintload_auth_system_optsR(RR((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pytget_base_parsers                                 cCs|i}h|_|idd}tid|i}|i|||||i||||x*|iD]}|i||i||qsW|i ||S(NRs snovaclient.v%s.shell( Rt subcommandstadd_subparsersRt import_modulet ver_majort _find_actionst extensionstmodulet_add_bash_completion_subparser(RRtdo_helpRt subparserstactions_modulet extension((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pytget_subcommand_parsers    cCs?|iddtdt}||id<|id|idS(Ntbash_completionRRtfunc(t add_parserR RRRtdo_bash_completion(RRt subparser((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRs   c Cstd}xdt|DD]}|didd}t||}|ipd} t|dotiti |} |o:| |h| di i d 6| d i i d 67} qx<| D]-} |i | i | i o| i}PqqWq#n| i} t|d g} |i|d | d| dtdt}|idddd d ti||i|s iR Rktt versioneditstartitendt argumentsRRRRs-hs--helpRrt start_versiont end_versions %s.latestR(R tdirRmtgetattrRR4Rtget_substitutionsR tget_function_nameRt get_stringRtmatchesRRRR RRRRRtgetRt APIVersionRtcopytpopR(RRRRRRtattrtcommandtcallbacktdesctsubstversioned_methodt action_helpRRRR]RRtkw((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRsj              cCsH|pdSd}tidtid|tiditidS(Ns1%(levelname)s (%(module)s:%(lineno)d) %(message)stleveltformattiso8601(tloggingt basicConfigtDEBUGt getLoggertsetLeveltWARNING(Rtdebugt streamformat((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pytsetup_debuggings c Ks|idd}|oti|||Sti|d|idd|idd|idd|idd|id|SdS(NRBtusernametuser_idRtuser_domain_idtuser_domain_name(RRRtTokenRR(RRR%R]RB((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyt_get_keystone_auths c&2s |i}d|jo|id}d||d| | | d| d| d|d|d|d|d |id!|d"|d#|d$|d|d%|d&|i0d'|d(|d)|id*|d+|d,|d-||_?|p|i@pt|t i>djoZ|iAtiBtiCp=t&i't(d.htiBiDd/6tiCiDd06qqnt iE|i?|}nt<iF||_|iGd1|iH|d2|}#|#|_I|iJp| o|#iKd3S|#iL|}|iGd4||iM|iNjo|iN|d3S|iM|iOjo|iO|d3S|iptPiQ|iMpt!}ntPiR|iMod}d}nt<i=|| | | d| d| d|d|d|d|d |id!|d"|d#|d$|d|d%|d&|i0d'|d(|d)|id*|d+|d,|d-||_?|otS||i?i<|i?i<_T|o$|i%od5|i%jo t#}$nt"}$iU}%|p iV}n|p iW}n|%oW|oP|oI|%|i?i<_U||i?i<_V||i?i<_Wfd6|i?i<_Xq|$oiY|i?i<_Yqny3tPiR|iMp| p|i?iZqnWnUt&i[j ot&i't(d7n,t&i\j ot&i't(d8nX|iM|i?||i0o!|i]|i/|i?i^ndS(:Ns--endpoint_types--endpoint-typeRs--helps-hsbash-completiontkeystonetinternaltpublictadmintURLskYou must provide a username or user id via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]sYou must provide a project name or project id via --os-project-name, --os-project-id, env[OS_PROJECT_ID] or env[OS_PROJECT_NAME]. You may use os-project and os-tenant interchangeably.sYou must provide an auth url via either --os-auth-url or env[OS_AUTH_URL] or specify an auth_system which defines a default url with --os-auth-system or env[OS_AUTH_SYSTEM]R%RRRRRRBt project_idt project_nametproject_domain_idtproject_domain_namesIYou must provide an auth url via either --os-auth-url or env[OS_AUTH_URL]s2.0RGRvR(R)RR*R+t auth_systemRR,ttimingsRRAthttp_log_debugtcacertttimeoutRtauthsbThe specified version isn't supported by client. The valid version range is '%(min)s' to '%(max)s'tmintmaxt__pre_parse_args__Rit__post_parse_args__RKcsiS((R((thelper(s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyt*ss#Invalid OpenStack Nova credentials.sUnable to authorize user(sinternalspublicR(_RR1tparse_known_argsRRRRRtdiscover_auth_systemstos_compute_api_versionRtget_api_versiont$DEFAULT_MAJOR_OS_COMPUTE_API_VERSIONRxt os_user_idRtos_tenant_namet os_tenant_idR}tos_region_nametos_auth_systemR)RvR*R+R,RRAt os_cacertRt os_auth_tokent load_pluginRtDEFAULT_NOVA_SERVICE_TYPER!R t parse_optstoptsRNROR tanyt os_project_idtos_project_namet get_auth_urlR t record_timettimesRt__exit__t __enter__RRtload_from_cli_optionsRtos_user_domain_idtos_user_domain_nameRKtos_project_domain_idtos_project_domain_nameR tClientRtcst is_latestRtAPI_MIN_VERSIONtAPI_MAX_VERSIONRtdiscover_versiontdiscover_extensionst_run_extension_hooksRRRt print_helpt parse_argsRRRR tget_service_typetisunauthenticatedRt keyring_saverRGRBRCt password_funcRt authenticatet UnauthorizedtAuthorizationFailuret _dump_timingst get_timings(&RtargvRtspotRt args_listRt skip_autht api_versionRxR RKR R R}R RR)RvR*R+R,RRARRtkeystone_sessiont keystone_authRBRCRt must_autht use_sessionRRtsubcommand_parsertuse_pwRG((Rs;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pytmainst    !                                                #                    c CsdtfdY}g}|D]#\}}}|||||q!~}d}x|D]} || i7}qZW|i|d|ti|ddgdddS(NtTymecBseZdZRS(cSs||_||_dS(N(turltseconds(RRBRC((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyREs (RXRYR(((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRADsgtTotalRBRCt sortby_index(tobjectRCtappendR t print_listR( RRRARqRBRRtresultsttotalttyme((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyR3Cs7cOs+x$|iD]}|i|||q WdS(s(Run hooks for all registered extensions.N(Rt run_hooks(Rt hook_typeRR]R((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyR)Os cCst}t}xT|iiD]C\}}|i|x'|iiiD]}|i|qNWq"W|id|idtdi ||BdS(s Prints all of the commands and options to stdout so that the nova.bash_completion script doesn't have to hard code them. sbash-completionRR^N( RnRtitemstaddt _optionalst_option_string_actionsR0tremovetprintR/(Rt_argstcommandstoptionstsc_strtscRs((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRTs      RRs tnargsR#RsDisplay help for .cCsf|ioK|i|ijo|i|iiqbtitd|in|iidS(sL Display help about this program or one of its subcommands. s'%s' is not a valid subcommandN(RRR*RNROR R(RR((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRds (RXRYRRRR RRRRRR@R3R)RR targR(((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRus$   <  &  RcBs#eZddddZdZRS(ii cCs#tt|i||||dS(N(R\RR(RRdtindent_incrementtmax_help_positiontwidth((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRyscCs8d|di|df}tt|i|dS(Ns%s%sii(tupperR\Rt start_section(Rtheading((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyR_~sN(RXRYRRR_(((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyRxs c CsyEg}tidD]}|ti|q~}ti|Wntj oU}ti|ddt d|i i ti |fdti tidn4tj o't ddti tidnXdS(Nitexc_infosERROR (%s): %stfiles... terminating nova clienti(R5R5Rt safe_decodeRuR@t ExceptiontloggerRRSt __class__RXtexception_to_unicodeRcRftKeyboardInterrupt(RqRR5RN((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pyR@s1  t__main__(7Rt __future__RRR7RR5t$keystoneclient.auth.identity.genericRRtkeystoneclient.auth.identityRRtkeystoneclientRRt oslo_utilsRRRR R@RRSRER!t ImportErrorRRtnovaclient.auth_pluginR R RNtnovaclient.extensiontnovaclient.i18nR tnovaclient.openstack.commonR R R RRRRRXReRRFRtArgumentParserR[Rut HelpFormatterRR@(((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/shell.pytsV          '