%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s�dZddlmZmZmZddlZddlZeje	�Z
d�Zdde
d�Zd�Zdd�Zddd�Zddd	�ZdS(
uB
Support for eselect, Gentoo's configuration and management tool.
i(tabsolute_importtprint_functiontunicode_literalsNcC@s3tddkr)tjjjd�r)dStdfS(u<
    Only work on Gentoo systems with eselect installed
    uosuGentooueselectuxThe eselect execution module cannot be loaded: either the system is not Gentoo or the eselect binary is not in the path.(t
__grains__tsalttutilstpathtwhichtFalse(((s8/usr/lib/python2.7/site-packages/salt/modules/eselect.pyt__virtual__s%cC@s�tddj||pd||p%d�dt�}|j�jd�}|djd�r`tS|rjtSt|�dkr�tSt|�dkr�|dj�r�tS|S(	uM
    Execute an arbitrary action on a module.

    module
        name of the module to be executed

    action
        name of the module's action to be run

    module_parameter
        additional params passed to the defined module

    action_parameter
        additional params passed to the defined action

    state_only
        don't return any output but only the success/failure of the operation

    CLI Example (updating the ``php`` implementation used for ``apache2``):

    .. code-block:: bash

        salt '*' eselect.exec_action php update action_parameter='apache2'
    ucmd.runu+eselect --brief --colour=no {0} {1} {2} {3}utpython_shellu
iu	!!! Errori(t__salt__tformatRtstriptsplitt
startswithtTruetlen(tmoduletactiontmodule_parametertaction_parametert
state_onlytout((s8/usr/lib/python2.7/site-packages/salt/modules/eselect.pytexec_actions	#cC@sVg}tdddd�}|s%dSx*|D]"}|d	kr,|j|�q,q,W|S(
u
    List available ``eselect`` modules.

    CLI Example:

    .. code-block:: bash

        salt '*' eselect.get_modules
    umodulesulistRu--only-namesuhelpuusageuversionN(uhelpuusageuversion(RtNonetappend(tmodulestmodule_listR((s8/usr/lib/python2.7/site-packages/salt/modules/eselect.pytget_modulesHs

cC@sjt|dd|�}|sdSg}t|t�rfx+|D]#}|j|jdd�d�q;W|SdS(uJ
    List available targets for the given module.

    module
        name of the module to be queried for its targets

    action_parameter
        additional params passed to the defined action

        .. versionadded:: 2016.11.0

    CLI Example:

    .. code-block:: bash

        salt '*' eselect.get_target_list kernel
    ulistRiiN(RRt
isinstancetlistRR(RRtexec_outputttarget_listtitem((s8/usr/lib/python2.7/site-packages/salt/modules/eselect.pytget_target_list]s
!cC@s=t|dd|d|�d}|s)dS|dkr9dS|S(uT
    Get the currently selected target for the given module.

    module
        name of the module to be queried for its current target

    module_parameter
        additional params passed to the defined module

    action_parameter
        additional params passed to the 'show' action

    CLI Example (current target of system-wide ``java-vm``):

    .. code-block:: bash

        salt '*' eselect.get_current_target java-vm action_parameter='system'

    CLI Example (current target of ``kernel`` symlink):

    .. code-block:: bash

        salt '*' eselect.get_current_target kernel
    ushowRRiu(unset)N(RR(RRRtresult((s8/usr/lib/python2.7/site-packages/salt/modules/eselect.pytget_current_target|sc	C@sy|rdj||�}n|}|t�krJtjdj|��tSt|dd|d|dt�}|ru|StS(u�
    Set the target for the given module.
    Target can be specified by index or name.

    module
        name of the module for which a target should be set

    target
        name of the target to be set for this module

    module_parameter
        additional params passed to the defined module

    action_parameter
        additional params passed to the defined action

    CLI Example (setting target of system-wide ``java-vm``):

    .. code-block:: bash

        salt '*' eselect.set_target java-vm icedtea-bin-7 action_parameter='system'

    CLI Example (setting target of ``kernel`` symlink):

    .. code-block:: bash

        salt '*' eselect.set_target kernel linux-3.17.5-gentoo
    u{0} {1}uModule {0} not availableusetRRR(RRtlogterrorRRR(RttargetRRtexec_result((s8/usr/lib/python2.7/site-packages/salt/modules/eselect.pyt
set_target�s!(t__doc__t
__future__RRRtloggingtsalt.utils.pathRt	getLoggert__name__R&R	RRRRR#R%R*(((s8/usr/lib/python2.7/site-packages/salt/modules/eselect.pyt<module>s		/	#

Zerion Mini Shell 1.0