%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/wheel/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/wheel/__init__.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zddl
ZddlZddlZddl
mZdejjjejjjefd��YZeZdS(u+
Modules used to control the master itself
i(tabsolute_importtprint_functiontunicode_literalsN(tsixtWheelClientcB@sheZdZdZdZdd�Zd�Zd�Zde	d�Z
d�Zdddee	d�Z
RS(	u�
    An interface to Salt's wheel modules

    :ref:`Wheel modules <all-salt.wheel>` interact with various parts of the
    Salt Master.

    Importing and using ``WheelClient`` must be done on the same machine as the
    Salt Master and it must be done using the same user that the Salt Master is
    running as. Unless :conf_master:`external_auth` is configured and the user
    is authorized to execute wheel functions: (``@wheel``).

    Usage:

    .. code-block:: python

        import salt.config
        import salt.wheel
        opts = salt.config.master_config('/etc/salt/master')
        wheel = salt.wheel.WheelClient(opts)
    uwheelcC@s4||_i|_tjj|d|j�|_dS(Ntcontext(toptsRtsalttloadertwheelst	functions(tselfR((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pyt__init__/s		c	K@s4|j||d|jdt�d|jdt��S(u)
        Backwards compatibility
        tprint_eventuprint_eventtfull_returnufull_return(tlowtgettTruetFalse(Rtfuntkwargs((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pyt	call_func5scK@s�|}d|d<|jd}|dkr2d}ndjtjjj|�tj|jd��}tjj	j
j|jdd	d
|dd�}z|j|�}Wd
|j
�Xt|tj�r�d|kr�tjjj|d�q�n|S(uX
        Execute a wheel function through the master network interface (eauth).
        uwheelucmdu	interfaceu0.0.0.0u	127.0.0.1utcp://{}:{}uret_porttcryptucleart
master_uritusageumaster_callNuerror(RtformatRtutilstzeromqt
ip_bracketRt	text_typet	transporttclientt
ReqChanneltfactorytsendtcloset
isinstancetcollectionstMappingterrortraise_error(RRtloadt	interfaceRtchanneltret((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pytmaster_call=s&

		cC@s
|j|�S(u3
        Execute a wheel function synchronously; eauth is respected

        This function requires that :conf_master:`external_auth` is configured
        and the user is authorized to execute runner functions: (``@wheel``).

        .. code-block:: python

            >>> wheel.cmd_sync({
            'fun': 'key.finger',
            'match': 'jerry',
            'eauth': 'auto',
            'username': 'saltdev',
            'password': 'saltdev',
            })
            {'minions': {'jerry': '5d:f6:79:43:5e:d4:42:3f:57:b8:45:a8:7e:a4:6e:ca'}}
        (R-(RRttimeoutR((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pytcmd_syncWscC@s|jd�}|j||�S(u
        Execute a function asynchronously; eauth is respected

        This function requires that :conf_master:`external_auth` is configured
        and the user is authorized

        .. code-block:: python

            >>> wheel.cmd_async({
                'fun': 'key.finger',
                'match': 'jerry',
                'eauth': 'auto',
                'username': 'saltdev',
                'password': 'saltdev',
            })
            {'jid': '20131219224744416681', 'tag': 'salt/wheel/20131219224744416681'}
        ufun(tpoptasynchronous(RRR((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pyt	cmd_asyncmscC@s%tt|�j||||||�S(u�
        Execute a function

        .. code-block:: python

            >>> wheel.cmd('key.finger', ['jerry'])
            {'minions': {'jerry': '5d:f6:79:43:5e:d4:42:3f:57:b8:45:a8:7e:a4:6e:ca'}}
        (tsuperRtcmd(RRtargtpub_datatkwargR
R((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pyR4�s	N(t__name__t
__module__t__doc__Rt
tag_prefixtNoneRRR-RR/R2RR4(((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pyRs			(R:t
__future__RRRR%tsalt.client.mixinsRtsalt.configtsalt.loadertsalt.utils.errortsalt.utils.zeromqtsalt.transport.clienttsalt.extRRtmixinstSyncClientMixintAsyncClientMixintobjectRtWheel(((s7/usr/lib/python2.7/site-packages/salt/wheel/__init__.pyt<module>s|

Zerion Mini Shell 1.0