/usr/lib/python2.6/site-packages/oslo_config
NameSizeModeActions
tests/-0755rm
cfg.py925640644editdlrm
cfg.pyc1015810644editdlrm
cfgfilter.py131730644editdlrm
cfgfilter.pyc148280644editdlrm
fixture.py77740644editdlrm
fixture.pyc78200644editdlrm
generator.py94890644editdlrm
generator.pyc94660644editdlrm
iniparser.py42070644editdlrm
iniparser.pyc48450644editdlrm
sphinxconfiggen.py23250644editdlrm
sphinxconfiggen.pyc19270644editdlrm
sphinxext.py52990644editdlrm
sphinxext.pyc59560644editdlrm
types.py125930644editdlrm
types.pyc149540644editdlrm
version.py6590644editdlrm
version.pyc2650644editdlrm
_list_opts.py8760644editdlrm
_list_opts.pyc5830644editdlrm
__init__.py00644editdlrm
__init__.pyc1440644editdlrm
Edit: /usr/lib/python2.6/site-packages/oslo_config/generator.pyc (9466B)
Ñò yDVc@s&dZddkZddkZddkZddkZddkZddkZddklZddk Z ei e ƒZ eidddƒeiddd dd ƒeid dd ƒgZd „Zd„Zdefd„ƒYZd„Zd„Zd„Zdd„Ze djo eƒndS(sSample configuration generator Tool for generating a sample configuration file. See ../doc/source/generator.rst for details. iÿÿÿÿN(tcfgs output-filethelps1Path of the file to write to. Defaults to stdout.s wrap-widthtdefaultiFs!The maximum length of help lines.t namespacesHOption namespace under "oslo.config.opts" in which to query for options.cCs|itƒdS(s Register the formatter's CLI options with a ConfigOpts instance. Note, this must be done before the ConfigOpts instance is called to parse the configuration. :param conf: a ConfigOpts instance :raises: DuplicateOptError, ArgsAlreadyParsedError N(tregister_cli_optst_generator_opts(tconf((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyR2s cCst|tiƒoA|id j o |i}qÖ|ip dg}qÖ|i}nƒ|id j ot|iƒ}nW|id jo d}n=t|tiƒo |i}nt|tiƒot|iƒi ƒ}nñt|ti ƒpt|ti ƒot|iƒ}n¸t|ti ƒodi |iƒ}nt|tiƒoVt|iiƒdtidƒƒ}di g}|D]}|d|q‡~ƒ}n&tidt|ƒƒt|iƒ}|g}g}x<|D]4}|iƒ|jod|}n|i|ƒqãW|S( s*Return a list of formatted default values.tst,tkeyis%s:%ssUnknown option type: %ss"%s"N(t isinstanceRt MultiStrOpttsample_defaulttNoneRtstrtStrOpttBoolOpttlowertIntOpttFloatOpttListOpttjointDictOpttsortedtitemstoperatort itemgettertLOGtwarningtreprtstriptappend(topttdefaultst default_strt sorted_itemst_[1]titresults((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyt_format_defaults>sB      2 t _OptFormattercBs–eZdZhdei6dei6dei6dei6dei6dei 6dei 6Z ddd „Z d „Zd „Zd „Zd „Zd„ZRS(s3Format configuration option descriptions to a file.s string values boolean values integer valuesfloating point values list values dict values multi valuediFcCs |pti|_||_dS(sªConstruct an OptFormatter object. :param output_file: a writeable file object :param wrap_width: The maximum length of help lines, 0 to not wrap N(tsyststdoutt output_filet wrap_width(tselfR+R,((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyt__init__tsc Cs½|id j o˜|idjoˆd}xr|iƒD]d}diti||idddddtdtƒƒ}||djod n|7}|d7}q3W|g}nd|dg}|S( syFormat the help for a group or option to the output file. :param help_text: The text of the help string iRs tinitial_indents# tsubsequent_indenttbreak_long_wordstreplace_whitespacet#N(R,R t splitlinesRttextwraptwraptFalse(R-t help_texttwrappedtlinettexttlines((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyt _format_help}s    cCs1|djodS|djodSti|ƒS(NsRs''(R tsixt text_type(R-tchoice((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyt_get_choice_text‘s   c Csö|iptid|iƒn|iit|ƒdƒ}|iod|i|f}n d|}|i|ƒ}t|iddƒo|i d|ii ƒnt|iddƒo|i d|ii ƒnt|id dƒoNd i g}|iiD]}||i|ƒq~ƒ}|i d |ƒnx?|iD]4}|i d |ipd |ip|ifƒqFW|io|i dƒnt|ƒ} x=| D]5} | od| } n|i d|i| fƒq¬W|i|ƒdS(sfFormat a description of an option to the output file. :param opt: a cfg.Opt instance s"%s" is missing a help strings unknown typeu%s (%s)u(%s)tmins# Minimum value: %d tmaxs# Maximum value: %d tchoicess, s# Allowed values: %s s"# Deprecated group/name - [%s]/%s tDEFAULTs\# This option is deprecated for removal. # Its value may be silently ignored in the future. t s#%s =%s N(RRRtdestt_TYPE_DESCRIPTIONStgetttypeR=tgetattrR RRBRCRRDRAtdeprecated_optstgrouptnametdeprecated_for_removalR't writelines( R-R topt_typeR8R<R$R@t choices_texttdR!R"((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pytformat˜s<     ,  )   cCs|ii|ƒdS(s]Write an arbitrary string to the output file. :param s: an arbitrary string N(R+twrite(R-ts((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyRUÅscCs|ii|ƒdS(srWrite an arbitrary sequence of strings to the output file. :param l: a list of arbitrary strings N(R+RP(R-tl((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyRPÌsN(t__name__t __module__t__doc__RRRRRRRR RHR R.R=RARTRURP(((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyR(fs          - cCsOtiidd|dtdtƒ}g}|D]}||i|ifq/~S(sÐList the options available via the given namespaces. :param namespaces: a list of namespaces registered under 'oslo.config.opts' :returns: a list of (namespace, [(group, [opt_1, opt_2])]) tuples soslo.config.optstnameston_load_failure_callbacktinvoke_on_load(t stevedoretnamedtNamedExtensionManagerR\tTrueRNtobj(t namespacestmgrR$tep((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyt _list_optsÔs   cOs‚dS(N((targstkwargs((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyR\âsc Cs>|itƒ|iot|idƒnti}td|d|iƒ}hgd6}xnt|i ƒD]]\}}xN|D]F\}}|pq{n|i |pdgƒ}|i ||fƒq{WqhWd„} | |d|i dƒƒxLt |iƒdtidƒƒD])\}}|idƒ| |||ƒq Wd S( sGenerate a sample config file. List all of the options available via the namespaces specified in the given configuration and write a description of them to the specified output file. :param conf: a ConfigOpts instance containing the generator's configuration twR+R,REcSs£t|tiƒo |i}n|}|id|ƒxet|dtidƒƒD]H\}}|id|ƒx(|D] }|idƒ|i|ƒqwWqSWdS(Ns[%s] R is # # From %s # s ( R RtOptGroupRNRURRRRT(tfRMRct group_nameRtoptsR ((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyt _output_optsþs    R is N(t register_optsRR+topenR)R*R(R,RfRt setdefaultRtpopRRRRRU( RR+t formattertgroupsRtlistingRMRmRcRn((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pytgenerateæs( &        cCsYtidƒi}tidtiƒtiƒ}t|ƒ||d|ƒt |ƒdS(s+The main function of oslo-config-generator.s oslo.configtleveltversionN( t pkg_resourcestget_distributionRxtloggingt basicConfigtWARNRt ConfigOptsRRv(RgRxR((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pytmains   t__main__(RZR{RR)R5RyR>t oslo_configRtstevedore.namedR^t getLoggerRXRRRR RRR'tobjectR(RfR\RvR R(((s:/tmp/pip-build-lt8jXN/oslo.config/oslo_config/generator.pyts2            (n   .