%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/plugins/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/plugins/__pycache__/list.cpython-39.pyc

a

�)g�!�@s�ddlmZmZmZeZddlZddlmZddlm	Z
ddlmZddl
mZddlmZmZddlmZdd	lmZdd
lmZmZe�Zddd
�Zdd�Zddd�Zdd�Zddd�Zd dd�Zd!dd�Z d"dd�Z!d#dd�Z"dS)$�)�absolute_import�division�print_functionN)�context)�	constants)�list_collections)�AnsibleError)�	to_native�to_bytes)�loader)�Display)�_get_collection_path�AnsibleCollectionRef)Z
async_wrapper)�base)�module�cachecCs�|}d|vr|}n4|dkr(|�d�r(d}d�|�|�d��dd��}|g}|rp|�|�tjj�|dd��|�t|��d�|�S)N�.�ansible.legacyzansible.builtin.�ansible.builtin����)	�
startswith�join�split�extend�os�path�sep�appendr	)�
collection�namer�depthZresolved_collection�
resource_nameZ	composite�r#�8/usr/lib/python3.9/site-packages/ansible/plugins/list.py�get_composite_names r%cCs*i}|D�]}t�d�|||��t|�}tj�|��d�r>qtj�|��rtj�	|��r|�
�}t�|�D�]�}|�d�r~qlt�d�|��tj�|�\}	}
t
|	�}tj�||�}tj�	|��r|tjvr�tj�tj�|d��s�ql|�t|t
|�g||dd��qlt|tjvt
|
�tjv|
dv|t�|d�vtj�|�g��rDql|d	v�r�zt||||�}
WnHt�y�}z.t�d
|t
|�f�WYd}~qlWYd}~n
d}~00|
D]*}t||jtj�t
|��|�}|||<�q�qlt||tj�t
|��|�}|||<qlnt�d�|��qt�d�|��q|S)
Nz&Searching '{0}'s '{1}' for {2} plugins)�.s__zFound possible plugin: '{0}'s__init__.pyr)r!)s.ymls.yamls.jsonr#)�test�filterzSkipping file %s: %sz6Skip listing plugins in '{0}' as it is not a directoryz2Skip listing plugins in '{0}' as it does not exist)�display�debug�formatr
rr�basenamer�exists�isdir�lower�listdir�splitextr	r�CZSYNTHETIC_COLLECTIONS�update�_list_plugins_from_paths�anyZIGNORE_FILESZREJECT_EXTS�IGNORE�get�islink�_list_j2_plugins_from_file�KeyErrorZwarningr%�ansible_name�dirname)�ptype�dirsrr!�pluginsr�b_pathZbkeyZplugin_fileZb_pluginZb_ext�plugin�	full_path�file_plugins�e�plugin_namer#r#r$r4.sV


"
�
"r4cCs"ttd�|��}|�|||�}|S)N�
{0}_loader)�getattrrr+Zget_contained_plugins)rZplugin_pathr=rE�ploaderrCr#r#r$r9psr9c
Cs�i}zttd�|��}Wn ty8td�|���Yn0|��D]�}|dkrbdd�|��D�}nf|dkr�dd�|��D�}tj�	dd�r�|�
tjd�n,ttj
�	||��}ttj�||d	|��g}|�t|||��qB|d
v�r|��D]}||df||<q�n�t|���D]r}d}	z|j	|dd�}	WnDt�yp}
z*t�d
�||||t|
���WYd}
~
n
d}
~
00|||	f||<�q|S)NrFz8Cannot list plugins, incorrect plugin type supplied: {0}rcSsg|]}|jr|j�qSr#�Zinternalr��.0�dr#r#r$�
<listcomp>��z+list_collection_plugins.<locals>.<listcomp>rcSsg|]}|js|j�qSr#rIrJr#r#r$rM�rNZmodule_pathsplugins)rT)Z
class_onlyz8The '{0}' {1} plugin could not be loaded from '{2}': {3})rGrr+�AttributeErrorr�keysZ_get_paths_with_contextrZCLIARGSr7rr
r2ZCOLLECTION_PTYPE_COMPATr	rrrr3r4�list�	Exceptionr)Zvvv)r=�collections�search_pathsr?rHrr>Zb_ptyperAZpobjrDr#r#r$�list_collection_pluginsws4
4rUc
Cs�i}i}|dur4d|d<d|d<|�t|dd��nl|dkrNd||<d|d<nRztt|��||<Wn<ty�}z$td�|t|��|d��WYd}~n
d}~00|r�|�t||��|S)NrNrrT)rTZdedupez'Cannot use supplied collection {0}: {1})Zorig_exc)	r3rr
r
�
ValueErrorrr+r	rU)r=rrTr?rSrDr#r#r$�list_plugins�s 
.rWcCsdd�t||�D�S)NcSsg|]
}|j�qSr#)r;)rKrAr#r#r$rM�rNz%list_plugin_names.<locals>.<listcomp>)rW�r=rr#r#r$�list_plugin_names�srYcs t||���fdd����D�S)Ncsg|]}�|d�qS)rr#�rK�k�r?r#r$rM�rNz%list_plugin_files.<locals>.<listcomp>�rWrPrXr#r\r$�list_plugin_files�s
r^cs t||���fdd����D�S)Ncsg|]}�|d�qS)rr#rZr\r#r$rM�rNz'list_plugin_classes.<locals>.<listcomp>r]rXr#r\r$�list_plugin_classes�s
r_)r)N)NN)N)N)N)#Z
__future__rrr�typeZ
__metaclass__rZansiblerrr2Zansible.collections.listrZansible.errorsrZansible.module_utils._textr	r
Zansible.pluginsrZansible.utils.displayrZ2ansible.utils.collection_loader._collection_finderr
rr)r6r%r4r9rUrWrYr^r_r#r#r#r$�<module>s,�
B
5




Zerion Mini Shell 1.0