NineSec Team Shell
Server IP : 184.107.3.203  /  Your IP : 216.73.216.51
Web Server : Apache
System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64
User : adminteladeoro ( 1015)
PHP Version : 8.2.28
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/podman.cpython-36.opt-1.pyc
3

~�g��@s0ddlmZmZmZmZGdd�deee�ZdS)�)�Plugin�RedHatPlugin�UbuntuPlugin�	PluginOptc@s\eZdZdZdZdZdZdZeddddd	�ed
dddd	�ed
ddd�gZ	dd�Z
dd�ZdS)�Podmana<Podman is a daemonless container management engine, and this plugin is
    meant to provide diagnostic information for both the engine and the
    containers that podman is managing.

    General status information will be collected from podman commands, while
    detailed inspections of certain components will provide more insight
    into specific container problems. This detailed inspection is provided for
    containers, images, networks, and volumes. Per-entity inspections will be
    recorded in subdirs within sos_commands/podman/ for each of those types.
    zPodman containers�podman�	container�allFz0collect for all containers, even terminated onesz�Enable collection for all containers that exist on the system regardless of their running state. This may cause a significant increase in sos archive size, especially when combined with the 'logs' option.)�default�descZ	long_desc�logsz)collect stdout/stderr logs for containersz�Capture 'podman logs' output for discovered containers. This may be useful or not depending on how/if the container produces stdout/stderr output. Use cautiously when also using the 'all' option.�sizez!collect image sizes for podman ps)r
rcCs�|jddddg�|jddd��dd	d
ddd
dddddg}|jdd�|D��|jd�rh|jddd�|jddgdd�|jddd�}|d d!kr�d"d�|d#j�d$d�D�}|jd%d�|D�d&d'd(�d)d�|jd*|jd+�d,�D�}|jd*d-�}|j	d*d-�}x$|D]}|jd.|��d/d0d(��qWxT|D]L}|\}	}
d1|	k�rH|	n|
}|jd.|��d
d2d(�|jd3|��d4d5d(��q.Wx$|D]}|jd6|��d7d8d(��q�W|jd9��r�x$|D]}
|jd:|
��d/d;d<��q�WdS)=NZ
HTTP_PROXYZHTTPS_PROXYZNO_PROXYZ	ALL_PROXYZpodman_list_imagesZpodman_list_containers)z
podman imagesz	podman ps�infozimage trust show�imageszimages --digestszpod psz
port --allZpszps -azstats --no-stream --all�versionz	volume lscSsg|]}d|���qS)zpodman �)�.0�srr�/usr/lib/python3.6/podman.py�
<listcomp>Msz Podman.setup.<locals>.<listcomp>r
z
podman ps -as�d)�priorityz/etc/cniz/etc/containersT)�	recursivezpodman network lsZpodman_list_networks)�tagsZstatusrcSsg|]}|j�d�qS)r)�split)rZpnrrrr[s�output�cSsg|]}d|���qS)zpodman network inspect r)rZnetrrrr]sZnetworksZpodman_network_inspect)�subdirrcSsg|]}|d�qS)rr)r�crrrrasrr	)�runtimeZget_all)rzpodman inspect �
containersZpodman_container_inspectZnoneZpodman_image_inspectzpodman image tree zimages/treeZpodman_image_treezpodman volume inspect �volumesZpodman_volume_inspectrzpodman logs -t �2)rr)
Zadd_env_varZadd_cmd_tagsZadd_cmd_outputZ
get_optionZadd_dir_listingZcollect_cmd_output�
splitlinesZget_containersZget_container_imagesZget_container_volumes)�selfZsubcmdsZpnetsZnetsr rr!rZimg�nameZimg_idZinspZvolZconrrr�setup2st






zPodman.setupcCsd}|jd|d�dS)Nz=(?P<var>(pass|key|secret|PASS|KEY|SECRET).*?)=(?P<value>.*?)"z	*inspect*z\g<var>=********")Zdo_cmd_output_sub)r$Z
env_regexprrr�postproc�szPodman.postprocN)r)r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackagesrZoption_listr&r'rrrrrs

OrN)Zsos.report.pluginsrrrrrrrrr�<module>s

NineSec Team - 2022