%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/modules/sysmod.pyo

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zddl
ZddlZddlZddl
mZddlmZddlmZeje�ZdZdgZd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Z d�Z!dd�Z"dd�Z#dd�Z$dd�Z%d�Z&d�Z'd�Z(d�Z)d�Z*d�Z+d�Z,d�Z-dd�Z.dS( uQ
The sys module provides information about the available functions on the minion
i(tabsolute_importtunicode_literalstprint_functionN(t	strip_rst(tzip(tsixusysu*cC@stS(u
    Return as sys
    (t__virtualname__(((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pyt__virtual__scG@si}|s8xtD]}t|j||<qWt|�Sx�|D]�}t}d|krf|}t}n.|r�|jd�s�|dn|}nd}|r�xntjt|�D]}t|j||<q�Wq?x=tD]5}||ks�|j|�r�t|j||<q�q�Wq?Wt|�S(ui
    Return the docstrings for all modules. Optionally, specify a module or a
    function to narrow the selection.

    The strings are aggregated into a single document on the master for easy
    reading.

    Multiple modules/functions can be specified.

    CLI Example:

    .. code-block:: bash

        salt '*' sys.doc
        salt '*' sys.doc sys
        salt '*' sys.doc sys.doc
        salt '*' sys.doc network.traceroute user.info

    Modules can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.doc 'sys.*'
        salt '*' sys.doc 'sys.list_*'
    u*u.u(	t__salt__t__doc__t
_strip_rsttFalsetTruetendswithtfnmatchtfiltert
startswith(targstdocstfuntmodulet_use_fnmatcht
target_mod((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytdoc&s(


	"
cG@s'tjjt�}i}|s�xx|jD]m}|jd�d}||kr�t|j|d�r�|j|jd||<q�n|j|j||<q(Wt	|�Sxw|D]o}t
}d|kr�|}t}n.|r�|jd�s�|dn|}nd}|r�xt
j|j|�D]^}|jd�d}t|j|d�re|j|jd||<n|j|j||<qWq�x�|jD]�}||ks�|j|�r�|jd�d}||kr�t|j|d�r�|j|jd||<q�n|j|j||<q�q�Wq�Wt	|�S(u�
    Return the docstrings for all states. Optionally, specify a state or a
    function to narrow the selection.

    The strings are aggregated into a single document on the master for easy
    reading.

    Multiple states/functions can be specified.

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.state_doc
        salt '*' sys.state_doc service
        salt '*' sys.state_doc service.running
        salt '*' sys.state_doc service.running ipables.append

    State names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.state_doc 'service.*' 'iptables.*'

    u.iu__globals__u__doc__u*u(tsalttstatetStatet__opts__tstatestsplitthasattrt__globals__R	R
RRR
RRR(Rtst_RRRRRR((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pyt	state_doc^s@

	"cG@s=tjjt�}i}|sPx%|jD]}|j|j||<q(Wt|�Sx�|D]�}t}d|kr~|}t}n.|r�|j	d�s�|dn|}nd}|r�xzt
j|j|�D]}|j|j||<q�WqWxC|jD]8}||ks|j|�r�|j|j||<q�q�WqWWt|�S(u�
    Return the docstrings for all runners. Optionally, specify a runner or a
    function to narrow the selection.

    The strings are aggregated into a single document on the master for easy
    reading.

    Multiple runners/functions can be specified.

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.runner_doc
        salt '*' sys.runner_doc cache
        salt '*' sys.runner_doc cache.grains
        salt '*' sys.runner_doc cache.grains mine.get

    Runner names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.runner_doc 'cache.clear_*'

    u*u.u(
RtrunnertRunnerRt	functionsR	R
RRR
RRR(Rtrun_RRRRR((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pyt
runner_doc�s*

	"cG@sItjjtg�}i}|sMx|D]}||j||<q(Wt|�Sx�|D]�}t}d|kr{|}t}n.|r�|jd�s�|dn|}nd}|r�x�|D]5}||ks�|j	|�r�||j||<q�q�WqTxFt
j|�D]5}||ks#|j	|�r||j||<qqWqTWt|�S(u�
    Return the docstrings for all returners. Optionally, specify a returner or a
    function to narrow the selection.

    The strings are aggregated into a single document on the master for easy
    reading.

    Multiple returners/functions can be specified.

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.returner_doc
        salt '*' sys.returner_doc sqlite3
        salt '*' sys.returner_doc sqlite3.get_fun
        salt '*' sys.returner_doc sqlite3.get_fun etcd.get_fun

    Returner names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.returner_doc 'sqlite3.get_*'

    u*u.u(Rtloadert	returnersRR	R
RRR
RRtiterkeys(Rt
returners_RRRRR((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytreturner_doc�s,


	"
cG@stjjtg�}i}|sVx(tj|�D]}||j||<q1Wt|�Sx�|D]�}d|ks{d|kr�xutj	||�D]}||j||<q�Wq]|d}x:tj|�D])}|j
|�r�||j||<q�q�Wq]Wt|�S(u>
    Return the docstrings for all renderers. Optionally, specify a renderer or a
    function to narrow the selection.

    The strings are aggregated into a single document on the master for easy
    reading.

    Multiple renderers can be specified.

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.renderer_doc
        salt '*' sys.renderer_doc cheetah
        salt '*' sys.renderer_doc jinja json

    Renderer names can be specified as globs.

    .. code-block:: bash

        salt '*' sys.renderer_doc 'c*' 'j*'

    u*u.(RR'trenderRRR)R	R
RRR(Rt
renderers_RtfuncRt	moduledot((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytrenderer_docs


cO@s�|stt�St�}x�|D]�}d|ks>d|krkxdtjt|�D]}|j|�qQWq |d}x-tD]%}|j|�r||j|�q|q|Wq Wt|�S(u"
    List the functions for all modules. Optionally, specify a module or modules
    from which to list.

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_functions
        salt '*' sys.list_functions sys
        salt '*' sys.list_functions sys user

    Function names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.list_functions 'sys.list_*'

    .. versionadded:: ?

    .. code-block:: bash

        salt '*' sys.list_functions 'module.specific_function'

    u*u.(tsortedRtsetRRtaddR(RtkwargstnamesRR.R/((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_functionsHs
	


cG@s�t�}|sDx(tD] }|j|jd�d�qWt|�Sx�|D]�}d|kr�xwtjt|�D] }|j|jd�d�qpWqKx=tD]5}|jd�d}||kr�|j|�q�q�WqKWt|�S(u
    List the modules loaded on the minion

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_modules

    Module names can be specified as globs.

    .. code-block:: bash

        salt '*' sys.list_modules 's*'

    u.iu*(R2RR3RR1RR(RtmodulesR.Rtmod_test((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_modulesys	


!
cC@stS(u�
    Tell the minion to reload the execution modules

    CLI Example:

    .. code-block:: bash

        salt '*' sys.reload_modules
    (R(((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytreload_modules�sucC@stjjjt|�S(uy
    Return the argument specification of functions in Salt execution
    modules.

    CLI Example:

    .. code-block:: bash

        salt '*' sys.argspec pkg.install
        salt '*' sys.argspec sys
        salt '*' sys.argspec

    Module names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.argspec 'pkg.*'

    (RtutilsRtargspec_reportR(R((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytargspec�scC@s+tjjt�}tjjj|j|�S(u�
    Return the argument specification of functions in Salt state
    modules.

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.state_argspec pkg.installed
        salt '*' sys.state_argspec file
        salt '*' sys.state_argspec

    State names can be specified as globs.

    .. code-block:: bash

        salt '*' sys.state_argspec 'pkg.*'

    (RRRRR;RR<R(RR ((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pyt
state_argspec�scC@s+tjjtg�}tjjj||�S(u�
    Return the argument specification of functions in Salt returner
    modules.

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.returner_argspec xmpp
        salt '*' sys.returner_argspec xmpp smtp
        salt '*' sys.returner_argspec

    Returner names can be specified as globs.

    .. code-block:: bash

        salt '*' sys.returner_argspec 'sqlite3.*'

    (RR'R(RR;RR<(RR*((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytreturner_argspec�scC@s+tjjt�}tjjj|j|�S(u�
    Return the argument specification of functions in Salt runner
    modules.

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.runner_argspec state
        salt '*' sys.runner_argspec http
        salt '*' sys.runner_argspec

    Runner names can be specified as globs.

    .. code-block:: bash

        salt '*' sys.runner_argspec 'winrepo.*'
    (RR"R#RR;RR<R$(RR%((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytrunner_argspec�scO@s�tjjt�}|s%t|j�St�}x�|D]�}d|ksSd|kr�xjtj|j|�D]}|j	|�qiWq5|d}x0|jD]%}|j
|�r�|j	|�q�q�Wq5Wt|�S(u�
    List the functions for all state modules. Optionally, specify a state
    module or modules from which to list.

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_state_functions
        salt '*' sys.list_state_functions file
        salt '*' sys.list_state_functions pkg user

    State function names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.list_state_functions 'file.*'
        salt '*' sys.list_state_functions 'file.s*'

    .. versionadded:: ?

    .. code-block:: bash

        salt '*' sys.list_state_functions 'module.specific_function'

    u*u.(RRRRR1RR2RRR3R(RR4R R5RR.R/((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_state_functionss"
	

cG@stjjt�}t�}|six;|jD]0}tjd|�|j|j	d�d�q+Wt
|�Sx�|D]�}d|kr�x}tj|j|�D] }|j|j	d�d�q�Wqpx@|jD]5}|j	d�d}||kr�|j|�q�q�WqpWt
|�S(uE
    List the modules loaded on the minion

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_state_modules

    State module names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.list_state_modules 'mysql_*'

    ufunc %su.iu*(
RRRRR2RtlogtdebugR3RR1RR(RR R7R.RR8((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_state_modulesJs 	

!cG@stjjt�}t�}|sYx+|jD] }|j|jd�d�q+Wt|�Sx�|D]�}d|kr�x}t	j
|j|�D] }|j|jd�d�q�Wq`x@|jD]5}|jd�d}||kr�|j|�q�q�Wq`Wt|�S(u.
    List the runners loaded on the minion

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_runners

    Runner names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.list_runners 'm*'

    u.iu*(RR"R#RR2R$R3RR1RR(RR%trunnersR.RR8((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_runnersts	

!cO@s�tjjt�}|s%t|j�St�}x�|D]�}d|ksSd|kr�xjtj|j|�D]}|j	|�qiWq5|d}x0|jD]%}|j
|�r�|j	|�q�q�Wq5Wt|�S(u

    List the functions for all runner modules. Optionally, specify a runner
    module or modules from which to list.

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_runner_functions
        salt '*' sys.list_runner_functions state
        salt '*' sys.list_runner_functions state virt

    Runner function names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.list_runner_functions 'state.*' 'virt.*'

    u*u.(RR"R#RR1R$R2RRR3R(RR4R%R5RR.R/((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_runner_functions�s
	

cG@stjjtg�}t�}|sbx1tj|�D] }|j|jd�d�q4Wt	|�Sx�|D]�}d|kr�xwt
j||�D] }|j|jd�d�q�Wqix=|D]5}|jd�d}||kr�|j|�q�q�WqiWt	|�S(u6
    List the returners loaded on the minion

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_returners

    Returner names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.list_returners 's*'

    u.iu*(RR'R(RR2RR)R3RR1RR(RR*R(R.RR8((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_returners�s	

!
cO@s�tjjtg�}|s%t|�St�}x�|D]�}d|ksSd|kr�xdtj||�D]}|j|�qfWq5|d}x-|D]%}|j	|�r�|j|�q�q�Wq5Wt|�S(u
    List the functions for all returner modules. Optionally, specify a returner
    module or modules from which to list.

    .. versionadded:: 2014.7.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_returner_functions
        salt '*' sys.list_returner_functions mysql
        salt '*' sys.list_returner_functions mysql etcd

    Returner names can be specified as globs.

    .. versionadded:: 2015.5.0

    .. code-block:: bash

        salt '*' sys.list_returner_functions 'sqlite3.get_*'

    u*u.(
RR'R(RR1R2RRR3R(RR4R*R5RR.R/((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_returner_functions�s
	


cG@s�tjjtg�}t�}|sUx$tj|�D]}|j|�q4Wt|�Sx8|D]0}x't	j
||�D]}|j|�quWq\Wt|�S(u
    List the renderers loaded on the minion

    .. versionadded:: 2015.5.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.list_renderers

    Render names can be specified as globs.

    .. code-block:: bash

        salt '*' sys.list_renderers 'yaml*'

    (RR'R,RR2RR)R3R1RR(RR-t	rendererstrendR((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytlist_renderers!s	

c	C@s�|d}|dpg}|t|�t|� }tt|t|�|��}i|d6|d6}x�|D]�}tjjjdtjjjd|d|dt�tjjj	d|d|dt�tjjj
d|d|dt�tjjjd|d|dt�f�||<qoWx�|D]�\}}tjjjdtjjjd|d|d	|�tjjj	d|d|d	|�tjjj
d|d|d	|�tjjjd|d|d	|�f�||<q Wt|tjjj
f|�j�S(
Nuargsudefaultsutitleudescriptiontitemsttitletdescriptiontrequiredtdefault(tlentlistRRR;tschemat	OneOfItemtBooleanItemRtIntegerItemt
NumberItemt
StringItemttypetSchemat	serialize(	tmodtspecRtdefaultstargs_reqt
args_defaultsttypestitj((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pyt_argspec_to_schemaBs(
 

!!!2!!!2cC@sIt|�}g}x0|j�D]"\}}|jt||��qW|S(u�
    Return a JSON Schema for the given state function(s)

    .. versionadded:: 2016.3.0

    CLI Example:

    .. code-block:: bash

        salt '*' sys.state_schema
        salt '*' sys.state_schema pkg.installed
    (R>RMtappendRe(Rtspecstschemast	state_modt
state_spec((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pytstate_schemags

(/R	t
__future__RRRRtloggingtsalt.loaderRtsalt.runnert
salt.statetsalt.utils.argstsalt.utils.schematsalt.utils.docRR
tsalt.ext.six.movesRtsalt.extRt	getLoggert__name__RBRt__proxyenabled__RRR!R&R+R0R6R9R:R=R>R?R@RARDRFRGRHRIRLReRk(((s7/usr/lib/python2.7/site-packages/salt/modules/sysmod.pyt<module>sH			8	F	:	<	.	1	%		5	*	(	.	)	.	!	%

Zerion Mini Shell 1.0