%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s+dZddlmZmZmZddlZddlZddlZddl	Zddl
ZddlZddlZddl
ZddlZddlZddlZddlmZdefd��YZgejedejr�ejnd�D]-\ZZedkpejd	�s�e^q�ZdS(
u
Make api awesomeness
i(tabsolute_importtprint_functiontunicode_literalsN(tsixtNetapiClientcB@s�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d
ed	�Z
d
�Zd�Zd�ZRS(u'
    Provide a uniform method of accessing the various client interfaces in Salt
    in the form of low-data data structures. For example:

    >>> client = NetapiClient(__opts__)
    >>> lowstate = {'client': 'local', 'tgt': '*', 'fun': 'test.ping', 'arg': ''}
    >>> client.run(lowstate)
    cC@s
||_dS(N(topts(tselfR((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyt__init__#scC@s^tjjj�rtS|jddkr2d}nd}tjjtjj	|jd|��S(u�
        Perform a lightweight check to see if the master daemon is running

        Note, this will return an invalid success if the master crashed or was
        not shut down cleanly.
        u	transportutcpupublish_pull.ipcuworkers.ipcusock_dir(
tsalttutilstplatformt
is_windowstTrueRtostpathtexiststjoin(Rtipc_file((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyt_is_master_running&s		
cC@s|j�s!tjjd��n|jd�tkr]tjjdj|jd����nd|kprd|ks�tjjd��n|jd�r�|j	jd�r�tjjd	��nt
||d�}tjjj
||�}||jd
d�|jdi��S(
uh
        Execute the specified function in the specified client by passing the
        lowstate
        uSalt Master is not available.uclientuInvalid client specified: '{0}'utokenueauthu#No authentication credentials givenu	raw_shellunetapi_allow_raw_shelluRaw shell option not allowed.uargsukwargs((RRt
exceptionstSaltDaemonNotRunningtgettCLIENTStSaltInvocationErrortformattEauthAuthenticationErrorRtgetattrR	targstformat_call(Rtlowtl_funtf_call((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pytrun:s 				cO@s(tjjd|j�}|j||�S(u�
        Run :ref:`execution modules <all-salt.modules>` asynchronously

        Wraps :py:meth:`salt.client.LocalClient.run_job`.

        :return: job ID
        tmopts(Rtclienttget_local_clientRtrun_job(RRtkwargstlocal((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pytlocal_asyncWscO@s(tjjd|j�}|j||�S(u
        Run :ref:`execution modules <all-salt.modules>` synchronously

        See :py:meth:`salt.client.LocalClient.cmd` for all available
        parameters.

        Sends a command from the master to the targeted minions. This is the
        same interface that Salt's own CLI uses. Note the ``arg`` and ``kwarg``
        parameters are sent down to the minion(s) and the given function,
        ``fun``, is called with those parameters.

        :return: Returns the result from the execution module
        R!(RR"R#Rtcmd(RRR%R&((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyR&bscO@s(tjjd|j�}|j||�S(u�
        Run :ref:`execution modules <all-salt.modules>` against subsets of minions

        .. versionadded:: 2016.3.0

        Wraps :py:meth:`salt.client.LocalClient.cmd_subset`
        R!(RR"R#Rt
cmd_subset(RRR%R&((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pytlocal_subsetsscO@s(tjjd|j�}|j||�S(u
        Run :ref:`execution modules <all-salt.modules>` against batches of minions

        .. versionadded:: 0.8.4

        Wraps :py:meth:`salt.client.LocalClient.cmd_batch`

        :return: Returns the result from the exeuction module for each batch of
            returns
        R!(RR"R#Rt	cmd_batch(RRR%R&((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pytlocal_batch~scO@s1tjjjjd|jdt�}|j|�S(u�
        Run salt-ssh commands synchronously

        Wraps :py:meth:`salt.client.ssh.client.SSHClient.cmd_sync`.

        :return: Returns the result from the salt-ssh command
        R!tdisable_custom_roster(RR"tssht	SSHClientRRtcmd_sync(RRR%t
ssh_client((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyR.�s	cK@s8||d<tjj|j�}|j|d|d|�S(u<
        Run `runner modules <all-salt.runners>` synchronously

        Wraps :py:meth:`salt.runner.RunnerClient.cmd_sync`.

        Note that runner functions must be called using keyword arguments.
        Positional arguments are not supported.

        :return: Returns the result from the runner module
        ufunttimeouttfull_return(RtrunnertRunnerClientRR0(RtfunR2R3R%R4((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyR4�s
cK@s,||d<tjj|j�}|j|�S(uG
        Run `runner modules <all-salt.runners>` asynchronously

        Wraps :py:meth:`salt.runner.RunnerClient.cmd_async`.

        Note that runner functions must be called using keyword arguments.
        Positional arguments are not supported.

        :return: event data and a job ID for the executed function.
        ufun(RR4R5Rt	cmd_async(RR6R%R4((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pytrunner_async�s
cK@s,||d<tjj|j�}|j|�S(u=
        Run :ref:`wheel modules <all-salt.wheel>` synchronously

        Wraps :py:meth:`salt.wheel.WheelClient.master_call`.

        Note that wheel functions must be called using keyword arguments.
        Positional arguments are not supported.

        :return: Returns the result from the wheel module
        ufun(RtwheeltWheelClientRR0(RR6R%R9((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyR9�s
cK@s,||d<tjj|j�}|j|�S(u>
        Run :ref:`wheel modules <all-salt.wheel>` asynchronously

        Wraps :py:meth:`salt.wheel.WheelClient.master_call`.

        Note that wheel functions must be called using keyword arguments.
        Positional arguments are not supported.

        :return: Returns the result from the wheel module
        ufun(RR9R:RR7(RR6R%R9((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pytwheel_async�s
N(t__name__t
__module__t__doc__RRR R'R&R*R,R.tNonetFalseR4R8R9R;(((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyRs										t	predicateurunu_(R>t
__future__RRRtinspectR
tsalt.logRtsalt.clienttsalt.configtsalt.runnert
salt.syspathst
salt.wheeltsalt.utils.argstsalt.client.ssh.clienttsalt.exceptionstsalt.extRtobjectRt
getmemberstPY2tismethodR?tnamet_t
startswithR(((s8/usr/lib/python2.7/site-packages/salt/netapi/__init__.pyt<module>s"�1

Zerion Mini Shell 1.0