%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/report/plugins/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/docker.cpython-312.pyc

�

i��d��r�ddlmZmZmZmZmZmZmZGd�dee�ZGd�dee�Z	Gd�deee�Z
y)	�)�Plugin�RedHatPlugin�UbuntuPlugin�SoSPredicate�	CosPlugin�	PluginOpt�DebianPluginc�d�eZdZdZdZdZeddd��eddd	��ed
dd��gZd�Zd
�Z	y)�DockerzDocker containers�docker)�	container�allFz0collect for all containers, even terminated ones)�default�desc�logsz)collect stdout/stderr logs for containers�sizez!collect image sizes for docker psc��|jddg�|jgd��|jd��|jd�|j	t|dg���gd�}|D]}|jd	|z��|jd
d��|jd
d��|jdd��|j
d�r&|jdd��|jdd��|jd�}|ddk(rP|dj�ddD�cgc]}|j�d��c}}|D]}|jd|z��|jd|j
d���D�cgc]}|d��	}}|jd��}|jd��}	|D]@}
|jd|
zd �!�|j
d"�s�+|jd#|
zd �!��B|D]&}|\}}
d$|vr|n|
}|jd|zd%d&�'��(|	D]}|jd(|zd)�!��ycc}wcc}w)*Nz/etc/docker/daemon.jsonz/var/lib/docker/repositories-*)�
HTTP_PROXY�HTTPS_PROXY�NO_PROXY�	ALL_PROXY�DOCKER_BUILD_PROXY�DOCKER_RUN_PROXYr)�unitszls -alhR /etc/docker)�services)zevents --since 24h --until 1s�pszstats --no-stream�versionz	volume lsz	docker %szdocker info�docker_info)�tagsz
docker images�
docker_imageszdocker ps -a�docker_list_containersrz
docker ps -as�d)�priorityzdocker system dfzdocker network ls�statusr�output�zdocker network inspect %sr)�runtime�get_all)r'zdocker inspect %s�
containers)�subdirrzdocker logs -t %s�none�images�docker_image_inspect)r*rzdocker volume inspect %s�volumes)
�
add_copy_spec�add_env_var�add_journal�add_cmd_output�set_cmd_predicater�
get_option�collect_cmd_output�
splitlines�split�get_containers�get_container_images�get_container_volumes)�self�subcmds�subcmd�nets�n�net�cr)r,r.r
�img�name�img_id�insp�vols                �;/usr/lib/python3/dist-packages/sos/report/plugins/docker.py�setupzDocker.setups������%�,�
�	�
	
���
�	�	
���x��(����2�3����|�D�H�:�F�G�
���	6�F�����f� 4�5�	6�	
���M�!.�	�	0����O�!0�	�	2����N�!9�	�	;��?�?�6�"�����#��>���� 2�S��A��&�&�':�;����>�Q��'+�H�~�'@�'@�'B�1�2�'F�G�!�����1��G�A��
G���#�#�$?�#�$E�F�
G��-�-�h�6:�o�o�e�6L�.�N�
��A�a�D�
�
�
��*�*�8�*�<���,�,�X�,�>��#�	9�I���� 3�i� ?�'3�
 �
5����v�&��#�#�$7�)�$C�+7�$�9�		9��	=�C��L�D�&�!��-�4�6�D���� 3�d� :�8�%;�
 �
=�	=��	2�C���� :�S� @�'0�
 �
2�	2��1H��
s�'I�Ic�.�d}|jd|d�y)Nz=(?P<var>(pass|key|secret|PASS|KEY|SECRET).*?)=(?P<value>.*?)"z	*inspect*z\g<var>=********")�do_cmd_output_sub)r;�
env_regexps  rG�postproczDocker.postprocis��(�
����{�J�3�	5�N)
�__name__�
__module__�__qualname__�
short_desc�plugin_name�profilesr�option_listrHrL�rMrGrrsU��$�J��K��H�	�%��I�	K��&�%�B�	D��&�%�:�	<��K�H2�T5rMrc�"��eZdZdZ�fd�Z�xZS)�RedHatDocker)rz
docker-latestz	docker-io�
docker-engine�	docker-ce�	docker-eec�P��tt|��|jddg�y)Nz!/etc/udev/rules.d/80-docker.rulesz/etc/containers/)�superrWrHr/�r;�	__class__s �rGrHzRedHatDocker.setup�s)���
�l�D�'�)����/��
�	rM�rNrOrP�packagesrH�
__classcell__�r^s@rGrWrW{s���*�H��rMrWc�"��eZdZdZ�fd�Z�xZS)�UbuntuDocker)z	docker.iorXrYrZc�P��tt|��|jddg�y)Nz/etc/default/dockerz//run/docker/libcontainerd/containerd/events.log)r\rdrHr/r]s �rGrHzUbuntuDocker.setup�s)���
�l�D�'�)����!�=�
�	rMr_rbs@rGrdrd�s���G�H��rMrdN)�sos.report.pluginsrrrrrrr	rrWrdrUrMrG�<module>rgsC��.�.�.�
h5�V�Y�h5�V�6�<��	�6�<��	rM

Zerion Mini Shell 1.0