%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3.9/site-packages/ansible/executor/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3.9/site-packages/ansible/executor/__pycache__/stats.cpython-39.opt-1.pyc

a

�)g��@sBddlmZmZmZeZddlmZddlm	Z	Gdd�d�Z
dS)�)�absolute_import�division�print_function)�MutableMapping)�
merge_hashc@sDeZdZdZdd�Zdd�Zdd�Zdd	�Zddd�Zdd
d�Z	d
S)�AggregateStatsz: holds stats about per-host activity during playbook runs cCs:i|_i|_i|_i|_i|_i|_i|_i|_i|_dS)N)	�	processed�failures�ok�dark�changed�skipped�rescued�ignored�custom)�self�r�:/usr/lib/python3.9/site-packages/ansible/executor/stats.py�__init__szAggregateStats.__init__cCs2d|j|<t||��|d�}|dt||�|<dS)z% helper function to bump a statistic �rN)r�getattr�get)r�what�host�prevrrr�	increment,s
zAggregateStats.incrementcCsVt||�}z,||ddkr$td��||d8<WntyPd||<Yn0dS)NrrzDon't be so negative)r�KeyError)rrrZ_whatrrr�	decrement3s
zAggregateStats.decrementcCs\t|j�|d�|j�|d�|j�|d�|j�|d�|j�|d�|j�|d�|j�|d�d�S)z, return information about a particular host r)r
r	Zunreachablerr
rr)	�dictr
rr	rrr
rr)rrrrr�	summarize=s�zAggregateStats.summarizeNcCs8|durd}||jvr&||i|j|<n||j||<dS)z allow setting of a custom statN�_run)r�r�whichrrrrr�set_custom_statsJs

zAggregateStats.set_custom_statscCs�|durd}||jvs$||j|vr2|�|||�St|t|j||��sNdSt|t�rxt|j|||�|j||<n|j|||7<dS)z# allow aggregation of a custom statNr )rr#�
isinstance�typerrr!rrr�update_custom_statsTs
 z"AggregateStats.update_custom_stats)N)N)
�__name__�
__module__�__qualname__�__doc__rrrrr#r&rrrrrs


rN)Z
__future__rrrr%Z
__metaclass__�collections.abcrZansible.utils.varsrrrrrr�<module>s

Zerion Mini Shell 1.0