%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Z	ddl
mZe	je
�Zd�Zdefd��YZdS(u 
Generate roster data, this data is used by non-minion devices which need to be
hit from the master rather than acting as an independent entity. This covers
hitting minions without zeromq in place via an ssh agent, and connecting to
systems that cannot or should not host a minion agent.
i(tabsolute_importtprint_functiontunicode_literalsN(tsixcC@s�d
}|jd�r�|jd�r�|jd�jd�}xH|jd�D]7}tjj||�}tjj|�rL|}PqLqLW|d=n|s6|jd�r�|jd�}q6d|jdi�kr�tjj|ddd�}q6d|krtjj|dd�}q6tjjtjj	d�}ntjj|�s`t
dj|���ntj|tj
�s�t
d	j|���n|S(uH
    Find respective roster file.

    :param options:
    :return:
    u__disable_custom_rosteruroster_fileu/urostersu
config_diru__master_opts__urosteruRoster file "{0}" not founduAccess denied to roster "{0}"N(tNonetgettstriptostpathtjointisfiletsalttsyspathst
CONFIG_DIRtIOErrortformattaccesstR_OK(toptionsttemplatetrostertroster_locationtr_file((s8/usr/lib/python2.7/site-packages/salt/roster/__init__.pytget_roster_files.
tRostercB@s,eZdZdd�Zd�Zd�ZRS(ue
    Used to manage a roster of minions allowing the master to become outwardly
    minion aware
    uflatcC@s�||_t|t�r$||_n0t|tj�rK|jd�|_n	||_|sidg|_ntjj	|j�}tjj
|jd|�}tjj|jd|d|�|_dS(Nu,uflattutilstrunner(
toptst
isinstancetlisttbackendsRtstring_typestsplitRtloaderRRRtrosters(tselfRRRR((s8/usr/lib/python2.7/site-packages/salt/roster/__init__.pyt__init__Cs		cC@sbt�}|jrXx?|jD]4}dj|�}||jkr|j|�qqW|St|�S(u9
        Return a list of loaded roster backends
        u{0}.targets(tsetRRR"taddtsorted(R#tbacktbackendtfun((s8/usr/lib/python2.7/site-packages/salt/roster/__init__.pyt	_gen_backQs		cC@s�i}x�|j�D]�}dj|�}||jkr=qny!|j|j|||��Wqtjjk
r�}tjd|�qt	k
r�}tjd||�qXqWtj
d|�|S(u�
        Return a dict of {'id': {'ipv4': <ipaddr>}} data sets to be used as
        targets given the passed tgt and tgt_type
        u{0}.targetsu Unable to render roster file: %su&Can't access roster for backend %s: %suMatched minions: %s(R+RR"tupdateRt
exceptionstSaltRenderErrortlogterrorRtdebug(R#ttgtttgt_typettargetsR(tf_strtexc((s8/usr/lib/python2.7/site-packages/salt/roster/__init__.pyR4^s!(t__name__t
__module__t__doc__R$R+R4(((s8/usr/lib/python2.7/site-packages/salt/roster/__init__.pyR>s	
(R9t
__future__RRRtsalt.loaderRt
salt.syspathsRtloggingtsalt.extRt	getLoggerR7R/RtobjectR(((s8/usr/lib/python2.7/site-packages/salt/roster/__init__.pyt<module>s	)

Zerion Mini Shell 1.0